From 9808cf6cf013d483688cd683d4d44556c51a31ce Mon Sep 17 00:00:00 2001 From: Melroy van den Berg Date: Tue, 21 Nov 2023 20:25:45 +0100 Subject: [PATCH 1/4] Update setup guide link (#618) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e939bf8..18a2d30 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ Inside the folder of your Hugo site run: ``` $ git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke ``` -For more information read the official [setup guide](//gohugo.io/overview/installing/) of Hugo. +For more information read the official [setup guide](//gohugo.io/getting-started/quick-start/) of Hugo. From 9276a90cfad3d80e463ed22a19ff0abf8dbff84f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20V=C3=A1la?= Date: Tue, 21 Nov 2023 20:30:49 +0100 Subject: [PATCH 2/4] localization: Create Czech (cs) localization (#626) --- i18n/cs.toml | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 i18n/cs.toml diff --git a/i18n/cs.toml b/i18n/cs.toml new file mode 100644 index 0000000..ecb023a --- /dev/null +++ b/i18n/cs.toml @@ -0,0 +1,49 @@ +[more] +other = "Více" + +[allTitle] +other = "Všechny {{.Title }}" + +[recentTitle] +other = "Nejnovější {{.Title }}" + +[readMore] +other = "čti dále" + +[by] +other = "Autor" + +[whatsInThis] +other = "Co je v tomto {{ .Type }}" + +[related] +other = "Related" + +[yourName] +other = "Jméno" + +[emailAddress] +other = "Emailová adresa" + +[message] +other = "Zpráva" + +[emailRequiredNote] +other = "Emailová adresa je požadována." + +[send] +other = "Odeslat" + +[taxonomyPageList] +other = "Stránky obsahující taxonomický termín “{{ .Title }}”" + +[readingTime] +one = "Jedna minuta čtení" +other = "{{ .Count }} minut čtení" + +[wordCount] +one = "Jedno slovo" +other = "{{ .Count }} slov" + +[pageTitle] +other = "{{ .Name }} stránka" From 4ea29d886c324ab622085014b7cbab6b078d839b Mon Sep 17 00:00:00 2001 From: stigh Date: Tue, 21 Nov 2023 20:36:10 +0100 Subject: [PATCH 3/4] fix: in Norwegian translation use imperative form 'Send', consistent capitalization of 'Beskjed' (#639) --- i18n/no.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/i18n/no.toml b/i18n/no.toml index 40b2aca..c695c14 100644 --- a/i18n/no.toml +++ b/i18n/no.toml @@ -26,16 +26,16 @@ other = "Ditt navn" other = "E-postadresse" [message] -other = "beskjed" +other = "Beskjed" [emailRequiredNote] other = "E-postadresse er påkrevd" [send] -other = "Sende" +other = "Send" [taxonomyPageList] other = "Below you will find pages that utilize the taxonomy term “{{ .Title }}”" [pageTitle] -other = "{{ .Name }} side" \ No newline at end of file +other = "{{ .Name }} side" From 221a0d881758f6b6b7fba99eecb894cd5fa911ec Mon Sep 17 00:00:00 2001 From: Joris Conijn Date: Tue, 21 Nov 2023 20:41:58 +0100 Subject: [PATCH 4/4] feat: add canonical url support (#650) When you want to publish content that is already published on a different site. You need to reference a canonical url of the original content. By defining the `canonicalUrl` in the front matter definition the canonical url is set in the headers. --- README.md | 20 ++++++++++++++------ layouts/_default/baseof.html | 10 ++++++++-- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 18a2d30..5981a71 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ This theme uses the "Tachyons" CSS library. This will allow you to manipulate th > ``` > $ go version > ``` -> Go modules were considered production ready in v1.14. [Download Go](https://golang.org/dl/). +> Go modules were considered production ready in v1.14. [Download Go](https://golang.org/dl/). 1. From your project's root directory, initiate the hugo module system if you haven't already: @@ -108,7 +108,7 @@ To enable comments, add following to your config file: For any page or post you can add a featured image by including the local path in front matter (see content in the `exampleSite/content/_readme.md` file for examples): `featured_image: '/images/gohugo-default-sample-hero-image.jpg'` #### Featured image as Page Resources -If user is using [Page Resources](https://gohugo.io/content-management/page-resources/), the theme will try and match the `featured_image` from with a page resource of type `image` and use its relative permalink. If no `featured_image` is set, the theme will look for a Page Resource of type `image` whose filepath incudes either `cover` or `feature` +If user is using [Page Resources](https://gohugo.io/content-management/page-resources/), the theme will try and match the `featured_image` from with a page resource of type `image` and use its relative permalink. If no `featured_image` is set, the theme will look for a Page Resource of type `image` whose filepath incudes either `cover` or `feature` #### Other hero settings If you would like to hide the header text on the featured image on a page, set `omit_header_text` to `true`. See `exampleSite/content/contact.md` for an example. @@ -156,7 +156,7 @@ Using front matter and cascade, this can be customized for a whole section, or j The theme automatically adds "Follow" link icons to the header and footer and "Share" link icons to pages unless `disable_share` parameter is set to true either on the site level (site params) or page level (front matter). Each built-in services sports a label, an icon and a color. -In order to register a service to be used, user must add an `ananke_socials` parameter to its project configuration file and list them through it in the desired order. Each entry must bear a +In order to register a service to be used, user must add an `ananke_socials` parameter to its project configuration file and list them through it in the desired order. Each entry must bear a - name*: It matches the built-in service reference (Ex: twitter, github) - url*: The url of the handle's profile on the service (Ex: https://twitter.com/theNewDynamic, https://github.com/ theNewDynamic) @@ -269,10 +269,10 @@ Ananke uses [Tachyon.io](https://tachyons.io/) utility class library. WARNING: Pending resolution of this [discussion](https://github.com/theNewDynamic/gohugo-theme-ananke/discussions/452#discussioncomment-1865301), Custom CSS only works with Hugo Extended -In order to complement the default CSS with your own, you can add custom css files to the project. +In order to complement the default CSS with your own, you can add custom css files to the project. 1. Just add a `assets/ananke/css` directory to your project and add the file(s) in it. -2. Register the files using the `custom_css` key in your site's parameter. The path referenced in the parameter should be relative to the `assets/ananke/css` folder. +2. Register the files using the `custom_css` key in your site's parameter. The path referenced in the parameter should be relative to the `assets/ananke/css` folder. The css files will be added in their registered order to final `main.css` file. @@ -331,9 +331,17 @@ Dates of blog posts and single pages are rendered with the default date format c date_format = "2. January 2006" ``` -With hugo 0.87.0 and above, you can also use predefined layout, like `:date_full`, and it will output localized dates or times. +With hugo 0.87.0 and above, you can also use predefined layout, like `:date_full`, and it will output localized dates or times. See hugo's documentation of the [`time.Format` function](https://gohugo.io/functions/dateformat/) for more details. +### Using a canonical url + +When you want to publish content that is already published on a different site. You need to reference a canonical url of the original content. +By defining the `canonicalUrl` in the front matter definition the canonical url is set in the headers. + +``` +canonicalUrl: https://mydomain.com/path-to-the-oringinal-content/ +``` ### Nearly finished diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 39179ed..52e7e67 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -19,7 +19,7 @@ {{ partial "site-style.html" . }} {{ partial "site-scripts.html" . }} - + {{ block "favicon" . }} {{ partialCached "site-favicon.html" . }} {{ end }} @@ -30,7 +30,13 @@ {{ end }} {{ end }} - + + {{ if .Params.canonicalUrl }} + + {{ else }} + + {{ end }} + {{/* NOTE: These Hugo Internal Templates can be found starting at https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates */}} {{- template "_internal/opengraph.html" . -}} {{- template "_internal/schema.html" . -}}