Skip to content

Commit

Permalink
Add rel='canonical' (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
lwojcik authored Sep 17, 2023
1 parent 88f3ea3 commit 3c414b2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions content/_includes/partials/head.njk
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
<link rel="stylesheet" href="{{ '/css/style.css' | addHash }}">
<script src="{{ '/js/scripts.js' | addHash }}"></script>
<meta name="generator" content="{{ siteConfig.generator.name }} v{{ siteConfig.generator.version }}">
{%- if canonical -%}
<link rel="canonical" href="{{ canonical | alwaysProductionUrl }}" />
{%- endif -%}
{% favicons 'assets/favicon.svg', appleIconBgColor='#000' %}
<script>
if ('serviceWorker' in navigator) {
Expand Down
1 change: 1 addition & 0 deletions content/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pagination:
size: 10
alias: items
permalink: "{% if pagination.pageNumber > 0 %}/page/{{ pagination.pageNumber + 1 }}{% endif %}/"
canonical: /
---

{%- set totalPages = pagination.pages|length -%}
Expand Down
1 change: 1 addition & 0 deletions content/pages/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ layout: page
title: About
eleventyExcludeFromCollections: true
permalink: /about/
canonical: /about/
---

This is an sample site based on [M10y - Eleventy-based RSS aggregator template](https://github.com/lwojcik/eleventy-template-m10y).
1 change: 1 addition & 0 deletions content/pages/sites.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ layout: page
title: Sites
eleventyExcludeFromCollections: true
permalink: /sites/
canonical: /sites/
---

This is a list of RSS feeds added to the aggregator. Modify it by adding / editing files in `content/sites` directory.
Expand Down

0 comments on commit 3c414b2

Please sign in to comment.