Skip to content

Commit 3ba7b95

Browse files
author
Pablo
authored
Merge pull request #2 from pv8/feature/general-improvements
2 parents c8533b3 + 29c8417 commit 3ba7b95

28 files changed

+196
-15
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ _drafts/
22
_site/
33
.sass-cache/
44
.rbenv/
5+
.ruby-version
56

67
Gemfile.lock
78

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
source 'https://rubygems.org'
22

3-
gem 'github-pages'
3+
gem 'github-pages', group: :jekyll_plugins
44
gem 'rake'
55
gem 'html-proofer'

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ $ bundle exec rake test
2929
## Credits
3030
- Layout from [Jekyll][jekyll] default theme
3131
- Icons by [Font-Awesome][fontawesome]
32+
- Favicons generated with [Real Favicon Generator][favicongenerator]
3233

3334
## License
3435
The **content** is licensed under a [Creative Commons Attribution 4.0 International License][cc-license].
@@ -42,3 +43,4 @@ The **code** is licensed under [MIT Licensed][mit-license].
4243
[mit-license]: http://www.opensource.org/licenses/mit-license.php
4344
[cc-license]: href="http://creativecommons.org/licenses/by/4.0/
4445
[cc-image]: https://i.creativecommons.org/l/by/4.0/88x31.png
46+
[favicongenerator]: https://realfavicongenerator.net

_config.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,15 @@ timezone: America/Sao_Paulo
1313
title: Pablo Vieira
1414
email: contact@pv8.io
1515

16+
app_name: PV
17+
1618
meta:
1719
description: "Pablo Vieira's personal website."
18-
keywords: project management, agile, software, coding, programming, python, database, gamification, jeenga, marketing, crm
20+
keywords: project management, agile, scrum, coding, programming, python, database, nosql, gamification, cto, jeenga, marketing, crm
21+
theme_color: "#fff"
1922

2023
baseurl: "" # the subpath of your site, e.g. /blog/
21-
url: "http://pv8.io" # the base hostname & protocol for your site
24+
url: "https://www.pv8.io" # the base hostname & protocol for your site
2225

2326
branch: master
2427

@@ -47,3 +50,13 @@ markdown: kramdown
4750

4851
gems:
4952
- jekyll-sitemap
53+
54+
compress_html:
55+
clippings: all
56+
comments: ["<!-- ", " -->"]
57+
endings: all
58+
ignore:
59+
envs: [local]
60+
blanklines: false
61+
profile: false
62+
startings: [html, head, body]

_includes/footer.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{% assign profile = profile_hash[1] %}
1010
{% if profile.show %}
1111
<li>
12-
<a href="{{ profile.url }}" target="_blank" class="icon-link">
12+
<a href="{{ profile.url }}" target="_blank" rel="noopener" class="icon-link">
1313
<span class="icon-desc">{{ profile.name }}</span>
1414
<br/>
1515
<i class="fa fa-{{ profile_hash[0] }} fa-3x icon"></i>
@@ -20,7 +20,7 @@
2020
</ul>
2121
</div>
2222
<div class="footer-col">
23-
<span class="post-meta">PGP <a href="{{ site.pgp.url }}" target="_blank"><code>{{ site.pgp.fingerprint }}</code></a></span>
23+
<span class="post-meta">PGP <a href="{{ site.pgp.url }}" target="_blank" rel="noopener"><code>{{ site.pgp.fingerprint }}</code></a></span>
2424
</div>
2525
<div class="footer-col">
2626
<span class="post-meta">Copyright &#169; {{ site.time | date: '%Y' }} • {{ site.profile.name }}</span>

_includes/head.html

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,30 @@
11
<head>
2+
<!-- Common metatags -->
23
<meta charset="utf-8">
3-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
4+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
45
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<meta name="robots" content="index, follow">
7+
8+
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
9+
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
10+
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
11+
<link rel="manifest" href="/manifest.json">
12+
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#bf921e">
13+
<meta name="apple-mobile-web-app-title" content="{{ site.app_name }}">
14+
<meta name="application-name" content="{{ site.app_name }}">
15+
<meta name="theme-color" content="{{ site.meta.theme_color }}">
516

617
{% capture page_title %}{% if page.title %}{{ " &middot; pv8.io" | prepend: page.title }}{% else %}{{ site.title }}{% endif %}{% endcapture %}
718
{% capture page_description %}{% if page.excerpt %}{{ page.excerpt | markdownify | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.meta.description }}{% endif %}{% endcapture %}
819
{% capture url %}{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}{% endcapture %}
920
<title>{{ page_title }}</title>
21+
22+
<meta name="author" content="{{ site.profile.name }}">
23+
<meta name="image" content="{{ site.default_image }}">
1024
<meta name="description" content="{{ page_description }}">
1125
<meta name="keywords" content="{{ site.meta.keywords }}">
26+
<meta name="MobileOptimized" content="320" />
27+
<meta name="HandheldFriendly" content="True" />
1228

1329
<!-- Twitter Cards metatags -->
1430
<meta name="twitter:card" content="summary" />
@@ -24,6 +40,7 @@
2440
<meta name="twitter:url" content="{{ url }}" />
2541

2642
<!-- Open Graph metatags -->
43+
<meta property="og:locale" content="en_US">
2744
<meta property="og:site_name" content="{{ site.title }}" />
2845
<meta property="og:title" content="{{ page_title }}" />
2946
<meta property="og:description" content="{{ page_description }}" />
@@ -46,6 +63,11 @@
4663
<meta property="og:image" content="{{ site.default_image }}" />
4764
{% endif %}
4865

66+
<!-- schema.org metatags -->
67+
<meta itemprop="name" content="{{ site.profile.name }}">
68+
<meta itemprop="description" content="{{ site.meta.description }}">
69+
<meta itemprop="image" content="{{ site.default_image }}">
70+
4971
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
5072
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
5173
<link rel="canonical" href="{{ url }}">

_includes/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<a class="site-title" href="{{ site.baseurl }}/">{{ site.title }}</a>
66

77
<nav class="site-nav">
8-
<a href="#" class="menu-icon">
8+
<a href="#" class="menu-icon" alt="Main menu">
99
<svg viewBox="0 0 18 15">
1010
<path fill="#424242" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
1111
<path fill="#424242" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484 h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>

_includes/main-footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<p>
33
<em>Choose Independent. Choose Firefox.</em>
44
<br/>
5-
<a href="https://affiliates.mozilla.org/referral/70345" target="_blank">
5+
<a href="https://affiliates.mozilla.org/referral/70345" target="_blank" rel="noopener">
66
<img alt="" src="//images-focus-opensocial.googleusercontent.com/gadgets/proxy?url=https://affiliates.mozilla.org/media/uploads/banners/ea2d21127b1d4284f090aa9342a6d9b840e8070b.png&amp;container=focus&amp;gadget=a&amp;rewriteMime=image/*" />
77
</a>
88
</p>

_includes/service-worker.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<script>
2+
if ('serviceWorker' in navigator) {
3+
console.log('ServiceWorker available \\o/');
4+
window.addEventListener('load', function() {
5+
navigator.serviceWorker.register('/sw.js').then(function(registration) {
6+
console.log('ServiceWorker registration successful with scope: ', registration.scope);
7+
}, function(err) {
8+
console.log('ServiceWorker registration failed: ', err);
9+
});
10+
});
11+
} else {
12+
console.log('ServiceWorker not available :(');
13+
}
14+
</script>

_layouts/compress.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
# Jekyll layout that compresses HTML
3+
# v3.0.1
4+
# http://jch.penibelst.de/
5+
# © 2014–2015 Anatol Broder
6+
# MIT License
7+
---
8+
9+
{% capture _LINE_FEED %}
10+
{% endcapture %}{% if site.compress_html.ignore.envs contains jekyll.environment %}{{ content }}{% else %}{% capture _content %}{{ content }}{% endcapture %}{% assign _profile = site.compress_html.profile %}{% if site.compress_html.endings == "all" %}{% assign _endings = "html head body li dt dd p rt rp optgroup option colgroup caption thead tbody tfoot tr td th" | split: " " %}{% else %}{% assign _endings = site.compress_html.endings %}{% endif %}{% for _element in _endings %}{% capture _end %}</{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _end %}{% endfor %}{% if _profile and _endings %}{% assign _profile_endings = _content | size | plus: 1 %}{% endif %}{% for _element in site.compress_html.startings %}{% capture _start %}<{{ _element }}>{% endcapture %}{% assign _content = _content | remove: _start %}{% endfor %}{% if _profile and site.compress_html.startings %}{% assign _profile_startings = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.comments == "all" %}{% assign _comments = "<!-- -->" | split: " " %}{% else %}{% assign _comments = site.compress_html.comments %}{% endif %}{% if _comments.size == 2 %}{% capture _comment_befores %}.{{ _content }}{% endcapture %}{% assign _comment_befores = _comment_befores | split: _comments.first %}{% for _comment_before in _comment_befores %}{% if forloop.first %}{% continue %}{% endif %}{% capture _comment_outside %}{% if _carry %}{{ _comments.first }}{% endif %}{{ _comment_before }}{% endcapture %}{% capture _comment %}{% unless _carry %}{{ _comments.first }}{% endunless %}{{ _comment_outside | split: _comments.last | first }}{% if _comment_outside contains _comments.last %}{{ _comments.last }}{% assign _carry = false %}{% else %}{% assign _carry = true %}{% endif %}{% endcapture %}{% assign _content = _content | remove_first: _comment %}{% endfor %}{% if _profile %}{% assign _profile_comments = _content | size | plus: 1 %}{% endif %}{% endif %}{% assign _pre_befores = _content | split: "<pre" %}{% assign _content = "" %}{% for _pre_before in _pre_befores %}{% assign _pres = _pre_before | split: "</pre>" %}{% assign _pres_after = "" %}{% if _pres.size != 0 %}{% if site.compress_html.blanklines %}{% assign _lines = _pres.last | split: _LINE_FEED %}{% assign _lastchar = _pres.last | split: "" | last %}{% assign _outerloop = forloop %}{% capture _pres_after %}{% for _line in _lines %}{% assign _trimmed = _line | split: " " | join: " " %}{% if forloop.last and _lastchar == _LINE_FEED %}{% unless _outerloop.last %}{{ _LINE_FEED }}{% endunless %}{% continue %}{% endif %}{% if _trimmed != empty or forloop.last %}{% unless forloop.first %}{{ _LINE_FEED }}{% endunless %}{{ _line }}{% endif %}{% endfor %}{% endcapture %}{% else %}{% assign _pres_after = _pres.last | split: " " | join: " " %}{% endif %}{% endif %}{% capture _content %}{{ _content }}{% if _pre_before contains "</pre>" %}<pre{{ _pres.first }}</pre>{% endif %}{% unless _pre_before contains "</pre>" and _pres.size == 1 %}{{ _pres_after }}{% endunless %}{% endcapture %}{% endfor %}{% if _profile %}{% assign _profile_collapse = _content | size | plus: 1 %}{% endif %}{% if site.compress_html.clippings == "all" %}{% assign _clippings = "html head title base link meta style body article section nav aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr blockquote ol ul li dl dt dd figure figcaption main div table caption colgroup col tbody thead tfoot tr td th" | split: " " %}{% else %}{% assign _clippings = site.compress_html.clippings %}{% endif %}{% for _element in _clippings %}{% assign _edges = " <e;<e; </e>;</e>;</e> ;</e>" | replace: "e", _element | split: ";" %}{% assign _content = _content | replace: _edges[0], _edges[1] | replace: _edges[2], _edges[3] | replace: _edges[4], _edges[5] %}{% endfor %}{% if _profile and _clippings %}{% assign _profile_clippings = _content | size | plus: 1 %}{% endif %}{{ _content }}{% if _profile %} <table id="compress_html_profile_{{ site.time | date: "%Y%m%d" }}" class="compress_html_profile"> <thead> <tr> <td>Step <td>Bytes <tbody> <tr> <td>raw <td>{{ content | size }}{% if _profile_endings %} <tr> <td>endings <td>{{ _profile_endings }}{% endif %}{% if _profile_startings %} <tr> <td>startings <td>{{ _profile_startings }}{% endif %}{% if _profile_comments %} <tr> <td>comments <td>{{ _profile_comments }}{% endif %}{% if _profile_collapse %} <tr> <td>collapse <td>{{ _profile_collapse }}{% endif %}{% if _profile_clippings %} <tr> <td>clippings <td>{{ _profile_clippings }}{% endif %} </table>{% endif %}{% endif %}

0 commit comments

Comments
 (0)