Merge branch 'jpanther:dev' into lazy-load-image-by-default

pull/552/head
Tomy Hsieh 2023-05-27 05:17:50 +08:00 committed by GitHub
commit 159aaae1e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 3315 additions and 1550 deletions

View File

@ -6,24 +6,34 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased] ## [Unreleased]
## [2.6.0] - 2023-05-25
### Added ### Added
- Support for Hugo v0.112.0
- Ability to specify an alternate logo image when dark appearance is active ([#533](https://github.com/jpanther/congo/pull/533), [#543](https://github.com/jpanther/congo/pull/543))
- Ability to specify the hashing algorithm that is used when fingerprinting assets ([#478](https://github.com/jpanther/congo/issues/478))
- Arabic translation ([#521](https://github.com/jpanther/congo/pull/521)) - Arabic translation ([#521](https://github.com/jpanther/congo/pull/521))
- Slovak translation ([#541](https://github.com/jpanther/congo/pull/541)) - Slovak translation ([#541](https://github.com/jpanther/congo/pull/541))
- Czech translation ([#541](https://github.com/jpanther/congo/pull/541)) - Czech translation ([#541](https://github.com/jpanther/congo/pull/541))
### Changed ### Changed
- ⚠️ Some parameters in the root of the Languages config file have been nested under the `params` block
- Search results now respect `showDate` value when displaying article metadata ([#511](https://github.com/jpanther/congo/pull/511)) - Search results now respect `showDate` value when displaying article metadata ([#511](https://github.com/jpanther/congo/pull/511))
- Adopted new Tailwind logical properties for RTL styling - Adopted new Tailwind logical properties for RTL styling
- Article sharing links now open in a new tab/window
- Updated Dutch translation ([#544](https://github.com/jpanther/congo/pull/544)) - Updated Dutch translation ([#544](https://github.com/jpanther/congo/pull/544))
- Upgrade to Tailwind v3.3.1 ([#523](https://github.com/jpanther/congo/pull/523)) - Upgrade to Tailwind v3.3.1 ([#523](https://github.com/jpanther/congo/pull/523))
- Upgrade to KaTeX v0.16.6 ([#538](https://github.com/jpanther/congo/pull/538)) - Upgrade to KaTeX v0.16.7 ([#538](https://github.com/jpanther/congo/pull/538), [#549](https://github.com/jpanther/congo/pull/549))
- Upgrade to Mermaid v9.4.3 - Upgrade to Chart.js v4.3.0 ([#551](https://github.com/jpanther/congo/pull/551))
- Upgrade to Mermaid v10.2.0 ([#563](https://github.com/jpanther/congo/pull/563))
### Fixed ### Fixed
- Some `srcset` values are broken when using Hugo `--minify` option ([#508](https://github.com/jpanther/congo/pull/508)) - Some `srcset` values are broken when using Hugo `--minify` option ([#508](https://github.com/jpanther/congo/pull/508))
- Author images are cropped off-centre during image processing ([#527](https://github.com/jpanther/congo/pull/527))
- Site doesn't build when using Hugo v0.112.0 ([#561](https://github.com/jpanther/congo/pull/561))
## [2.5.4] - 2023-03-20 ## [2.5.4] - 2023-03-20
@ -678,7 +688,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 - Advanced customisation using simple Tailwind colour definitions and styles
- Fully documented - Fully documented
[Unreleased]: https://github.com/jpanther/congo/compare/v2.5.4...HEAD [Unreleased]: https://github.com/jpanther/congo/compare/v2.6.0...HEAD
[2.6.0]: https://github.com/jpanther/congo/compare/v2.5.4...v2.6.0
[2.5.4]: https://github.com/jpanther/congo/compare/v2.5.3...v2.5.4 [2.5.4]: https://github.com/jpanther/congo/compare/v2.5.3...v2.5.4
[2.5.3]: https://github.com/jpanther/congo/compare/v2.5.2...v2.5.3 [2.5.3]: https://github.com/jpanther/congo/compare/v2.5.2...v2.5.3
[2.5.2]: https://github.com/jpanther/congo/compare/v2.5.1...v2.5.2 [2.5.2]: https://github.com/jpanther/congo/compare/v2.5.1...v2.5.2

View File

@ -1,4 +1,4 @@
/*! Congo v2.5.4 | MIT License | https://github.com/jpanther/congo */ /*! Congo v2.6.0 | MIT License | https://github.com/jpanther/congo */
/*! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com */ /*! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com */

View File

@ -1,4 +1,4 @@
/*! Congo v2.5.4 | MIT License | https://github.com/jpanther/congo */ /*! Congo v2.6.0 | MIT License | https://github.com/jpanther/congo */
@tailwind base; @tailwind base;
@tailwind components; @tailwind components;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,18 +1,19 @@
languageCode = "en" languageCode = "en"
languageName = "English" languageName = "English"
displayName = "EN"
isoCode = "en"
weight = 1 weight = 1
rtl = false
title = "Congo" title = "Congo"
# description = "My awesome website"
# copyright = "Copy, _right?_ :thinking_face:" # copyright = "Copy, _right?_ :thinking_face:"
dateFormat = "2 January 2006"
[params] [params]
isoCode = "en"
displayName = "EN"
rtl = false
dateFormat = "2 January 2006"
# mainSections = ["section1", "section2"] # mainSections = ["section1", "section2"]
# description = "My awesome website"
[author] [author]
# name = "Your name here" # name = "Your name here"

View File

@ -13,10 +13,12 @@ enableSearch = false
enableCodeCopy = false enableCodeCopy = false
# robots = "" # robots = ""
fingerprintAlgorithm = "sha256"
[header] [header]
layout = "basic" # valid options: basic, hamburger, hybrid, custom layout = "basic" # valid options: basic, hamburger, hybrid, custom
# logo = "img/logo.jpg" # logo = "img/logo.jpg"
# logoDark = "img/dark-logo.jpg"
showTitle = true showTitle = true
[footer] [footer]

View File

@ -1,18 +1,19 @@
languageCode = "en-au" languageCode = "en-au"
languageName = "English (Australia)" languageName = "English (Australia)"
displayName = ":flag-au:"
isoCode = "en-AU"
weight = 1 weight = 1
rtl = false
title = "Congo" title = "Congo"
description = "A powerful, lightweight theme for Hugo built with Tailwind CSS."
copyright = "© 2023 Congo contributors" copyright = "© 2023 Congo contributors"
dateFormat = "2 January 2006"
[params] [params]
isoCode = "en-AU"
displayName = ":flag-au:"
rtl = false
dateFormat = "2 January 2006"
mainSections = ["samples"] mainSections = ["samples"]
description = "A powerful, lightweight theme for Hugo built with Tailwind CSS."
[author] [author]
name = "Congo" name = "Congo"

View File

@ -13,10 +13,12 @@ enableSearch = true
enableCodeCopy = true enableCodeCopy = true
# robots = "" # robots = ""
fingerprintAlgorithm = "sha256"
[header] [header]
layout = "basic" # valid options: basic, hamburger, hybrid, custom layout = "basic" # valid options: basic, hamburger, hybrid, custom
# logo = "img/logo.jpg" # logo = "img/logo.jpg"
# logoDark = "img/dark-logo.jpg"
showTitle = true showTitle = true
[footer] [footer]

View File

@ -89,17 +89,17 @@ The default file can be used as a template to create additional languages, or re
<!-- prettier-ignore-start --> <!-- prettier-ignore-start -->
|Name|Default|Description| |Name|Default|Description|
|---|---|---| |---|---|---|
|`languageCode`|`"en"`|The Hugo language code for this file. It can be a top-level language (ie. `en`) or a sub-variant (ie. `en-au`) and should match the language code in the filename. Hugo expects this value to always be in lowercase. For proper HTML compliance, set the `isoCode` parameter which is case-sensitive.| |`languageCode`|`"en"`|The Hugo language code for this file. It can be a top-level language (ie. `en`) or a sub-variant (ie. `en-au`) and should match the language code in the filename. Hugo expects this value to always be in lowercase. For proper HTML compliance, set the `params.isoCode` parameter which is case-sensitive.|
|`languageName`|`"English"`|The name of the language.| |`languageName`|`"English"`|The name of the language.|
|`displayName`|`"EN"`|The name used when the language appears on the website.|
|`isoCode`|`"en"`|The ISO language code for HTML metadata purposes. It can be a top-level language (ie. `en`) or a sub-variant (ie. `en-AU`).|
|`weight`|`1`|The weight determines the order of languages when building multilingual sites.| |`weight`|`1`|The weight determines the order of languages when building multilingual sites.|
|`rtl`|`false`|Whether or not this is a RTL language. Set to `true` to reflow content from right-to-left. Congo fully supports using RTL and LTR languages at the same time and will dynamically adjust to both.|
|`title`|`"Congo"`|The title of the website. This will be displayed in the site header and footer.| |`title`|`"Congo"`|The title of the website. This will be displayed in the site header and footer.|
|`description`|_Not set_|The website description. This will be used in the site metadata.|
|`copyright`|_Not set_|A Markdown string containing the copyright message to be displayed in the site footer. If none is provided, Congo will automatically generate a copyright string using the site `title`.| |`copyright`|_Not set_|A Markdown string containing the copyright message to be displayed in the site footer. If none is provided, Congo will automatically generate a copyright string using the site `title`.|
|`dateFormat`|`"2 January 2006"`|How dates are formatted in this language. Refer to the [Hugo docs](https://gohugo.io/functions/format/#gos-layout-string) for acceptable formats.| |`params.isoCode`|`"en"`|The ISO language code for HTML metadata purposes. It can be a top-level language (ie. `en`) or a sub-variant (ie. `en-AU`).|
|`params.displayName`|`"EN"`|The name used when the language appears on the website.|
|`params.rtl`|`false`|Whether or not this is a RTL language. Set to `true` to reflow content from right-to-left. Congo fully supports using RTL and LTR languages at the same time and will dynamically adjust to both.|
|`params.dateFormat`|`"2 January 2006"`|How dates are formatted in this language. Refer to the [Hugo docs](https://gohugo.io/functions/format/#gos-layout-string) for acceptable formats.|
|`params.mainSections`|_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.| |`params.mainSections`|_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.|
|`params.description`|_Not set_|The website description. This will be used in the site metadata.|
|`author.name`|_Not set_|The author's name. This will be displayed in article footers, and on the homepage when the profile layout is used.| |`author.name`|_Not set_|The author's name. This will be displayed in article footers, and on the homepage when the profile layout is used.|
|`author.image`|_Not set_|Path to the image file of the author. The image should be a 1:1 aspect ratio and placed in the site's `assets/` folder.| |`author.image`|_Not set_|Path to the image file of the author. The image should be a 1:1 aspect ratio and placed in the site's `assets/` folder.|
|`author.headline`|_Not set_|A Markdown string containing the author's headline. It will be displayed on the profile homepage under the author's name.| |`author.headline`|_Not set_|A Markdown string containing the author's headline. It will be displayed on the profile homepage under the author's name.|
@ -130,8 +130,10 @@ Many of the article defaults here can be overridden on a per article basis by sp
|`enableSearch`|`false`|Whether site search is enabled. Set to `true` to enable search functionality. Note that the search feature depends on the `outputs.home` setting in the [site configuration](#site-configuration) being set correctly.| |`enableSearch`|`false`|Whether site search is enabled. Set to `true` to enable search functionality. Note that the search feature depends on the `outputs.home` setting in the [site configuration](#site-configuration) being set correctly.|
|`enableCodeCopy`|`false`|Whether copy-to-clipboard buttons are enabled for `<code>` blocks. The `highlight.noClasses` parameter must be set to `false` for code copy to function correctly. Read more about [other configuration files](#other-configuration-files) below.| |`enableCodeCopy`|`false`|Whether copy-to-clipboard buttons are enabled for `<code>` blocks. The `highlight.noClasses` parameter must be set to `false` for code copy to function correctly. Read more about [other configuration files](#other-configuration-files) below.|
|`robots`|_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.| |`robots`|_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.|
|`fingerprintAlgorithm`|`"sha256"`|String that indicates which hashing algorithm is used when fingerprinting assets. Valid options include `md5`, `sha256`, `sha384` and `sha512`.|
|`header.layout`|`"basic"`|The layout of the page header and menu. Valid values are `basic`, `hamburger`, `hybrid` or `custom`. When set to `custom`, you must provide your own layout by creating a `/layouts/partials/header/custom.html` file.| |`header.layout`|`"basic"`|The layout of the page header and menu. Valid values are `basic`, `hamburger`, `hybrid` or `custom`. When set to `custom`, you must provide your own layout by creating a `/layouts/partials/header/custom.html` file.|
|`header.logo`|_Not set_|The relative path to the site logo file within the `assets/` folder. The logo file should be provided at 2x resolution and supports any image dimensions.| |`header.logo`|_Not set_|The relative path to the site logo file within the `assets/` folder. The logo file should be provided at 2x resolution and supports any image dimensions.|
|`header.logoDark`|_Not set_|As per the `header.logo` parameter, however this image is used whenever dark mode is active.|
|`header.showTitle`|`true`|Whether the site title is displayed in the header.| |`header.showTitle`|`true`|Whether the site title is displayed in the header.|
|`footer.showCopyright`|`true`|Whether or not to show the copyright string in the site footer. Note that the string itself can be customised using the `copyright` parameter in the [languages configuration](#language-and-i18n).| |`footer.showCopyright`|`true`|Whether or not to show the copyright string in the site footer. Note that the string itself can be customised using the `copyright` parameter in the [languages configuration](#language-and-i18n).|
|`footer.showThemeAttribution`|`true`|Whether or not to show the "powered by" theme attribution in the site footer. If you choose to disable this message, please consider attributing the theme somewhere else on your site (for example, on your about page).| |`footer.showThemeAttribution`|`true`|Whether or not to show the "powered by" theme attribution in the site footer. If you choose to disable this message, please consider attributing the theme somewhere else on your site (for example, on your about page).|

View File

@ -96,15 +96,15 @@ Then in the root of your site repository, create a `netlify.toml` file:
[build.environment] [build.environment]
NODE_ENV = "production" NODE_ENV = "production"
GO_VERSION = "1.19" GO_VERSION = "1.20"
TZ = "UTC" # Set to preferred timezone TZ = "UTC" # Set to preferred timezone
[context.production.environment] [context.production.environment]
HUGO_VERSION = "0.110.0" HUGO_VERSION = "0.112.3"
HUGO_ENV = "production" HUGO_ENV = "production"
[context.deploy-preview.environment] [context.deploy-preview.environment]
HUGO_VERSION = "0.110.0" HUGO_VERSION = "0.112.3"
``` ```
This configuration assumes you are deploying Congo as a Hugo module. If you have installed the theme using another method, change the build command to simply `hugo --gc --minify -b $URL`. This configuration assumes you are deploying Congo as a Hugo module. If you have installed the theme using another method, change the build command to simply `hugo --gc --minify -b $URL`.

View File

@ -17,51 +17,53 @@ Real websites that have been built using Congo.
The list below is just a handful of the websites that are built using the Congo theme. Check them out to discover some great exampels of what the theme can do. The list below is just a handful of the websites that are built using the Congo theme. Check them out to discover some great exampels of what the theme can do.
| Website | Details | | Website | Details |
| ---------------------------------------------------------------------- | ----------------------------- | | ---------------------------------------------------------------------- | ------------------------------- |
| [jamespanther.com](https://jamespanther.com) | Personal site - Theme author | | [jamespanther.com](https://jamespanther.com) | Personal site - Theme author |
| [antoinesoetewey.com](https://antoinesoetewey.com/) | Personal site | | [antoinesoetewey.com](https://antoinesoetewey.com/) | Personal site |
| [leif.io](https://leif.io/) | Personal site and Tech blog | | [leif.io](https://leif.io/) | Personal site and Tech blog |
| [dr460nf1r3.org](https://dr460nf1r3.org/) | Personal site and Blog | | [dr460nf1r3.org](https://dr460nf1r3.org/) | Personal site and Blog |
| [OCram85.com](https://ocram85.com) | Personal site and Blog | | [OCram85.com](https://ocram85.com) | Personal site and Blog |
| [mackiser.github.io](https://mackiser.github.io) | Personal site and Blog | | [mackiser.github.io](https://mackiser.github.io) | Personal site and Blog |
| [jamesmillner.dev](https://jamesmillner.dev) | Personal site and Blog | | [jamesmillner.dev](https://jamesmillner.dev) | Personal site and Blog |
| [jeremic.ca](https://jeremic.ca) | Personal site and Blog | | [jeremic.ca](https://jeremic.ca) | Personal site and Blog |
| [rohn.tech](https://rohn.tech) | Personal site | | [rohn.tech](https://rohn.tech) | Personal site |
| [klimafreundlicher-kochen.de](https://www.klimafreundlicher-kochen.de) | Food blog (in German) | | [klimafreundlicher-kochen.de](https://www.klimafreundlicher-kochen.de) | Food blog (in German) |
| [seyslee.github.io](https://seyslee.github.io) | Tech blog (in Korean) | | [seyslee.github.io](https://seyslee.github.io) | Tech blog (in Korean) |
| [datanalyze.be](https://datanalyze.be/) | Professional site | | [datanalyze.be](https://datanalyze.be/) | Professional site |
| [sneaky-potato.github.io](https://sneaky-potato.github.io/) | Professional site and Blog | | [sneaky-potato.github.io](https://sneaky-potato.github.io/) | Professional site and Blog |
| [kelset.dev](https://kelset.dev) | Personal site | | [kelset.dev](https://kelset.dev) | Personal site |
| [docteurelsavancaster.com](https://docteurelsavancaster.com/) | Professional site | | [docteurelsavancaster.com](https://docteurelsavancaster.com/) | Professional site |
| [ruihao-li.github.io](https://ruihao-li.github.io/) | Personal site and Blog | | [ruihao-li.github.io](https://ruihao-li.github.io/) | Personal site and Blog |
| [phalanxhead.dev](https://phalanxhead.dev) | Personal site and Blog | | [phalanxhead.dev](https://phalanxhead.dev) | Personal site and Blog |
| [Bible Multi Apps](https://hotlittlewhitedog.gitlab.io/biblemulti) | Personal site and Blog | | [Bible Multi Apps](https://hotlittlewhitedog.gitlab.io/biblemulti) | Personal site and Blog |
| [Jh123x](https://jh123x.com/) | Personal site and Blog | | [Jh123x](https://jh123x.com/) | Personal site and Blog |
| [sforzando LLC. and Inc.](https://sfz.dev/) | Corporate site and Blog | | [sforzando LLC. and Inc.](https://sfz.dev/) | Corporate site and Blog |
| [aidansmith.me](https://aidansmith.me/) | Personal Site | | [aidansmith.me](https://aidansmith.me/) | Personal Site |
| [nunocoracao.com](https://nunocoracao.com) | Personal site and Blog | | [nunocoracao.com](https://nunocoracao.com) | Personal site and Blog |
| [szegedkungfu.hu](https://balance-se.github.io/) | Sports association site | | [szegedkungfu.hu](https://balance-se.github.io/) | Sports association site |
| [jcransom.com](https://www.jcransom.com/) | Personal Site and Blog | | [jcransom.com](https://www.jcransom.com/) | Personal Site and Blog |
| [cbrincoveanu.com](https://www.cbrincoveanu.com/) | Personal site and Blog | | [cbrincoveanu.com](https://www.cbrincoveanu.com/) | Personal site and Blog |
| [medical-humanities](https://medical-humanities.org) | Academic site | | [medical-humanities](https://medical-humanities.org) | Academic site |
| [boyersnet.com](https://boyersnet.com) | Personal site and Blog | | [boyersnet.com](https://boyersnet.com) | Personal site and Blog |
| [major.io](https://major.io) | Personal site and Blog | | [major.io](https://major.io) | Personal site and Blog |
| [bayas.dev](https://bayas.dev) | Personal site and Blog | | [bayas.dev](https://bayas.dev) | Personal site and Blog |
| [顾宇的博客](https://www.guyu.me/) | Personal Blog (in Chinese) | | [顾宇的博客](https://www.guyu.me/) | Personal Blog (in Chinese) |
| [cgutierr-zgz.github.io](https://cgutierr-zgz.github.io/) | Personal site and Tech blog | | [cgutierr-zgz.github.io](https://cgutierr-zgz.github.io/) | Personal site and Tech blog |
| [adam.sr](https://adam.sr) | Personal site and Blog | | [adam.sr](https://adam.sr) | Personal site and Blog |
| [datadi.murgi.org](https://datadi.murgi.org) | Personal site and Blog | | [datadi.murgi.org](https://datadi.murgi.org) | Personal site and Blog |
| [shim.web.id](https://shim.web.id) | Personal Blog (in Indonesian) | | [shim.web.id](https://shim.web.id) | Personal Blog (in Indonesian) |
| [kpavlov.me](https://kpavlov.me) | Personal site and Blog | | [kpavlov.me](https://kpavlov.me) | Personal site and Blog |
| [pfisterer.dev](https://pfisterer.dev) | Personal site and Blog | | [pfisterer.dev](https://pfisterer.dev) | Personal site and Blog |
| [davidrothera.me](https://davidrothera.me) | Personal site and Blog | | [davidrothera.me](https://davidrothera.me) | Personal site and Blog |
| [ethantroy.com](https://ethantroy.com) | Personal Site and Blog | | [ethantroy.com](https://ethantroy.com) | Personal Site and Blog |
| [sug.bitprism.net](https://sug.bitprism.net) | Personal Site and Blog | | [sug.bitprism.net](https://sug.bitprism.net) | Personal Site and Blog |
| [arjuns.me](https://arjuns.me) | Personal Site and Blog | | [arjuns.me](https://arjuns.me) | Personal Site and Blog |
| [statistix.be](https://statistix.be/) | Professional site | | [statistix.be](https://statistix.be/) | Professional site |
| [leonidasv.com](https://leonidasv.com/) | Personal site and Blog | | [sathyabh.at](https://sathyabh.at) | Personal Site and Blog |
| [andrew-jones.com](https://andrew-jones.com/) | Personal site and tech blog | | [leonidasv.com](https://leonidasv.com/) | Personal site and Blog |
| [nikita.computer](https://nikita.computer/) | Personal site and tech blog | | [andrew-jones.com](https://andrew-jones.com/) | Personal site and tech blog |
| [nikita.computer](https://nikita.computer/) | Personal site and tech blog |
| [blog.dejavu.moe](https://blog.dejavu.moe/) | Personal blog and weekly issues |
**Congo user?** To add your site to this list, [submit a pull request](https://github.com/jpanther/congo/blob/dev/exampleSite/content/users/index.md). **Congo user?** To add your site to this list, [submit a pull request](https://github.com/jpanther/congo/blob/dev/exampleSite/content/users/index.md).

View File

@ -3,7 +3,7 @@
{{- $section := .Site.GetPage "section" .Section -}} {{- $section := .Site.GetPage "section" .Section -}}
{{- $showDate := .Params.showDate | default .Site.Params.article.showDate -}} {{- $showDate := .Params.showDate | default .Site.Params.article.showDate -}}
{{- $index = $index | append (dict {{- $index = $index | append (dict
"date" (cond (and .IsPage $showDate) (.Date | time.Format (.Site.Language.Params.dateFormat | default ":date_long")) nil) "date" (cond (and .IsPage $showDate) (.Date | time.Format (site.Params.dateFormat | default ":date_long")) nil)
"title" (.Title | emojify | safeJS) "title" (.Title | emojify | safeJS)
"section" ($section.Title | emojify | safeJS) "section" ($section.Title | emojify | safeJS)
"summary" (.Summary | emojify | safeJS) "summary" (.Summary | emojify | safeJS)

View File

@ -3,7 +3,7 @@
{{ with .Site.Author.image }} {{ with .Site.Author.image }}
{{ $authorImage := resources.Get . }} {{ $authorImage := resources.Get . }}
{{ if $authorImage }} {{ if $authorImage }}
{{ $authorImage := $authorImage.Fill "192x192" }} {{ $authorImage := $authorImage.Fill "192x192 Center" }}
<img <img
class="!mb-0 !mt-0 me-4 h-24 w-24 rounded-full" class="!mb-0 !mt-0 me-4 h-24 w-24 rounded-full"
width="96" width="96"

View File

@ -1 +1 @@
{{ return time.Format (site.Language.Params.dateFormat | default ":date_long") . }} {{ return time.Format (site.Params.dateFormat | default ":date_long") . }}

View File

@ -1,9 +1,9 @@
{{ if ne .Site.Params.showAppearanceSwitcher nil }} {{ if ne .Params.showAppearanceSwitcher nil }}
{{ warnf "[CONGO] Theme parameter `showAppearanceSwitcher` has been renamed to `footer.showAppearanceSwitcher`. Please update your site configuration." }} {{ warnf "[CONGO] Theme parameter `showAppearanceSwitcher` has been renamed to `footer.showAppearanceSwitcher`. Please update your site configuration." }}
{{ end }} {{ end }}
{{ if ne .Site.Params.showScrollToTop nil }} {{ if ne .Params.showScrollToTop nil }}
{{ warnf "[CONGO] Theme parameter `showScrollToTop` has been renamed to `footer.showScrollToTop`. Please update your site configuration." }} {{ warnf "[CONGO] Theme parameter `showScrollToTop` has been renamed to `footer.showScrollToTop`. Please update your site configuration." }}
{{ end }} {{ end }}
{{ if ne .Site.Params.logo nil }} {{ if ne .Params.logo nil }}
{{ warnf "[CONGO] Theme parameter `logo` has been renamed to `header.logo`. Please update your site configuration." }} {{ warnf "[CONGO] Theme parameter `logo` has been renamed to `header.logo`. Please update your site configuration." }}
{{ end }} {{ end }}

View File

@ -1,6 +1,6 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
{{ with .Site.Language.Params.htmlCode | default .Site.LanguageCode }} {{ with site.Params.htmlCode | default .Site.LanguageCode }}
<meta http-equiv="content-language" content="{{ . }}" /> <meta http-equiv="content-language" content="{{ . }}" />
{{ end }} {{ end }}
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
@ -31,6 +31,7 @@
{{ end -}} {{ end -}}
{{/* Asset bundles */}} {{/* Asset bundles */}}
{{ $assets := newScratch }} {{ $assets := newScratch }}
{{ $algorithm := .Site.Params.fingerprintAlgorithm | default "sha256" }}
{{ $cssScheme := resources.Get (printf "css/schemes/%s.css" (lower .Site.Params.colorScheme | default "congo")) }} {{ $cssScheme := resources.Get (printf "css/schemes/%s.css" (lower .Site.Params.colorScheme | default "congo")) }}
{{ if not $cssScheme }} {{ if not $cssScheme }}
{{ $cssScheme = resources.Get "css/schemes/congo.css" }} {{ $cssScheme = resources.Get "css/schemes/congo.css" }}
@ -42,7 +43,7 @@
{{ if $cssCustom }} {{ if $cssCustom }}
{{ $assets.Add "css" (slice $cssCustom) }} {{ $assets.Add "css" (slice $cssCustom) }}
{{ end }} {{ end }}
{{ $bundleCSS := $assets.Get "css" | resources.Concat "css/main.bundle.css" | resources.Minify | resources.Fingerprint "sha512" }} {{ $bundleCSS := $assets.Get "css" | resources.Concat "css/main.bundle.css" | resources.Minify | resources.Fingerprint $algorithm }}
<link <link
type="text/css" type="text/css"
rel="stylesheet" rel="stylesheet"
@ -50,7 +51,7 @@
integrity="{{ $bundleCSS.Data.Integrity }}" integrity="{{ $bundleCSS.Data.Integrity }}"
/> />
{{ $jsAppearance := resources.Get "js/appearance.js" }} {{ $jsAppearance := resources.Get "js/appearance.js" }}
{{ $jsAppearance = $jsAppearance | resources.Minify | resources.Fingerprint "sha512" }} {{ $jsAppearance = $jsAppearance | resources.Minify | resources.Fingerprint $algorithm }}
<script type="text/javascript" src="{{ $jsAppearance.RelPermalink }}" integrity="{{ $jsAppearance.Data.Integrity }}"></script> <script type="text/javascript" src="{{ $jsAppearance.RelPermalink }}" integrity="{{ $jsAppearance.Data.Integrity }}"></script>
{{ if .Site.Params.enableSearch | default false }} {{ if .Site.Params.enableSearch | default false }}
{{ $jsFuse := resources.Get "lib/fuse/fuse.min.js" }} {{ $jsFuse := resources.Get "lib/fuse/fuse.min.js" }}
@ -66,7 +67,7 @@
{{ $assets.Add "js" (slice $jsRTL) }} {{ $assets.Add "js" (slice $jsRTL) }}
{{ end }} {{ end }}
{{ if $assets.Get "js" }} {{ if $assets.Get "js" }}
{{ $bundleJS := $assets.Get "js" | resources.Concat "js/main.bundle.js" | resources.Minify | resources.Fingerprint "sha512" }} {{ $bundleJS := $assets.Get "js" | resources.Concat "js/main.bundle.js" | resources.Minify | resources.Fingerprint $algorithm }}
<script defer type="text/javascript" id="script-bundle" src="{{ $bundleJS.RelPermalink }}" integrity="{{ $bundleJS.Data.Integrity }}" data-copy="{{ i18n "code.copy" }}" data-copied="{{ i18n "code.copied" }}"></script> <script defer type="text/javascript" id="script-bundle" src="{{ $bundleJS.RelPermalink }}" integrity="{{ $bundleJS.Data.Integrity }}" data-copy="{{ i18n "code.copy" }}" data-copied="{{ i18n "code.copied" }}"></script>
{{ end }} {{ end }}
{{/* Icons */}} {{/* Icons */}}
@ -111,4 +112,4 @@
{{ if templates.Exists "partials/extend-head.html" }} {{ if templates.Exists "partials/extend-head.html" }}
{{ partial "extend-head.html" .Site }} {{ partial "extend-head.html" .Site }}
{{ end }} {{ end }}
</head> </head>

View File

@ -7,7 +7,7 @@
{{ with .Site.Author.image }} {{ with .Site.Author.image }}
{{ $authorImage := resources.Get . }} {{ $authorImage := resources.Get . }}
{{ if $authorImage }} {{ if $authorImage }}
{{ $authorImage := $authorImage.Fill "288x288" }} {{ $authorImage := $authorImage.Fill "288x288 Center" }}
<img <img
class="mb-2 rounded-full h-36 w-36" class="mb-2 rounded-full h-36 w-36"
width="144" width="144"

View File

@ -1,14 +1,24 @@
{{- if .Site.Params.header.logo }} {{- if .Site.Params.header.logo }}
{{- $logo := resources.Get .Site.Params.header.logo }} {{- $logo := resources.Get .Site.Params.header.logo }}
{{- $logo_dark := resources.Get .Site.Params.header.logoDark }}
{{- if $logo }} {{- if $logo }}
<a href="{{ "" | relLangURL }}" class="mr-2"> <a href="{{ "" | relLangURL }}" class="mr-2">
<img <img
src="{{ $logo.RelPermalink }}" src="{{ $logo.RelPermalink }}"
width="{{ div $logo.Width 2 }}" width="{{ div $logo.Width 2 }}"
height="{{ div $logo.Height 2 }}" height="{{ div $logo.Height 2 }}"
class="max-h-[10rem] max-w-[10rem] object-scale-down object-left" class="max-h-[10rem] max-w-[10rem] object-scale-down object-left{{ if $logo_dark }} hidden dark:flex{{ end }}"
alt="{{ .Site.Title }}" alt="{{ .Site.Title }}"
/> />
{{- if $logo_dark }}
<img
src="{{ $logo_dark.RelPermalink }}"
width="{{ div $logo_dark.Width 2 }}"
height="{{ div $logo_dark.Height 2 }}"
class="max-h-[10rem] max-w-[10rem] object-scale-down object-left dark:hidden"
alt="{{ .Site.Title }}"
/>
{{- end}}
</a> </a>
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@ -8,6 +8,8 @@
href="{{ printf .url $.Permalink $.Title }}" href="{{ printf .url $.Permalink $.Title }}"
title="{{ i18n .title }}" title="{{ i18n .title }}"
aria-label="{{ i18n .title }}" aria-label="{{ i18n .title }}"
target="_blank"
rel="noopener noreferrer"
>{{ partial "icon.html" .icon }}</a >{{ partial "icon.html" .icon }}</a
> >
{{ end }} {{ end }}

View File

@ -1,11 +1,11 @@
{{ if .IsTranslated }} {{ if .IsTranslated }}
<ul class="flex flex-row list-none"> <ul class="flex list-none flex-row">
{{ range .AllTranslations }} {{ range .AllTranslations }}
<li class="ml-2"> <li class="ml-2">
<a <a
href="{{ .RelPermalink }}" href="{{ .RelPermalink }}"
class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2" class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2"
>{{ .Language.Params.displayName | emojify }}</a >{{ site.Params.displayName | emojify }}</a
> >
</li> </li>
{{ end }} {{ end }}

View File

@ -8,17 +8,17 @@ HUGO_THEME = "repo"
TZ = "Australia/Melbourne" TZ = "Australia/Melbourne"
[context.production.environment] [context.production.environment]
HUGO_VERSION = "0.110.0" HUGO_VERSION = "0.112.3"
HUGO_ENV = "production" HUGO_ENV = "production"
[context.deploy-preview] [context.deploy-preview]
command = "cd exampleSite && hugo --gc --minify -D -b $DEPLOY_PRIME_URL" command = "cd exampleSite && hugo --gc --minify -D -b $DEPLOY_PRIME_URL"
[context.deploy-preview.environment] [context.deploy-preview.environment]
HUGO_VERSION = "0.110.0" HUGO_VERSION = "0.112.3"
[context.branch-deploy] [context.branch-deploy]
command = "cd exampleSite && hugo --gc --minify -D -b $DEPLOY_PRIME_URL" command = "cd exampleSite && hugo --gc --minify -D -b $DEPLOY_PRIME_URL"
[context.branch-deploy.environment] [context.branch-deploy.environment]
HUGO_VERSION = "0.110.0" HUGO_VERSION = "0.112.3"

1913
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "hugo-congo-theme", "name": "hugo-congo-theme",
"version": "2.5.4", "version": "2.6.0",
"description": "Congo theme for Hugo", "description": "Congo theme for Hugo",
"scripts": { "scripts": {
"preinstall": "rimraf assets/lib", "preinstall": "rimraf assets/lib",
@ -30,14 +30,14 @@
"homepage": "https://github.com/jpanther/congo#readme", "homepage": "https://github.com/jpanther/congo#readme",
"devDependencies": { "devDependencies": {
"@tailwindcss/typography": "^0.5.9", "@tailwindcss/typography": "^0.5.9",
"chart.js": "^4.2.1", "chart.js": "^4.3.0",
"fuse.js": "^6.6.2", "fuse.js": "^6.6.2",
"katex": "^0.16.6", "katex": "^0.16.7",
"mermaid": "^9.4.3", "mermaid": "^10.2.0",
"prettier": "^2.8.8", "prettier": "^2.8.8",
"prettier-plugin-go-template": "^0.0.13", "prettier-plugin-go-template": "^0.0.13",
"prettier-plugin-tailwindcss": "^0.2.7", "prettier-plugin-tailwindcss": "^0.3.0",
"rimraf": "^5.0.0", "rimraf": "^5.0.1",
"tailwindcss": "^3.3.2", "tailwindcss": "^3.3.2",
"vendor-copy": "^3.0.1" "vendor-copy": "^3.0.1"
}, },