Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better SEO, OpenGraph, schema.org and clean generated code #481

Merged
merged 68 commits into from
Dec 31, 2021
Merged
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
a203804
Create opengraph.html
jmrplens Dec 1, 2021
d714e52
Update head.html
jmrplens Dec 1, 2021
d44ee6e
Update opengraph.html
jmrplens Dec 1, 2021
f6e8054
Update opengraph.html
jmrplens Dec 1, 2021
f135118
Update _config.yml
jmrplens Dec 1, 2021
d5beb81
Update default.html
jmrplens Dec 1, 2021
e8a662f
Add files via upload
jmrplens Dec 1, 2021
55b95fa
Update head.html
jmrplens Dec 1, 2021
3e5b0be
Rename opengraph.html to metadata.html
jmrplens Dec 1, 2021
99155b6
Update _config.yml
jmrplens Dec 1, 2021
6c7c07f
Update head.html
jmrplens Dec 1, 2021
0955aee
Update metadata.html
jmrplens Dec 2, 2021
be7327d
Update _config.yml
jmrplens Dec 2, 2021
00bab9d
Update head.html
jmrplens Dec 2, 2021
ead3d8a
Update _config.yml
jmrplens Dec 2, 2021
edcb695
Update metadata.html
jmrplens Dec 2, 2021
a196de5
Clean code metadata
jmrplens Dec 2, 2021
275adf0
Remove duplicate meta tag "author"
jmrplens Dec 2, 2021
8062fcf
Added 2 new twitter tag
jmrplens Dec 2, 2021
ce2af36
update
jmrplens Dec 6, 2021
a2b1a4c
Update analytics.html
jmrplens Dec 6, 2021
266fe2a
Update metadata.html
jmrplens Dec 6, 2021
3bbdd23
Correction for Schema.org
jmrplens Dec 6, 2021
ba6a998
Compress css suggested by @rohandebsarkar
jmrplens Dec 8, 2021
2ae5d37
New html compression and beta strip blank lines
jmrplens Dec 8, 2021
57fba18
Option to remove HTML comments
jmrplens Dec 8, 2021
609b511
Beautify HTML and correct WhiteSpaces
jmrplens Dec 12, 2021
20a4fc9
Minor bug
jmrplens Dec 19, 2021
ebe5659
Update _config.yml
jmrplens Dec 22, 2021
0afd2b1
Update _config.yml
jmrplens Dec 22, 2021
0c30dbd
Update _config.yml
jmrplens Dec 22, 2021
b3f5c8c
Update _includes/metadata.html
jmrplens Dec 22, 2021
fc5a782
Update _plugins/beautify.rb
jmrplens Dec 22, 2021
796844e
Update _plugins/beautify.rb
jmrplens Dec 22, 2021
516d2f1
Update _plugins/minify.rb
jmrplens Dec 22, 2021
909c6dc
Update _includes/metadata.html
jmrplens Dec 22, 2021
d2b870d
Update _includes/metadata.html
jmrplens Dec 22, 2021
6bb87fc
Update _includes/metadata.html
jmrplens Dec 22, 2021
e5aec51
Update _includes/metadata.html
jmrplens Dec 22, 2021
0cfeef1
Update _includes/metadata.html
jmrplens Dec 22, 2021
b51393f
Update _layouts/parse.html
jmrplens Dec 22, 2021
0698805
Quotation marks minor bug
jmrplens Dec 22, 2021
49924ae
Metadata better readability and beauty source code
jmrplens Dec 22, 2021
9648f1b
Tabs to 4-space
jmrplens Dec 22, 2021
6ac75c6
Correct indentation
jmrplens Dec 22, 2021
5dfa444
Minor corrections metadata.html
jmrplens Dec 22, 2021
43f2cf3
Remove blankline
jmrplens Dec 22, 2021
3808d41
Beautify HTML source code generated
jmrplens Dec 22, 2021
bd1d4f0
Update indentation social links
jmrplens Dec 22, 2021
3cb3ebe
parse.html - Better readability
jmrplens Dec 22, 2021
55b541f
Delete responsive_img.html
jmrplens Dec 23, 2021
09a4535
Merge branch 'master' of git://github.com/alshedivat/al-folio into al…
jmrplens Dec 23, 2021
c80956c
Merge branch 'alshedivat-master' into patch-2
jmrplens Dec 23, 2021
f1d15f5
Update from latest PR merged
jmrplens Dec 23, 2021
5438a9a
Beautify figure.html
jmrplens Dec 23, 2021
cb2afd7
Minor corrections to beautify HTML about.html
jmrplens Dec 23, 2021
6d7b72a
1/2 Beautify content generators
jmrplens Dec 24, 2021
3fe1f3d
2/2 Beautify content generators
jmrplens Dec 24, 2021
ea2a396
Minor bug about.html. Show subtitle
jmrplens Dec 25, 2021
f23793b
Add subtitle to about.md
jmrplens Dec 25, 2021
74bac29
Merge branch 'patch-2' of https://github.com/jmrplens/jmrplens.github…
jmrplens Dec 25, 2021
964b0eb
Update about.html
jmrplens Dec 25, 2021
89acd0d
Update _layouts/about.html
jmrplens Dec 26, 2021
302c8e8
Update _includes/metadata.html
jmrplens Dec 26, 2021
871df5f
Update _includes/metadata.html
jmrplens Dec 26, 2021
96624c2
Update _includes/metadata.html
jmrplens Dec 26, 2021
9ff4596
Update _pages/about.md
jmrplens Dec 26, 2021
23ad5f6
Update _includes/metadata.html
jmrplens Dec 26, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ group :jekyll_plugins do
gem 'jemoji'
gem 'unicode_utils'
gem 'webrick'
gem 'htmlcompressor'
gem 'htmlbeautifier'
end
30 changes: 26 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ footer_text: >
Powered by <a href="http://jekyllrb.com/" target="_blank">Jekyll</a> with <a href="https://github.com/alshedivat/al-folio">al-folio</a> theme.
Hosted by <a href="https://pages.github.com/" target="_blank">GitHub Pages</a>.
Photos from <a href="https://unsplash.com" target="_blank">Unsplash</a>.
keywords: jekyll, jekyll-theme, academic-website, portfolio-website # add your own keywords or leave empty

lang: en # the language of your site (for example: en, fr, cn, ru, etc.)
icon: 🔥 # the emoji used as the favicon
Expand Down Expand Up @@ -40,10 +41,11 @@ max_width: 800px
# TODO: add layout settings (single page vs. multi-page)

# -----------------------------------------------------------------------------
# Open Graph
# Open Graph & Schema.org
# -----------------------------------------------------------------------------
# Display links to the page with a preview object on social media.
serve_og_meta: false # Include Open Graph meta tags in the HTML head
serve_schema_org: false # Include Schema.org in the HTML head
og_image: # The site-wide (default for all links) Open Graph preview image

# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -72,8 +74,10 @@ rss_icon: true
contact_note: >
You can even add a little note about which of these is the best way to reach you.
google_analytics: UA-XXXXXXXXX # out your google-analytics code
panelbear_analytics: XXXXXXXXX # panelbear analytics site ID
google_analytics: # your google-analytics ID (format: UA-XXXXXXXXX)
google_site_verification: # your google-site-verification ID (Google Search Console)
bing_site_verification: # out your bing-site-verification ID (Bing Webmaster)
panelbear_analytics: # panelbear analytics site ID (format: XXXXXXXXX)

# -----------------------------------------------------------------------------
# Blog
Expand Down Expand Up @@ -158,10 +162,26 @@ defaults:
path: "assets/**/*.*"
values:
sitemap: false

# Extras
github: [metadata]

# -----------------------------------------------------------------------------
# Jekyll optimization
# -----------------------------------------------------------------------------

# HTML remove comments (<!-- .... -->)
remove_HTML_comments: false

# HTML beautifier (_plugins/beautify.rb) / https://github.com/threedaymonk/htmlbeautifier
beautify: false # This function has conflict with the code snippets, they can be displayed incorrectly

# HTML minify (_plugins/minify.rb) Thanks to: https://www.ffbit.com/blog/2021/03/17/html-minification-in-jekyll.html
minify: false

# CSS/SASS minify
sass:
style: compressed

# -----------------------------------------------------------------------------
# Jekyll Archives
# -----------------------------------------------------------------------------
Expand Down Expand Up @@ -242,6 +262,8 @@ jekyll-diagrams:

enable_google_analytics: false # enables google analytics
enable_panelbear_analytics: false # enables panelbear analytics
enable_google_verification: false # enables google site verification
enable_bing_verification: false # enables bing site verification
enable_mansory: true # enables automatic project cards arangement
enable_math: true # enables math typesetting (uses MathJax)
enable_tooltips: false # enables automatic tooltip links generated
Expand Down
11 changes: 5 additions & 6 deletions _includes/figure.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
{% assign path = include.path | remove: ".jpg" | remove: ".jpeg" | remove: ".png" | remove: ".tiff" %}
{%- assign path = include.path | remove: ".jpg" | remove: ".jpeg" | remove: ".png" | remove: ".tiff" -%}

<figure>

<picture>
{% for i in site.imagemagick.widths %}
<source media="(max-width: {{ i }}px)" srcset="{{ path | relative_url }}-{{ i }}.webp">
{% endfor %}
{% for i in site.imagemagick.widths -%}
<source media="(max-width: {{ i }}px)" srcset="{{ path | relative_url }}-{{ i }}.webp" />
{% endfor -%}

<!-- Fallback to the original file -->
<img {% if include.class %}class="{{ include.class }}"{% endif %} src="{{ include.path | relative_url }}" {% if include.alt %}alt="{{ alt }}"{% endif %} {% if include.title %}title="{{ title }}"{% endif %} {% if include.zoomable %}data-zoomable{% endif %} />

</picture>

{% if include.caption %}<figcaption class="caption">{{ include.caption }}</figcaption>{% endif %}
{%- if include.caption -%}<figcaption class="caption">{{ include.caption }}</figcaption>{%- endif %}

</figure>
52 changes: 25 additions & 27 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
{% if site.footer_fixed %}
<footer class="fixed-bottom">
<div class="container mt-0">
&copy; Copyright {{ site.time | date: '%Y' }} {{ site.first_name }} {{ site.middle_name }} {{ site.last_name }}.
{{ site.footer_text }}
{% if site.impressum_path %}
<a href="{{ site.url }}{{ site.baseurl }}{{ site.impressum_path }}">Impressum</a>.
{% endif %}
{% if site.last_updated %}
Last updated: {{ "now" | date: '%B %d, %Y' }}.
{% endif %}
</div>
</footer>
{% else %}
<footer class="sticky-bottom mt-5">
<div class="container">
&copy; Copyright {{ site.time | date: '%Y' }} {{ site.first_name }} {{ site.middle_name }} {{ site.last_name }}.
{{ site.footer_text }}
{% if site.impressum_path %}
<a href="{{ site.url }}{{ site.baseurl }}{{ site.impressum_path }}">Impressum</a>.
{% endif %}
{% if site.last_updated %}
Last updated: {{ "now" | date: '%B %d, %Y' }}.
{% endif %}
</div>
</footer>
{% endif %}
{% if site.footer_fixed %}
<footer class="fixed-bottom">
<div class="container mt-0">
&copy; Copyright {{ site.time | date: '%Y' }} {{ site.first_name }} {{ site.middle_name }} {{ site.last_name }}. {{ site.footer_text }}
{%- if site.impressum_path -%}
<a href="{{ site.url }}{{ site.baseurl }}{{ site.impressum_path }}">Impressum</a>.
{%- endif -%}
{%- if site.last_updated -%}
Last updated: {{ "now" | date: '%B %d, %Y' }}.
{%- endif %}
</div>
</footer>
{%- else -%}
<footer class="sticky-bottom mt-5">
<div class="container">
&copy; Copyright {{ site.time | date: '%Y' }} {{ site.first_name }} {{ site.middle_name }} {{ site.last_name }}. {{ site.footer_text }}
{%- if site.impressum_path -%}
<a href="{{ site.url }}{{ site.baseurl }}{{ site.impressum_path }}">Impressum</a>.
{%- endif -%}
{%- if site.last_updated -%}
Last updated: {{ "now" | date: '%B %d, %Y' }}.
{%- endif %}
</div>
</footer>
{%- endif %}
67 changes: 23 additions & 44 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -1,50 +1,29 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Metadata, OpenGraph and Schema.org -->
{% include metadata.html %}

<title>
{% if site.title == "blank" %}
{{ site.first_name }} {{ site.middle_name }} {{ site.last_name }}
{% else %}
{{ site.title }}
{% endif %}
{% if page.title != "blank" and page.url != "/" %}
| {{ page.title }}
{% endif %}
</title>
<meta name="description" content="{{ site.description }}">
<!-- Bootstrap & MDB -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/{{ site.bootstrap.version }}/css/bootstrap.min.css" rel="stylesheet" integrity="{{ site.bootstrap.integrity.css }}" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/{{ site.mdb.version }}/css/mdb.min.css" integrity="{{ site.mdb.integrity.css }}" crossorigin="anonymous" />

<!-- Open Graph -->
{% if site.serve_og_meta %}
<meta property="og:site_name" content="{{ site.description }}" />
<meta property="og:type" content="object" />
<meta property="og:title" content="{{ site.name }}" />
<meta property="og:url" content="{{ page.url | prepend: site.baseurl | prepend: site.url }}" />
<meta property="og:description" content="{{ page.title }}" />
<meta property="og:image" content="{%- if page.og_image -%}{{ page.og_image }}{%- else -%}{{ site.og_image }}{%- endif -%}" />
{% endif %}
<!-- Fonts & Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/{{ site.fontawesome.version }}/css/all.min.css" integrity="{{ site.fontawesome.integrity }}" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/{{ site.academicons.version }}/css/academicons.min.css" integrity="{{ site.academicons.integrity }}" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:100,300,400,500,700|Material+Icons">

<!-- Bootstrap & MDB -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/{{ site.bootstrap.version }}/css/bootstrap.min.css" rel="stylesheet" integrity="{{ site.bootstrap.integrity.css }}" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/{{ site.mdb.version }}/css/mdb.min.css" integrity="{{ site.mdb.integrity.css }}" crossorigin="anonymous" />
<!-- Code Syntax Highlighting -->
<link rel="stylesheet" href="https://gitcdn.link/repo/jwarby/jekyll-pygments-themes/master/{{ site.highlight_theme }}.css" />

<!-- Fonts & Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/{{ site.fontawesome.version }}/css/all.min.css" integrity="{{ site.fontawesome.integrity }}" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/{{ site.academicons.version }}/css/academicons.min.css" integrity="{{ site.academicons.integrity }}" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:100,300,400,500,700|Material+Icons">
<!-- Styles -->
{% if site.icon != empty -%}
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>{{ site.icon }}</text></svg>">
{%- endif %}
<link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">

<!-- Code Syntax Highlighting -->
<link rel="stylesheet" href="https://gitcdn.link/repo/jwarby/jekyll-pygments-themes/master/{{ site.highlight_theme }}.css" />
{%- if site.enable_darkmode %}

<!-- Styles -->
{% if site.icon != empty %}
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>{{ site.icon }}</text></svg>">
{% endif %}
<link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">

{% if site.enable_darkmode %}
<!-- Dark Mode -->
<script src="{{ '/assets/js/theme.js' | relative_url }}"></script>
<script src="{{ '/assets/js/dark_mode.js' | relative_url }}"></script>
{% endif %}
<!-- Dark Mode -->
<script src="{{ '/assets/js/theme.js' | relative_url }}"></script>
<script src="{{ '/assets/js/dark_mode.js' | relative_url }}"></script>
{%- endif -%}
Loading