diff --git a/CHANGELOG.md b/CHANGELOG.md index e6726ec2..9af42982 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [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 @@ -79,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 44719ad3..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 */ @@ -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/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/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/config.toml b/exampleSite/config.toml index 296fd896..aec2100e 100755 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -7,13 +7,11 @@ # https://jpanther.github.io/congo/docs/ # -------------------------------------------------------------------------- -baseURL = "https://jpanther.github.io/congo/" theme = "congo" languageCode = "en-AU" defaultContentLanguage = "en" title = "Congo" enableEmoji = true -relativeURLs = true [author] name = "Congo" @@ -51,10 +49,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" 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..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 >}} @@ -9,6 +13,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/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 183e7898..38c16468 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. @@ -18,7 +16,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 +49,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 +57,8 @@ 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.| +|`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.| |`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 +76,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..334bd682 100644 --- a/exampleSite/content/docs/front-matter.md +++ b/exampleSite/content/docs/front-matter.md @@ -5,13 +5,11 @@ 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. -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| @@ -22,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/exampleSite/content/docs/getting-started.md b/exampleSite/content/docs/getting-started.md index 9ddc2d7f..487b326b 100644 --- a/exampleSite/content/docs/getting-started.md +++ b/exampleSite/content/docs/getting-started.md @@ -5,12 +5,10 @@ draft: false description: "All the front matter variables available in Congo." slug: "getting-started" tags: ["installation", "docs"] -showDate: false -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 +32,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 +66,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/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 d126358c..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 @@ -66,7 +64,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 +80,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..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. @@ -75,7 +73,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..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 >}} @@ -9,7 +12,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._ 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). 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 }} 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/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 }} 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..e5efb215 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -22,9 +22,15 @@ {{ with .Site.Params.keywords -}} {{- end }} + {{ with .Site.Params.robots }} + + {{ end }} + {{ with .Params.robots }} + + {{ 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 +41,7 @@ {{ $mainCSS := resources.Get "css/compiled/main.css" }} @@ -43,7 +49,7 @@ {{ $customCSS := resources.Get "css/custom.css" }} @@ -52,7 +58,7 @@ {{ end }} @@ -60,10 +66,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 d190b0bb..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 }} @@ -16,6 +16,6 @@

    {{ .Content | emojify }}
    -
    +
    {{ partial "recent-articles.html" . }}
    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/netlify.toml b/netlify.toml new file mode 100644 index 00000000..ca6a7a1f --- /dev/null +++ b/netlify.toml @@ -0,0 +1,24 @@ +[build] + command = "cd exampleSite && hugo --gc --minify -b $URL" + publish = "exampleSite/public" + +[build.environment] +HUGO_THEMESDIR = "../.." +HUGO_THEME = "repo" +TZ = "Australia/Melbourne" + +[context.production.environment] +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.0" + +[context.branch-deploy] +command = "cd exampleSite && hugo --gc --minify -b $DEPLOY_PRIME_URL" + +[context.branch-deploy.environment] +HUGO_VERSION = "0.87.0" diff --git a/package.json b/package.json index 3abb3ebb..3a2de271 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "name": "hugo-congo-theme", - "version": "v1.2.0", + "version": "1.2.1", "description": "Congo theme for Hugo", "main": "index.js", "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/congo/ -p 8008" }, "repository": { "type": "git", 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