Skip to content

Commit

Permalink
move canonical url to metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
rohandebsarkar committed Jul 11, 2022
1 parent 80d027c commit 27ba43b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
<!-- Code Syntax Highlighting -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/jwarby/jekyll-pygments-themes@master/{{ site.highlight_theme_light | append: '.css' }}" media="none" id="highlight_theme_light" />

<!-- Styles -->
<!-- Favicon -->
{% if site.icon.size < 3 %}
<link rel="shortcut 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>">
{% elsif site.icon != blank %}
<link rel="shortcut icon" href="{{ site.icon | prepend: '/assets/img/' | relative_url}}"/>
{% endif %}


<!-- Custom Stylessheet -->
<link rel="stylesheet" href="{{ '/assets/css/main.css' | relative_url }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">

<!-- Dark Mode -->
{% if site.enable_darkmode %}
Expand Down
4 changes: 3 additions & 1 deletion _includes/metadata.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
</title>
<meta name="author" content="{{ site.first_name }} {{ site.middle_name }} {{ site.last_name }}" />
<meta name="description" content="{%- if page.description -%}{{ page.description }}{%- else -%}{{ site.description }}{%- endif -%}" />
{%- if page.keywords or site.keywords %}
<link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">

{%- if page.keywords or site.keywords %}
<meta name="keywords" content="{%- if page.keywords -%}{{ page.keywords }}{%- else -%}{{ site.keywords }}{%- endif -%}" />
{%- endif %}

Expand Down

1 comment on commit 27ba43b

@vercel
Copy link

@vercel vercel bot commented on 27ba43b Jul 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.