From eb5feefd2a83b5b058528d6723cd1fe81170765e Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Sun, 22 Aug 2021 17:29:18 +1000 Subject: [PATCH 01/21] =?UTF-8?q?=F0=9F=94=A8=20Fix=20issue=20with=20versi?= =?UTF-8?q?on=20numbers=20in=20release.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- release.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/release.sh b/release.sh index 4b5538ed..a88d1497 100755 --- a/release.sh +++ b/release.sh @@ -15,14 +15,14 @@ if [ $branch = "dev" ]; then if output=$(git status --porcelain) && [ -z "$output" ]; then # get the version number - echo "Enter the release version (eg. v1.0.0):" + echo "Enter the release version (eg. 1.2.0):" read version - echo "Started releasing Congo $version..." + echo "Started releasing Congo v$version..." # update package version jq --arg version "$version" '.version=$version' package.json > package.tmp && mv package.tmp package.json - sed -i -e "1s/^\(\/\*! Congo \)v[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}/\1$version/" assets/css/main.css + sed -i "" -e "1s/^\(\/\*! Congo \)v[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}/\1v$version/" assets/css/main.css # update changelog chan release $version || exit @@ -32,7 +32,7 @@ if [ $branch = "dev" ]; then npm run build # commit version updates - git commit -a -m "🔨 Preparing release $version" + git commit -a -m "🔨 Preparing release v$version" git push # switch to stable branch @@ -42,7 +42,7 @@ if [ $branch = "dev" ]; then git pull # merge in changes from dev branch - git merge --no-ff dev -m "🔖 Release $version" + git merge --no-ff dev -m "🔖 Release v$version" # create tag git tag $version @@ -54,7 +54,7 @@ if [ $branch = "dev" ]; then # publish GitHub release timeout 2 chan gh-release $version - echo "Congo $version successfully released! 🎉" + echo "Congo v$version successfully released! 🎉" echo "Returning to dev branch..." git checkout dev From ba1a57144b63c741ce00dfe5d6fc99281e0ada09 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Mon, 23 Aug 2021 09:49:59 +1000 Subject: [PATCH 02/21] =?UTF-8?q?=F0=9F=A9=B9=20Add=20dark=20style=20to=20?= =?UTF-8?q?group=20subheadings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 17 +++-------------- layouts/_default/list.html | 4 +++- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6726ec2..1f1039d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,14 @@ # Changelog - All notable changes to Congo will be documented in this file. Things that need attention when upgrading from a prior version are marked ⚠️. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Missing dark style for group subheadings on article listings ## [1.2.0] - 2021-08-22 - ### Added - - Multiple colour schemes - Edit links on article pages - Icons for Foursquare and Pinterest @@ -17,11 +16,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - CSS minification for custom stylesheets ### Changed - - Static assets are now managed through Hugo Pipelines ### Fixed - - Minor style issue with `button` shortcode - Hugo Modules would fail when using default theme config file - Some content not centred correctly on the profile homepage layout @@ -29,15 +26,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - `externalUrl` front matter not working on some list pages ## [1.1.1] - 2020-08-19 - ### Fixed - - Hotfix for exampleSite and GitHub configuration ## [1.1.0] - 2020-08-18 - ### Added - - Breadcrumbs - i18n support - Recent articles partial @@ -46,20 +39,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - JSON-LD structured metadata ### Changed - - ⚠️ Renamed parameter: `homepage.showList` -> `homepage.showRecent` - ⚠️ Renamed parameter: `homepage.listSections` -> `mainSections` - ⚠️ Consolidated author configuration parameters into `config.toml` - General style tweaks to enhance design consistency ### Fixed - - URLs being incorrect in some cases when the site is deployed in a subfolder ## [1.0.0] - 2020-08-16 - ### Added - - Built with Tailwind CSS JIT for minified stylesheets without any excess code - Fully responsive layout - Dark mode (auto-switching based upon browser) @@ -79,7 +68,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Advanced customisation using simple Tailwind colour definitions and styles - Fully documented -[unreleased]: https://github.com/jpanther/Congo/compare/v1.2.0...HEAD +[Unreleased]: https://github.com/jpanther/Congo/compare/v1.2.0...HEAD [1.2.0]: https://github.com/jpanther/Congo/compare/v1.1.1...v1.2.0 [1.1.1]: https://github.com/jpanther/congo/compare/v1.1.0...v1.1.1 [1.1.0]: https://github.com/jpanther/congo/compare/v1.0.0...v1.1.0 diff --git a/layouts/_default/list.html b/layouts/_default/list.html index ec1e2938..3d87210b 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -4,7 +4,9 @@
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} {{ if $.Site.Params.list.groupByYear }} -

{{ .Key }}

+

+ {{ .Key }} +


{{ end }} {{ range .Pages }} From 8d6ae39cf4ae4a999305229d23d9660bd6ec851a Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Tue, 24 Aug 2021 17:35:26 +1000 Subject: [PATCH 03/21] =?UTF-8?q?=F0=9F=91=B7=20Add=20Netlify=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netlify.toml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 netlify.toml diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 00000000..0542f903 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,15 @@ +[build] + base = "exampleSite" + command = "hugo --minify" + publish = "exampleSite/public" + +[build.environment] +HUGO_VERSION = "0.86.1" +HUGO_THEMESDIR = "../.." +HUGO_THEME = "repo" + +[context.production.environment] +HUGO_BASEURL = "$URL" + +[context.deploy-preview.environment] +HUGO_BASEURL = "$DEPLOY_PRIME_URL" From 5ab6b19681b4bb5d5166a1167a4ad3ee80180889 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Tue, 24 Aug 2021 17:41:24 +1000 Subject: [PATCH 04/21] =?UTF-8?q?=F0=9F=91=B7=20Update=20Netlify=20publish?= =?UTF-8?q?=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index 0542f903..9debf2b3 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,7 +1,7 @@ [build] base = "exampleSite" command = "hugo --minify" - publish = "exampleSite/public" + publish = "public" [build.environment] HUGO_VERSION = "0.86.1" From f44a9efd9ebd187cf5a5eb66cad43c2354dc9d85 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Tue, 24 Aug 2021 17:46:42 +1000 Subject: [PATCH 05/21] =?UTF-8?q?=F0=9F=91=B7=20Adjust=20Netlify=20URLs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netlify.toml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/netlify.toml b/netlify.toml index 9debf2b3..5f73fc48 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,6 +1,6 @@ [build] base = "exampleSite" - command = "hugo --minify" + command = "hugo --gc --minify" publish = "public" [build.environment] @@ -9,7 +9,8 @@ HUGO_THEMESDIR = "../.." HUGO_THEME = "repo" [context.production.environment] -HUGO_BASEURL = "$URL" +HUGO_BASEURL = $URL +HUGO_ENV = "production" [context.deploy-preview.environment] -HUGO_BASEURL = "$DEPLOY_PRIME_URL" +HUGO_BASEURL = $DEPLOY_PRIME_URL From 234359dd9c3d1f3124d61ae7426c90701f09e5f5 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Tue, 24 Aug 2021 17:56:26 +1000 Subject: [PATCH 06/21] =?UTF-8?q?=F0=9F=91=B7=20Update=20Netlify=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netlify.toml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/netlify.toml b/netlify.toml index 5f73fc48..a2b24b91 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,16 +1,24 @@ [build] base = "exampleSite" - command = "hugo --gc --minify" + command = "hugo --gc --minify -b $URL" publish = "public" [build.environment] -HUGO_VERSION = "0.86.1" HUGO_THEMESDIR = "../.." HUGO_THEME = "repo" [context.production.environment] -HUGO_BASEURL = $URL +HUGO_VERSION = "0.86.1" HUGO_ENV = "production" +[context.deploy-preview] +command = "hugo --gc --minify -b $DEPLOY_PRIME_URL" + [context.deploy-preview.environment] -HUGO_BASEURL = $DEPLOY_PRIME_URL +HUGO_VERSION = "0.86.1" + +[context.branch-deploy] +command = "hugo --gc --minify -b $DEPLOY_PRIME_URL" + +[context.branch-deploy.environment] +HUGO_VERSION = "0.86.1" From 83eebaefc0dc1c5cd9f3831cc8e719059c1095bf Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Wed, 25 Aug 2021 13:31:53 +1000 Subject: [PATCH 07/21] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Fathom=20Analytics?= =?UTF-8?q?=20script=20included=20twice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + layouts/partials/analytics.html | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f1039d2..ddf56515 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] ### Fixed - Missing dark style for group subheadings on article listings +- Fathom Analytics script included twice when using custom domain ## [1.2.0] - 2021-08-22 ### Added diff --git a/layouts/partials/analytics.html b/layouts/partials/analytics.html index 0787f40b..5f92a104 100644 --- a/layouts/partials/analytics.html +++ b/layouts/partials/analytics.html @@ -2,8 +2,9 @@ {{ with .Site.Params.fathomAnalytics.site }} {{ if isset $.Site.Params.fathomanalytics "domain" }} + {{ else }} + {{ end }} - {{ end }} {{ template "_internal/google_analytics.html" . }} {{ end }} From 8b68899a9bafa6a31a32aa7d20bb645d4b877aa1 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Wed, 25 Aug 2021 14:15:04 +1000 Subject: [PATCH 08/21] =?UTF-8?q?=F0=9F=91=B7=20Change=20Netlify=20base=20?= =?UTF-8?q?path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netlify.toml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/netlify.toml b/netlify.toml index a2b24b91..e3c2e616 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,7 +1,6 @@ [build] - base = "exampleSite" - command = "hugo --gc --minify -b $URL" - publish = "public" + command = "cd exampleSite && hugo --gc --minify -b $URL" + publish = "exampleSite/public" [build.environment] HUGO_THEMESDIR = "../.." From f1cc326dab0079d24e212244f5887391bc99fdd9 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Wed, 25 Aug 2021 14:39:20 +1000 Subject: [PATCH 09/21] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Change=20exampleSite?= =?UTF-8?q?=20links=20to=20use=20`ref`=20shortcode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exampleSite/content/_index.md | 4 ++-- exampleSite/content/docs/_index.md | 2 +- exampleSite/content/docs/configuration.md | 8 ++++---- exampleSite/content/docs/front-matter.md | 2 +- exampleSite/content/docs/getting-started.md | 6 +++--- exampleSite/content/docs/partials.md | 4 ++-- exampleSite/content/docs/shortcodes.md | 2 +- exampleSite/content/samples/_index.md | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md index 76a74ff1..28a869cd 100755 --- a/exampleSite/content/_index.md +++ b/exampleSite/content/_index.md @@ -22,8 +22,8 @@ A simple, lightweight theme for Hugo built with Tailwind CSS. -This is a demo site built entirely using Congo. It also contains a complete set of [theme documentation](/docs/). Congo is flexible and is great for both static page-based content (like this demo) or a traditional blog with a feed of recent posts. +This is a demo site built entirely using Congo. It also contains a complete set of [theme documentation]({{< ref "docs" >}}). Congo is flexible and is great for both static page-based content (like this demo) or a traditional blog with a feed of recent posts. -Explore the [sample pages](/samples/) to get a feel for what Congo can do. If you like what you see, check out the project on [Github](https://github.com/jpanther/congo) or read the [Installation guide](/docs/installation/) to get started. +Explore the [sample pages]({{< ref "samples" >}}) to get a feel for what Congo can do. If you like what you see, check out the project on [Github](https://github.com/jpanther/congo) or read the [Installation guide]({{< ref "docs/installation" >}}) to get started. {{< figure src="mountains.jpg" width="1200" height="800" caption="Photo by [Anna Scarfiello](https://unsplash.com/@little_anne?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)." >}} diff --git a/exampleSite/content/docs/_index.md b/exampleSite/content/docs/_index.md index cb8ce946..7f1ab68e 100755 --- a/exampleSite/content/docs/_index.md +++ b/exampleSite/content/docs/_index.md @@ -9,6 +9,6 @@ Simple, yet powerful. Learn how to use Congo and its features. {{< figure src="screenshot.png" >}} -This section contains everything you need to know about Congo. If you're new, check out the [Installation](/docs/installation/) guide to begin or visit the [Samples](/samples/) section to see what Congo can do. +This section contains everything you need to know about Congo. If you're new, check out the [Installation]({{< ref "docs/installation" >}}) guide to begin or visit the [Samples]({{< ref "samples" >}}) section to see what Congo can do. --- diff --git a/exampleSite/content/docs/configuration.md b/exampleSite/content/docs/configuration.md index 183e7898..fdb196c9 100644 --- a/exampleSite/content/docs/configuration.md +++ b/exampleSite/content/docs/configuration.md @@ -18,7 +18,7 @@ The theme ships with a default configuration that gets you up and running with a The default theme configuration is documented in each file so you can freely adjust the settings to meet your needs. {{< alert >}} -As outlined in the [installation instructions](/docs/installation/#set-up-your-configuration-files), you should adjust your theme configuration by modifying the files in the `config/_default/` folder of your Hugo project and delete the `config.toml` file in your project root. +As outlined in the [installation instructions]({{< ref "/docs/installation#set-up-theme-configuration-files" >}}), you should adjust your theme configuration by modifying the files in the `config/_default/` folder of your Hugo project and delete the `config.toml` file in your project root. {{< /alert >}} ## Site Configuration @@ -51,7 +51,7 @@ Note that the variable names provided in this table use dot notation to simplify Congo provides a large number of configuration parameters that control how the theme functions. The table below outlines every available parameter in the `config/_default/params.toml` file. -Many of the article defaults here can be overridden on a per article basis by specifying it in the front matter. Refer to the [Front Matter](/docs/front-matter/) section for further details. +Many of the article defaults here can be overridden on a per article basis by specifying it in the front matter. Refer to the [Front Matter]({{< ref "front-matter" >}}) section for further details. |Name|Type|Default|Description| @@ -59,7 +59,7 @@ Many of the article defaults here can be overridden on a per article basis by sp |`colorScheme`|string|`"congo"`|The theme colour scheme to use. Valid values are `congo` (default), `avocado`, `ocean` and `fire`.| |`description`|string|_Not set_|The description of the website for metadata purposes.| |`mainSections`|array of strings|_Not set_|The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used.| -|`homepage.layout`|string|`"page"`|The layout of the homepage. Valid values are `page`, `profile` or `custom`. When set to `custom`, you must provide your own layout by creating a `/layouts/partials/home/custom.html` file. Refer to the [Homepage Layout](/docs/homepage-layout/) section for more details.| +|`homepage.layout`|string|`"page"`|The layout of the homepage. Valid values are `page`, `profile` or `custom`. When set to `custom`, you must provide your own layout by creating a `/layouts/partials/home/custom.html` file. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details.| |`homepage.showRecent`|boolean|`false`|Whether or not to display the recent articles list on the homepage.| |`article.showDate`|boolean|`true`|Whether or not article dates are displayed.| |`article.dateFormat`|string|`"2 January 2006"`|How article dates are formatted. Refer to the [Hugo docs](https://gohugo.io/functions/format/#gos-layout-string) for acceptable formats.| @@ -77,7 +77,7 @@ Many of the article defaults here can be overridden on a per article basis by sp |`list.groupByYear`|boolean|`true`|Whether or not articles are grouped by year on list pages.| |`sitemap.excludedKinds`|array of strings|`["taxonomy", "term"]`|Kinds of content that should be excluded from the generated `/sitemap.xml` file. Refer to the [Hugo docs](https://gohugo.io/templates/section-templates/#page-kinds) for acceptable values.| |`taxonomy.showTermCount`|boolean|`true`|Whether or not the number of articles within a taxonomy term is displayed on the taxonomy listing.| -|`fathomAnalytics.site`|string|_Not set_|The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs](#analyticshtml) below for more details.| +|`fathomAnalytics.site`|string|_Not set_|The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) below for more details.| |`fathomAnalytics.domain`|string|_Not set_|If using a custom domain with Fathom Analytics, provide it here to serve `script.js` from the custom domain.| |`verification.google`|string|_Not set_|The site verification string provided by Google to be included in the site metadata.| |`verification.bing`|string|_Not set_|The site verification string provided by Bing to be included in the site metadata.| diff --git a/exampleSite/content/docs/front-matter.md b/exampleSite/content/docs/front-matter.md index 913f070b..f8b1aaaf 100644 --- a/exampleSite/content/docs/front-matter.md +++ b/exampleSite/content/docs/front-matter.md @@ -11,7 +11,7 @@ showAuthor: false In addition to the [default Hugo front matter parameters](https://gohugo.io/content-management/front-matter/#front-matter-variables), Congo adds a number of additional options to customise the presentation of individual articles. All the available theme parameters are listed below. -Front matter parameter default values are inherited from the theme's [base configuration](/docs/configuration/), so you only need to specify these parameters in your front matter when you want to override the default. +Front matter parameter default values are inherited from the theme's [base configuration]({{< ref "configuration" >}}), so you only need to specify these parameters in your front matter when you want to override the default. |Name|Type|Default|Description| diff --git a/exampleSite/content/docs/getting-started.md b/exampleSite/content/docs/getting-started.md index 9ddc2d7f..0a41e96f 100644 --- a/exampleSite/content/docs/getting-started.md +++ b/exampleSite/content/docs/getting-started.md @@ -10,7 +10,7 @@ showAuthor: false --- {{< alert >}} -This section assumes you have already [installed the Congo theme](/docs/installation/). +This section assumes you have already [installed the Congo theme]({{< ref "docs/installation" >}}). {{< /alert >}} The config files that ship with Congo contain all of the possible settings that the theme recognises. By default, many of these are commented out but you can simply uncomment them to activate or change a specific feature. @@ -34,7 +34,7 @@ links = [ The `[author]` configuration determines how the author information is displayed on the website. The image should be placed in the site's `static/` folder. Links will be displayed in the order they are listed. -Further detail about these configuration options is covered in the [Configuration](/docs/configuration/) section. +Further detail about these configuration options is covered in the [Configuration]({{< ref "configuration" >}}) section. ## Organising content @@ -68,4 +68,4 @@ When you create a new taxonomy, you will need to adjust the navigation links on weight = 20 ``` -These steps are the bare minimum configuration. If you now run `hugo server` you will be presented with a blank Congo website. Detailed configuration is covered in the [Configuration](/docs/configuration/) section. +These steps are the bare minimum configuration. If you now run `hugo server` you will be presented with a blank Congo website. Detailed configuration is covered in the [Configuration]({{< ref "configuration" >}}) section. diff --git a/exampleSite/content/docs/partials.md b/exampleSite/content/docs/partials.md index d126358c..70691199 100644 --- a/exampleSite/content/docs/partials.md +++ b/exampleSite/content/docs/partials.md @@ -66,7 +66,7 @@ Alternatively, you can also completely override the default favicon behaviour an ## Icon -Similar to the [icon shortcode](/docs/shortcodes/#icon), you can include icons in your own templates and partials by using Congo's `icon.html` partial. The partial takes one parameter which is the name of the icon to be included. +Similar to the [icon shortcode]({{< ref "shortcodes#icon" >}}), you can include icons in your own templates and partials by using Congo's `icon.html` partial. The partial takes one parameter which is the name of the icon to be included. **Example:** @@ -82,7 +82,7 @@ Congo also provides for a number of extension partials that allow for expanding ### Article link -If you wish to insert additional code after article links, create a `layouts/partials/extend-article-link.html` file. This is especially powerful when combined with the [`badge`](/docs/shortcodes/#badge) shortcode which can be used to highlight metadata for certain articles. +If you wish to insert additional code after article links, create a `layouts/partials/extend-article-link.html` file. This is especially powerful when combined with the [`badge`]({{< ref "shortcodes#badge" >}}) shortcode which can be used to highlight metadata for certain articles. ### Head and Footer diff --git a/exampleSite/content/docs/shortcodes.md b/exampleSite/content/docs/shortcodes.md index a70355ff..a2cf1aeb 100644 --- a/exampleSite/content/docs/shortcodes.md +++ b/exampleSite/content/docs/shortcodes.md @@ -75,7 +75,7 @@ Call to action Icons are populated using Hugo pipelines which makes them very flexible. Congo ships with a default set of icons for social, email, and generic links. If you want to add your own icons, you can simply place them in `/assets/icons/` and reference them using the `icon` shortcode passing in the icon's filename (without the `.svg.` extension). -Icons can also be used in partials by calling the [icon partial](/docs/partials/#icon). +Icons can also be used in partials by calling the [icon partial]({{< ref "partials#icon" >}}). ## Lead diff --git a/exampleSite/content/samples/_index.md b/exampleSite/content/samples/_index.md index edd1f81f..6c27b5f0 100755 --- a/exampleSite/content/samples/_index.md +++ b/exampleSite/content/samples/_index.md @@ -9,7 +9,7 @@ Congo brings your content to life. :heart_eyes: This section contains some demo pages that show how Congo renders different types of content. These pages come from Hugo's official [hugoBasicExample](https://github.com/gohugoio/hugoBasicExample) repository. -You can also see an example [taxonomy listing](/tags/) page. +You can also see an example [taxonomy listing]({{< ref "tags" >}}) page. _**Sidenote:** This page is just a standard Congo article listing and Hugo has been configured to generate a `samples` content type._ From 7c18ea28b49ec68f7e22d167c9f1699fb59fd9f9 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Wed, 25 Aug 2021 14:46:44 +1000 Subject: [PATCH 10/21] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Cascade=20exampleSit?= =?UTF-8?q?e=20front=20matter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exampleSite/content/docs/_index.md | 4 ++++ exampleSite/content/docs/advanced-customisation.md | 2 -- exampleSite/content/docs/configuration.md | 2 -- exampleSite/content/docs/front-matter.md | 2 -- exampleSite/content/docs/getting-started.md | 2 -- exampleSite/content/docs/homepage-layout/index.md | 2 -- exampleSite/content/docs/installation.md | 2 -- exampleSite/content/docs/partials.md | 2 -- exampleSite/content/docs/shortcodes.md | 2 -- exampleSite/content/samples/_index.md | 3 +++ 10 files changed, 7 insertions(+), 16 deletions(-) diff --git a/exampleSite/content/docs/_index.md b/exampleSite/content/docs/_index.md index 7f1ab68e..7c1a3218 100755 --- a/exampleSite/content/docs/_index.md +++ b/exampleSite/content/docs/_index.md @@ -1,6 +1,10 @@ --- title: "Documentation" description: "Learn how to use Congo and its features." + +cascade: + showDate: false + showAuthor: false --- {{< lead >}} diff --git a/exampleSite/content/docs/advanced-customisation.md b/exampleSite/content/docs/advanced-customisation.md index 604fa01e..f76ad9ad 100644 --- a/exampleSite/content/docs/advanced-customisation.md +++ b/exampleSite/content/docs/advanced-customisation.md @@ -5,8 +5,6 @@ draft: false description: "Learn how to build Congo manually." slug: "advanced-customisation" tags: ["advanced", "css", "docs"] -showDate: false -showAuthor: false --- There are a few ways you can make style changes to Congo. diff --git a/exampleSite/content/docs/configuration.md b/exampleSite/content/docs/configuration.md index fdb196c9..c2d3bf73 100644 --- a/exampleSite/content/docs/configuration.md +++ b/exampleSite/content/docs/configuration.md @@ -5,8 +5,6 @@ draft: false description: "All the configuration variables available in Congo." slug: "configuration" tags: ["config", "docs"] -showDate: false -showAuthor: false --- Congo is a highly customisable theme and uses some of the latest Hugo features to simplify how it is configured. diff --git a/exampleSite/content/docs/front-matter.md b/exampleSite/content/docs/front-matter.md index f8b1aaaf..61afe22c 100644 --- a/exampleSite/content/docs/front-matter.md +++ b/exampleSite/content/docs/front-matter.md @@ -5,8 +5,6 @@ draft: false description: "All the front matter variables available in Congo." slug: "front-matter" tags: ["front matter", "config", "docs"] -showDate: false -showAuthor: false --- In addition to the [default Hugo front matter parameters](https://gohugo.io/content-management/front-matter/#front-matter-variables), Congo adds a number of additional options to customise the presentation of individual articles. All the available theme parameters are listed below. diff --git a/exampleSite/content/docs/getting-started.md b/exampleSite/content/docs/getting-started.md index 0a41e96f..487b326b 100644 --- a/exampleSite/content/docs/getting-started.md +++ b/exampleSite/content/docs/getting-started.md @@ -5,8 +5,6 @@ draft: false description: "All the front matter variables available in Congo." slug: "getting-started" tags: ["installation", "docs"] -showDate: false -showAuthor: false --- {{< alert >}} diff --git a/exampleSite/content/docs/homepage-layout/index.md b/exampleSite/content/docs/homepage-layout/index.md index 0e84ca41..4b570a90 100644 --- a/exampleSite/content/docs/homepage-layout/index.md +++ b/exampleSite/content/docs/homepage-layout/index.md @@ -5,8 +5,6 @@ draft: false description: "Configuring the homepage layout in the Congo theme." slug: "homepage-layout" tags: ["homepage", "layouts", "docs"] -showDate: false -showAuthor: false --- Congo provides a fully flexible homepage layout. There are two main templates to choose from with additional settings to adjust the design. Alternatively, you can also provide your own template and have complete control over the homepage content. diff --git a/exampleSite/content/docs/installation.md b/exampleSite/content/docs/installation.md index 736c23d8..c5ac0959 100644 --- a/exampleSite/content/docs/installation.md +++ b/exampleSite/content/docs/installation.md @@ -5,8 +5,6 @@ draft: false description: "How to install the Congo theme." slug: "installation" tags: ["installation", "docs"] -showDate: false -showAuthor: false --- Simply follow the standard Hugo [Quick Start](https://gohugo.io/getting-started/quick-start/) procedure to get up and running quickly. diff --git a/exampleSite/content/docs/partials.md b/exampleSite/content/docs/partials.md index 70691199..6f9e3a71 100644 --- a/exampleSite/content/docs/partials.md +++ b/exampleSite/content/docs/partials.md @@ -5,8 +5,6 @@ draft: false description: "All the partials available in Congo." slug: "partials" tags: ["partials", "analytics", "privacy", "comments", "favicons", "icon", "docs"] -showDate: false -showAuthor: false --- ## Analytics diff --git a/exampleSite/content/docs/shortcodes.md b/exampleSite/content/docs/shortcodes.md index a2cf1aeb..e8baa7f8 100644 --- a/exampleSite/content/docs/shortcodes.md +++ b/exampleSite/content/docs/shortcodes.md @@ -5,8 +5,6 @@ draft: false description: "All the shortcodes available in Congo." slug: "shortcodes" tags: ["shortcodes", "mermaid", "icon", "lead", "docs"] -showDate: false -showAuthor: false --- In addition to all the [default Hugo shortcodes](https://gohugo.io/content-management/shortcodes/), Congo adds a few extras for additional functionality. diff --git a/exampleSite/content/samples/_index.md b/exampleSite/content/samples/_index.md index 6c27b5f0..470493b4 100755 --- a/exampleSite/content/samples/_index.md +++ b/exampleSite/content/samples/_index.md @@ -1,6 +1,9 @@ --- title: "Content Samples" description: "See what's possible with Congo." + +cascade: + showEdit: false --- {{< lead >}} From 97e4008329c5d753d69d51c484cc99f17abe1608 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Wed, 25 Aug 2021 16:04:43 +1000 Subject: [PATCH 11/21] =?UTF-8?q?=F0=9F=91=B7=20Update=20Netlify=20build?= =?UTF-8?q?=20commands?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netlify.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netlify.toml b/netlify.toml index e3c2e616..f0cb3aa1 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,5 +1,5 @@ [build] - command = "cd exampleSite && hugo --gc --minify -b $URL" + command = "cd exampleSite && hugo --gc --minify" publish = "exampleSite/public" [build.environment] @@ -11,13 +11,13 @@ HUGO_VERSION = "0.86.1" HUGO_ENV = "production" [context.deploy-preview] -command = "hugo --gc --minify -b $DEPLOY_PRIME_URL" +command = "cd exampleSite && hugo --gc --minify -b $DEPLOY_PRIME_URL" [context.deploy-preview.environment] HUGO_VERSION = "0.86.1" [context.branch-deploy] -command = "hugo --gc --minify -b $DEPLOY_PRIME_URL" +command = "cd exampleSite && hugo --gc --minify -b $DEPLOY_PRIME_URL" [context.branch-deploy.environment] HUGO_VERSION = "0.86.1" From d47a9e615e5a3ce50de34ed4dd6c639a06372792 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Wed, 25 Aug 2021 16:07:20 +1000 Subject: [PATCH 12/21] =?UTF-8?q?=F0=9F=94=A5=20Remove=20baseURL=20from=20?= =?UTF-8?q?exampleSite=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exampleSite/config.toml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 296fd896..a8c65ce3 100755 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -7,7 +7,6 @@ # https://jpanther.github.io/congo/docs/ # -------------------------------------------------------------------------- -baseURL = "https://jpanther.github.io/congo/" theme = "congo" languageCode = "en-AU" defaultContentLanguage = "en" @@ -51,10 +50,10 @@ relativeURLs = true name = "Samples" pageRef = "samples" weight = 20 -# [[menu.main]] -# name = "Users" -# pageRef = "users" -# weight = 30 +[[menu.main]] + name = "Users" + pageRef = "users" + weight = 30 [[menu.main]] name = "GitHub" url = "https://github.com/jpanther/congo" From 589d3fb8a2d56ed7b9e67046e985ece8795d6a4d Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Wed, 25 Aug 2021 16:09:32 +1000 Subject: [PATCH 13/21] =?UTF-8?q?=F0=9F=93=9D=20Add=20jamespanther.com=20t?= =?UTF-8?q?o=20users=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exampleSite/content/users.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/exampleSite/content/users.md b/exampleSite/content/users.md index f060ac37..1c0a3afd 100644 --- a/exampleSite/content/users.md +++ b/exampleSite/content/users.md @@ -8,13 +8,15 @@ tags: ["users"] showDate: false showAuthor: false showReadingTime: false +showEdit: false --- {{< lead >}} Real websites that are built with Congo. {{< /lead >}} -| Website | Details | -| ------- | ------- | +| Website | Details | +| ------------------------------------------------ | ---------------------------- | +| [jamespanther.com](https://www.jamespanther.com) | Personal site - Theme author | **Congo user?** To add your site to this list, [submit a pull request](https://github.com/jpanther/congo/blob/dev/exampleSite/content/users.md). From da03bddb627e58e56fa5ff95f3f427ef378cfc17 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Wed, 25 Aug 2021 16:25:45 +1000 Subject: [PATCH 14/21] =?UTF-8?q?=F0=9F=92=84=20Fix=20recent=20header=20al?= =?UTF-8?q?ignment=20on=20profile=20layout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + assets/css/compiled/main.css | 8 ++++---- layouts/partials/home/profile.html | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddf56515..6c49a484 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Fixed - Missing dark style for group subheadings on article listings - Fathom Analytics script included twice when using custom domain +- Recent heading on homepage profile layout misaligned ## [1.2.0] - 2021-08-22 ### Added diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 44719ad3..bcac1b0c 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -2432,6 +2432,10 @@ body a, body button { color: var(--color-neutral-900); } +.text-neutral-700 { + color: var(--color-neutral-700); +} + .text-neutral-800 { color: var(--color-neutral-800); } @@ -2448,10 +2452,6 @@ body a, body button { color: var(--color-neutral-300); } -.text-neutral-700 { - color: var(--color-neutral-700); -} - .text-primary-400 { color: var(--color-primary-400); } diff --git a/layouts/partials/home/profile.html b/layouts/partials/home/profile.html index d190b0bb..b1e565be 100644 --- a/layouts/partials/home/profile.html +++ b/layouts/partials/home/profile.html @@ -16,6 +16,6 @@
{{ .Content | emojify }}
-
+
{{ partial "recent-articles.html" . }}
From 277fb90325461bb2959c839d87bcab79e147a209 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Wed, 25 Aug 2021 17:07:31 +1000 Subject: [PATCH 15/21] =?UTF-8?q?=F0=9F=91=B7=20Add=20baseURL=20back=20int?= =?UTF-8?q?o=20Netlify=20build=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index f0cb3aa1..3e490f2b 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,5 +1,5 @@ [build] - command = "cd exampleSite && hugo --gc --minify" + command = "cd exampleSite && hugo --gc --minify -b $URL" publish = "exampleSite/public" [build.environment] From f59b50a01bf1fddc0c208fd3c1cc08f6d03ffdcd Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Thu, 26 Aug 2021 08:56:50 +1000 Subject: [PATCH 16/21] =?UTF-8?q?=F0=9F=94=A7=20Update=20npm=20example=20s?= =?UTF-8?q?cript=20to=20specify=20port=208008?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3abb3ebb..460538e2 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "dev": "NODE_ENV=development ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit -w", "build": "NODE_ENV=production ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit", - "example": "hugo server --source exampleSite --themesDir ../.. --buildDrafts" + "example": "hugo server --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost -p 8008" }, "repository": { "type": "git", From 1a69b5fd39990aa1117b91e666bd63d218ea0d64 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Thu, 26 Aug 2021 08:57:05 +1000 Subject: [PATCH 17/21] =?UTF-8?q?=F0=9F=91=B7=20Update=20to=20Hugo=200.87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netlify.toml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/netlify.toml b/netlify.toml index 3e490f2b..55ba4e0c 100644 --- a/netlify.toml +++ b/netlify.toml @@ -5,19 +5,20 @@ [build.environment] HUGO_THEMESDIR = "../.." HUGO_THEME = "repo" +TZ = "Australia/Melbourne" [context.production.environment] -HUGO_VERSION = "0.86.1" +HUGO_VERSION = "0.87" HUGO_ENV = "production" [context.deploy-preview] command = "cd exampleSite && hugo --gc --minify -b $DEPLOY_PRIME_URL" [context.deploy-preview.environment] -HUGO_VERSION = "0.86.1" +HUGO_VERSION = "0.87" [context.branch-deploy] command = "cd exampleSite && hugo --gc --minify -b $DEPLOY_PRIME_URL" [context.branch-deploy.environment] -HUGO_VERSION = "0.86.1" +HUGO_VERSION = "0.87" From f6dceb62333890152610997ce8aa5008073553c5 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Thu, 26 Aug 2021 09:44:41 +1000 Subject: [PATCH 18/21] =?UTF-8?q?=F0=9F=8F=97=EF=B8=8F=20Change=20URLs=20t?= =?UTF-8?q?o=20be=20relative=20instead=20of=20absolute?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +++ exampleSite/config.toml | 1 - layouts/_default/taxonomy.html | 2 +- layouts/partials/article-link.html | 2 +- layouts/partials/article-pagination.html | 4 ++-- layouts/partials/author.html | 2 +- layouts/partials/breadcrumbs.html | 2 +- layouts/partials/head.html | 16 ++++++++-------- layouts/partials/header.html | 4 ++-- layouts/partials/home/profile.html | 2 +- layouts/partials/schema.html | 2 +- layouts/shortcodes/figure.html | 4 +--- package.json | 2 +- 13 files changed, 23 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c49a484..cd7e36ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Fathom Analytics script included twice when using custom domain - Recent heading on homepage profile layout misaligned +### Changed +- URLs are relative by default which allows the theme to be more flexible in different deployment scenarios + ## [1.2.0] - 2021-08-22 ### Added - Multiple colour schemes diff --git a/exampleSite/config.toml b/exampleSite/config.toml index a8c65ce3..aec2100e 100755 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -12,7 +12,6 @@ languageCode = "en-AU" defaultContentLanguage = "en" title = "Congo" enableEmoji = true -relativeURLs = true [author] name = "Congo" diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index 10048652..c01dd486 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -6,7 +6,7 @@

{{ .Page.Title }} {{ if $.Site.Params.taxonomy.showTermCount | default true }} diff --git a/layouts/partials/article-link.html b/layouts/partials/article-link.html index 74678ae1..dd752aee 100644 --- a/layouts/partials/article-link.html +++ b/layouts/partials/article-link.html @@ -17,7 +17,7 @@ {{ else }} {{ .Title }} {{ end }} diff --git a/layouts/partials/article-pagination.html b/layouts/partials/article-pagination.html index 9102afbe..ffab5614 100644 --- a/layouts/partials/article-pagination.html +++ b/layouts/partials/article-pagination.html @@ -5,7 +5,7 @@
{{ if .NextInSection }} - + {{ .NextInSection.Title }} @@ -20,7 +20,7 @@ {{ if .PrevInSection }} - + {{ .PrevInSection.Title }} diff --git a/layouts/partials/author.html b/layouts/partials/author.html index 3b53309c..9dd7a56c 100644 --- a/layouts/partials/author.html +++ b/layouts/partials/author.html @@ -1,7 +1,7 @@ {{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
{{ with .Site.Author.image }} - + {{ end }}
{{ with .Site.Author.name }} diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html index 8a55af49..a844464a 100644 --- a/layouts/partials/breadcrumbs.html +++ b/layouts/partials/breadcrumbs.html @@ -10,7 +10,7 @@
  • {{ .p1.Title }}/
  • diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 64897f7b..70a3b025 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -24,7 +24,7 @@ {{- end }} {{ range .AlternativeOutputFormats -}} - {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ printf `` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} {{ end -}} {{/* Styles */}} {{ $schemeCSS := resources.Get (printf "css/schemes/%s.css" (.Site.Params.colorScheme | default "congo")) }} @@ -35,7 +35,7 @@ {{ $mainCSS := resources.Get "css/compiled/main.css" }} @@ -43,7 +43,7 @@ {{ $customCSS := resources.Get "css/custom.css" }} @@ -52,7 +52,7 @@ {{ end }} @@ -60,10 +60,10 @@ {{ if templates.Exists "partials/favicons.html" }} {{ partialCached "favicons.html" .Site }} {{ else }} - - - - + + + + {{ end }} {{/* Site Verification */}} {{ with .Site.Params.verification.google }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 5f55d897..9b480e7f 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -3,7 +3,7 @@ {{ .Site.Title }}
    @@ -13,7 +13,7 @@
  • {{ .Name }} diff --git a/layouts/partials/home/profile.html b/layouts/partials/home/profile.html index b1e565be..2351880f 100644 --- a/layouts/partials/home/profile.html +++ b/layouts/partials/home/profile.html @@ -5,7 +5,7 @@ >
    {{ with .Site.Author.image }} - + {{ end }}

    {{ .Site.Author.name | default .Site.Title }} diff --git a/layouts/partials/schema.html b/layouts/partials/schema.html index 55fdf6cb..1cab618a 100644 --- a/layouts/partials/schema.html +++ b/layouts/partials/schema.html @@ -4,7 +4,7 @@ "@context": "https://schema.org", "@type": "WebSite", "name": "{{ .Site.Title | safeJS }}", - "url": "{{ .Site.BaseURL | safeURL }}", + "url": "{{ (site.GetPage "/").Permalink | safeURL }}", "description": "{{ .Site.Params.description | safeJS }}" } diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index ac0f6ab2..b9476a83 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -4,7 +4,7 @@ {{- if .Get "link" -}} {{- end -}} - {{ with .Get {{ end }} - - diff --git a/package.json b/package.json index 460538e2..cd0dcb8d 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "dev": "NODE_ENV=development ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit -w", "build": "NODE_ENV=production ./node_modules/tailwindcss/lib/cli.js -i ./assets/css/main.css -o ./assets/css/compiled/main.css --jit", - "example": "hugo server --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost -p 8008" + "example": "hugo server --source exampleSite --themesDir ../.. --buildDrafts -b http://localhost/congo/ -p 8008" }, "repository": { "type": "git", From efc317e61203250cd0ee8359d039b4693cc8f6d2 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Thu, 26 Aug 2021 09:48:08 +1000 Subject: [PATCH 19/21] =?UTF-8?q?=F0=9F=92=9A=20Fix=20Hugo=20version=20str?= =?UTF-8?q?ing=20in=20Netlify=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netlify.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netlify.toml b/netlify.toml index 55ba4e0c..ca6a7a1f 100644 --- a/netlify.toml +++ b/netlify.toml @@ -8,17 +8,17 @@ HUGO_THEME = "repo" TZ = "Australia/Melbourne" [context.production.environment] -HUGO_VERSION = "0.87" +HUGO_VERSION = "0.87.0" HUGO_ENV = "production" [context.deploy-preview] command = "cd exampleSite && hugo --gc --minify -b $DEPLOY_PRIME_URL" [context.deploy-preview.environment] -HUGO_VERSION = "0.87" +HUGO_VERSION = "0.87.0" [context.branch-deploy] command = "cd exampleSite && hugo --gc --minify -b $DEPLOY_PRIME_URL" [context.branch-deploy.environment] -HUGO_VERSION = "0.87" +HUGO_VERSION = "0.87.0" From 37e8a8bc91163cf691f708eb9594a5d24e75a815 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Thu, 26 Aug 2021 10:07:37 +1000 Subject: [PATCH 20/21] =?UTF-8?q?=E2=9C=A8=20Add=20`robots`=20parameters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 9 ++++++--- config/_default/params.toml | 1 + exampleSite/content/docs/configuration.md | 1 + exampleSite/content/docs/front-matter.md | 1 + layouts/partials/head.html | 6 ++++++ 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd7e36ca..61a9a80f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,14 +4,17 @@ All notable changes to Congo will be documented in this file. Things that need a The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- New `robots` parameter to add metadata to guide robots on how to handle specific content + +### Changed +- URLs are relative by default which allows the theme to be more flexible in different deployment scenarios + ### Fixed - Missing dark style for group subheadings on article listings - Fathom Analytics script included twice when using custom domain - Recent heading on homepage profile layout misaligned -### Changed -- URLs are relative by default which allows the theme to be more flexible in different deployment scenarios - ## [1.2.0] - 2021-08-22 ### Added - Multiple colour schemes diff --git a/config/_default/params.toml b/config/_default/params.toml index cf5abc36..e660ba28 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -8,6 +8,7 @@ colorScheme = "congo" # description = "My awesome website" # mainSections = ["section1", "section2"] +# robots = "" [homepage] layout = "page" # valid options: page, profile, custom diff --git a/exampleSite/content/docs/configuration.md b/exampleSite/content/docs/configuration.md index c2d3bf73..38c16468 100644 --- a/exampleSite/content/docs/configuration.md +++ b/exampleSite/content/docs/configuration.md @@ -57,6 +57,7 @@ Many of the article defaults here can be overridden on a per article basis by sp |`colorScheme`|string|`"congo"`|The theme colour scheme to use. Valid values are `congo` (default), `avocado`, `ocean` and `fire`.| |`description`|string|_Not set_|The description of the website for metadata purposes.| |`mainSections`|array of strings|_Not set_|The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used.| +|`robots`|string|_Not set_|String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values.| |`homepage.layout`|string|`"page"`|The layout of the homepage. Valid values are `page`, `profile` or `custom`. When set to `custom`, you must provide your own layout by creating a `/layouts/partials/home/custom.html` file. Refer to the [Homepage Layout]({{< ref "homepage-layout" >}}) section for more details.| |`homepage.showRecent`|boolean|`false`|Whether or not to display the recent articles list on the homepage.| |`article.showDate`|boolean|`true`|Whether or not article dates are displayed.| diff --git a/exampleSite/content/docs/front-matter.md b/exampleSite/content/docs/front-matter.md index 61afe22c..334bd682 100644 --- a/exampleSite/content/docs/front-matter.md +++ b/exampleSite/content/docs/front-matter.md @@ -20,6 +20,7 @@ Front matter parameter default values are inherited from the theme's [base confi |`showEdit`|boolean|`article.showEdit`|Whether or not the link to edit the article content should be displayed.| |`editURL`|string|`article.editURL`|When `showEdit` is active, the URL for the edit link.| |`editAppendPath`|boolean|`article.editAppendPath`|When `showEdit` is active, whether or not the path to the current article should be appended to the URL set at `editURL`.| +|`robots`|string|_Not set_|String that indicates how robots should handle this article. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values.| |`showHeadingAnchors`|boolean|`article.showHeadingAnchors`|Whether or not heading anchor links are displayed alongside headings within this article.| |`showPagination`|boolean|`article.showPagination`|Whether or not the next/previous article links are displayed in the article footer.| |`showReadingTime`|boolean|`article.showReadingTime`|Whether or not article reading times are displayed.| diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 70a3b025..e5efb215 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -22,6 +22,12 @@ {{ with .Site.Params.keywords -}} {{- end }} + {{ with .Site.Params.robots }} + + {{ end }} + {{ with .Params.robots }} + + {{ end }} {{ range .AlternativeOutputFormats -}} {{ printf `` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} From 4eb4ae4493089884ced8a37f92ea0c14d3c6fbbe Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Thu, 26 Aug 2021 10:18:35 +1000 Subject: [PATCH 21/21] =?UTF-8?q?=F0=9F=94=A8=20Preparing=20release=20v1.2?= =?UTF-8?q?.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 22 +++++++++++++++++++++- assets/css/compiled/main.css | 2 +- assets/css/main.css | 2 +- package.json | 2 +- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61a9a80f..9af42982 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,22 +1,31 @@ # Changelog + All notable changes to Congo will be documented in this file. Things that need attention when upgrading from a prior version are marked ⚠️. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [1.2.1] - 2021-08-26 + ### Added + - New `robots` parameter to add metadata to guide robots on how to handle specific content ### Changed + - URLs are relative by default which allows the theme to be more flexible in different deployment scenarios ### Fixed + - Missing dark style for group subheadings on article listings - Fathom Analytics script included twice when using custom domain - Recent heading on homepage profile layout misaligned ## [1.2.0] - 2021-08-22 + ### Added + - Multiple colour schemes - Edit links on article pages - Icons for Foursquare and Pinterest @@ -24,9 +33,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - CSS minification for custom stylesheets ### Changed + - Static assets are now managed through Hugo Pipelines ### Fixed + - Minor style issue with `button` shortcode - Hugo Modules would fail when using default theme config file - Some content not centred correctly on the profile homepage layout @@ -34,11 +45,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - `externalUrl` front matter not working on some list pages ## [1.1.1] - 2020-08-19 + ### Fixed + - Hotfix for exampleSite and GitHub configuration ## [1.1.0] - 2020-08-18 + ### Added + - Breadcrumbs - i18n support - Recent articles partial @@ -47,16 +62,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - JSON-LD structured metadata ### Changed + - ⚠️ Renamed parameter: `homepage.showList` -> `homepage.showRecent` - ⚠️ Renamed parameter: `homepage.listSections` -> `mainSections` - ⚠️ Consolidated author configuration parameters into `config.toml` - General style tweaks to enhance design consistency ### Fixed + - URLs being incorrect in some cases when the site is deployed in a subfolder ## [1.0.0] - 2020-08-16 + ### Added + - Built with Tailwind CSS JIT for minified stylesheets without any excess code - Fully responsive layout - Dark mode (auto-switching based upon browser) @@ -76,7 +95,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Advanced customisation using simple Tailwind colour definitions and styles - Fully documented -[Unreleased]: https://github.com/jpanther/Congo/compare/v1.2.0...HEAD +[unreleased]: https://github.com/jpanther/Congo/compare/v1.2.1...HEAD +[1.2.1]: https://github.com/jpanther/Congo/compare/v1.2.0...v1.2.1 [1.2.0]: https://github.com/jpanther/Congo/compare/v1.1.1...v1.2.0 [1.1.1]: https://github.com/jpanther/congo/compare/v1.1.0...v1.1.1 [1.1.0]: https://github.com/jpanther/congo/compare/v1.0.0...v1.1.0 diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index bcac1b0c..2a4889f2 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -1,4 +1,4 @@ -/*! Congo v1.2.0 | MIT License | https://github.com/jpanther/congo */ +/*! Congo v1.2.1 | MIT License | https://github.com/jpanther/congo */ /*! tailwindcss v2.2.7 | MIT License | https://tailwindcss.com */ diff --git a/assets/css/main.css b/assets/css/main.css index 53a25cae..0d4a7c28 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -1,4 +1,4 @@ -/*! Congo v1.2.0 | MIT License | https://github.com/jpanther/congo */ +/*! Congo v1.2.1 | MIT License | https://github.com/jpanther/congo */ @tailwind base; @tailwind components; diff --git a/package.json b/package.json index cd0dcb8d..3a2de271 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hugo-congo-theme", - "version": "v1.2.0", + "version": "1.2.1", "description": "Congo theme for Hugo", "main": "index.js", "scripts": {