diff --git a/README.md b/README.md index a76d0e06b..4de166685 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,9 @@ Hugo IRIS Theme - [Getting Started](#getting-started) - [Get Hugo](#get-hugo) - [Initialize New Hugo Project](#initialize-new-hugo-project) +- [Params](#params) + - [Site](#site) + - [Post Page Front Matter](#post-page-front-matter) - [Customize Theme](#customize-theme) - [config](#config) - [content](#content) @@ -119,6 +122,31 @@ hugo server +## Params + +### Site + +TBW. + +### Post Page Front Matter + +```yaml +title: +description: +publishdate: 2020-01-01T01:00:00.000Z +# draft: true +eyecatch: images/eyecatch.jpg +toc: true +# math: true +# weight: 1 +twitter: + username: piris314 + hashtags: ["Hugo"] +canonicalURL: +``` + + + ## Customize Theme TBW. diff --git a/exampleSite/content/en/posts/github-pages-and-github-actions.md b/exampleSite/content/en/posts/github-pages-and-github-actions.md index b113a4f32..b305d2250 100644 --- a/exampleSite/content/en/posts/github-pages-and-github-actions.md +++ b/exampleSite/content/en/posts/github-pages-and-github-actions.md @@ -11,6 +11,7 @@ toc: true twitter: username: piris314 hashtags: ["GitHubActions"] +canonicalURL: https://github.com/peaceiris/actions-gh-pages --- diff --git a/exampleSite/content/ja/posts/github-pages-and-github-actions.md b/exampleSite/content/ja/posts/github-pages-and-github-actions.md index b405a09f5..6d0c33531 100644 --- a/exampleSite/content/ja/posts/github-pages-and-github-actions.md +++ b/exampleSite/content/ja/posts/github-pages-and-github-actions.md @@ -11,6 +11,7 @@ toc: true twitter: username: piris314 hashtags: ["GitHubActions"] +canonicalURL: https://github.com/peaceiris/actions-gh-pages --- diff --git a/layouts/partials/head/general.html b/layouts/partials/head/general.html index 28e66ec26..b909dbd3b 100644 --- a/layouts/partials/head/general.html +++ b/layouts/partials/head/general.html @@ -41,3 +41,7 @@ {{ partial "head/ogp" . }} + +{{ with .Page.Params.canonicalURL }} + +{{ end }}