🔖 Release v1.2.1

pull/155/head v1.2.1
James Panther 2021-08-26 10:18:40 +10:00
commit 9087f7d9eb
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
32 changed files with 120 additions and 78 deletions

View File

@ -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

View File

@ -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);
}

View File

@ -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;

View File

@ -8,6 +8,7 @@
colorScheme = "congo"
# description = "My awesome website"
# mainSections = ["section1", "section2"]
# robots = ""
[homepage]
layout = "page" # valid options: page, profile, custom

View File

@ -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"

View File

@ -22,8 +22,8 @@ A simple, lightweight theme for Hugo built with Tailwind CSS.
</span>
</div>
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)." >}}

View File

@ -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.
---

View File

@ -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.

View File

@ -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.
<!-- prettier-ignore-start -->
|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.|

View File

@ -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.
<!-- prettier-ignore-start -->
|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.|

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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._

View File

@ -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).

View File

@ -4,7 +4,9 @@
<section>
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
{{ if $.Site.Params.list.groupByYear }}
<h2 class="mt-12 text-2xl font-bold first:mt-8 text-neutral-800">{{ .Key }}</h2>
<h2 class="mt-12 text-2xl font-bold first:mt-8 text-neutral-700 dark:text-neutral-300">
{{ .Key }}
</h2>
<hr class="border-dotted border-neutral-400 w-36" />
{{ end }}
{{ range .Pages }}

View File

@ -6,7 +6,7 @@
<h2>
<a
class="text-xl font-medium hover:underline hover:underline-primary-500 hover:underline-offset-small"
href="{{ .Page.Permalink }}"
href="{{ .Page.RelPermalink }}"
>{{ .Page.Title }}</a
>
{{ if $.Site.Params.taxonomy.showTermCount | default true }}

View File

@ -2,8 +2,9 @@
{{ with .Site.Params.fathomAnalytics.site }}
{{ if isset $.Site.Params.fathomanalytics "domain" }}
<script src="https://{{ $.Site.Params.fathomanalytics.domain }}/script.js" data-site="{{ . }}" defer></script>
{{ else }}
<script src="https://cdn.usefathom.com/script.js" data-site="{{ . }}" defer></script>
{{ end }}
<script src="https://cdn.usefathom.com/script.js" data-site="{{ . }}" defer></script>
{{ end }}
{{ template "_internal/google_analytics.html" . }}
{{ end }}

View File

@ -17,7 +17,7 @@
{{ else }}
<a
class="hover:underline hover:underline-primary-500 hover:underline-offset-small text-neutral-800 dark:text-neutral"
href="{{ .Permalink }}"
href="{{ .RelPermalink }}"
>{{ .Title }}</a
>
{{ end }}

View File

@ -5,7 +5,7 @@
<div class="flex justify-between pt-3">
<span>
{{ if .NextInSection }}
<a class="flex" href="{{ .NextInSection.Permalink }}">
<a class="flex" href="{{ .NextInSection.RelPermalink }}">
<span class="mr-3 article-pagination-direction">&larr;</span>
<span class="flex flex-col">
<span class="article-pagination-title">{{ .NextInSection.Title }}</span>
@ -20,7 +20,7 @@
</span>
<span>
{{ if .PrevInSection }}
<a class="flex text-right" href="{{ .PrevInSection.Permalink }}">
<a class="flex text-right" href="{{ .PrevInSection.RelPermalink }}">
<span class="flex flex-col">
<span class="article-pagination-title">{{ .PrevInSection.Title }}</span>
<span class="-mt-1 text-xs text-neutral-400 dark:text-neutral-500">

View File

@ -1,7 +1,7 @@
{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
<div class="flex items-center">
{{ with .Site.Author.image }}
<img class="w-24 h-24 !mt-0 !mb-0 mr-4 rounded-full" src="{{ . | absURL }}" />
<img class="w-24 h-24 !mt-0 !mb-0 mr-4 rounded-full" src="{{ . | relURL }}" />
{{ end }}
<div>
{{ with .Site.Author.name }}

View File

@ -10,7 +10,7 @@
<li class="inline {{ if or (eq .p1 .p2) (.p1.IsHome) }}hidden{{ end }}">
<a
class="hover:underline hover:underline-neutral-300 dark:underline-neutral-600"
href="{{ .p1.Permalink }}"
href="{{ .p1.RelPermalink }}"
>{{ .p1.Title }}</a
><span class="px-1 text-primary-500">/</span>
</li>

View File

@ -22,9 +22,15 @@
{{ with .Site.Params.keywords -}}
<meta name="keywords" content="{{ . }}" />
{{- end }}
{{ with .Site.Params.robots }}
<meta name="robots" content="{{ . }}" />
{{ end }}
{{ with .Params.robots }}
<meta name="robots" content="{{ . }}" />
{{ end }}
<link rel="canonical" href="{{ .Permalink }}" />
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .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 @@
<link
type="text/css"
rel="stylesheet"
href="{{ $schemeStyles.Permalink }}"
href="{{ $schemeStyles.RelPermalink }}"
integrity="{{ $schemeStyles.Data.Integrity }}"
/>
{{ $mainCSS := resources.Get "css/compiled/main.css" }}
@ -43,7 +49,7 @@
<link
type="text/css"
rel="stylesheet"
href="{{ $mainStyles.Permalink }}"
href="{{ $mainStyles.RelPermalink }}"
integrity="{{ $mainStyles.Data.Integrity }}"
/>
{{ $customCSS := resources.Get "css/custom.css" }}
@ -52,7 +58,7 @@
<link
type="text/css"
rel="stylesheet"
href="{{ $customStyles.Permalink }}"
href="{{ $customStyles.RelPermalink }}"
integrity="{{ $customStyles.Data.Integrity }}"
/>
{{ end }}
@ -60,10 +66,10 @@
{{ if templates.Exists "partials/favicons.html" }}
{{ partialCached "favicons.html" .Site }}
{{ else }}
<link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | absURL }}" />
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | absURL }}" />
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | absURL }}" />
<link rel="manifest" href="{{ "site.webmanifest" | absURL }}" />
<link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | relURL }}" />
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | relURL }}" />
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | relURL }}" />
<link rel="manifest" href="{{ "site.webmanifest" | relURL }}" />
{{ end }}
{{/* Site Verification */}}
{{ with .Site.Params.verification.google }}

View File

@ -3,7 +3,7 @@
<a
class="hover:underline hover:underline-primary-500 hover:underline-thickness-bold hover:underline-offset-small"
rel="me"
href="{{ .Site.BaseURL }}"
href="{{ "/" | relURL }}"
>{{ .Site.Title }}</a
>
</div>
@ -13,7 +13,7 @@
<li class="mb-1 text-right sm:mb-0 sm:mr-7 sm:last:mr-0">
<a
class="hover:underline hover:underline-primary-500 hover:underline-thickness-bold hover:underline-offset-small"
href="{{ .URL | absURL }}"
href="{{ .URL }}"
title="{{ .Title }}"
>{{ .Name }}</a
>

View File

@ -5,7 +5,7 @@
>
<header class="flex flex-col items-center mb-3">
{{ with .Site.Author.image }}
<img class="mb-2 rounded-full w-36 h-36" src="{{ . | absURL }}" />
<img class="mb-2 rounded-full w-36 h-36" src="{{ . | relURL }}" />
{{ end }}
<h1 class="text-4xl font-extrabold">
{{ .Site.Author.name | default .Site.Title }}
@ -16,6 +16,6 @@
</header>
<section class="prose dark:prose-light">{{ .Content | emojify }}</section>
</article>
<section class="text-center">
<section>
{{ partial "recent-articles.html" . }}
</section>

View File

@ -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 }}"
}
</script>

View File

@ -4,7 +4,7 @@
{{- if .Get "link" -}}
<a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}>
{{- end -}}
<img src="{{ $image.Permalink }}"
<img src="{{ $image.RelPermalink }}"
{{- if or (.Get "alt") (.Get "caption") }}
alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify | plainify }}{{ end }}"
{{- end -}}
@ -25,5 +25,3 @@
{{- end }}
</figure>
{{ end }}

24
netlify.toml 100644
View File

@ -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"

View File

@ -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",

View File

@ -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