mirror of https://github.com/jpanther/congo.git
Merge branch 'jpanther:dev' into lazy-load-image-by-default
commit
159aaae1e5
17
CHANGELOG.md
17
CHANGELOG.md
|
@ -6,24 +6,34 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [2.6.0] - 2023-05-25
|
||||
|
||||
### 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))
|
||||
- Slovak translation ([#541](https://github.com/jpanther/congo/pull/541))
|
||||
- Czech translation ([#541](https://github.com/jpanther/congo/pull/541))
|
||||
|
||||
### 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))
|
||||
- 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))
|
||||
- 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 Mermaid v9.4.3
|
||||
- Upgrade to KaTeX v0.16.7 ([#538](https://github.com/jpanther/congo/pull/538), [#549](https://github.com/jpanther/congo/pull/549))
|
||||
- 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
|
||||
|
||||
- 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
|
||||
|
||||
|
@ -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
|
||||
- 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.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
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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 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
|
@ -1,18 +1,19 @@
|
|||
languageCode = "en"
|
||||
languageName = "English"
|
||||
displayName = "EN"
|
||||
isoCode = "en"
|
||||
weight = 1
|
||||
rtl = false
|
||||
|
||||
title = "Congo"
|
||||
# description = "My awesome website"
|
||||
# copyright = "Copy, _right?_ :thinking_face:"
|
||||
|
||||
dateFormat = "2 January 2006"
|
||||
|
||||
[params]
|
||||
isoCode = "en"
|
||||
displayName = "EN"
|
||||
rtl = false
|
||||
|
||||
dateFormat = "2 January 2006"
|
||||
|
||||
# mainSections = ["section1", "section2"]
|
||||
# description = "My awesome website"
|
||||
|
||||
[author]
|
||||
# name = "Your name here"
|
||||
|
|
|
@ -13,10 +13,12 @@ enableSearch = false
|
|||
enableCodeCopy = false
|
||||
|
||||
# robots = ""
|
||||
fingerprintAlgorithm = "sha256"
|
||||
|
||||
[header]
|
||||
layout = "basic" # valid options: basic, hamburger, hybrid, custom
|
||||
# logo = "img/logo.jpg"
|
||||
# logoDark = "img/dark-logo.jpg"
|
||||
showTitle = true
|
||||
|
||||
[footer]
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
languageCode = "en-au"
|
||||
languageName = "English (Australia)"
|
||||
displayName = ":flag-au:"
|
||||
isoCode = "en-AU"
|
||||
weight = 1
|
||||
rtl = false
|
||||
|
||||
title = "Congo"
|
||||
description = "A powerful, lightweight theme for Hugo built with Tailwind CSS."
|
||||
copyright = "© 2023 Congo contributors"
|
||||
|
||||
dateFormat = "2 January 2006"
|
||||
|
||||
[params]
|
||||
isoCode = "en-AU"
|
||||
displayName = ":flag-au:"
|
||||
rtl = false
|
||||
|
||||
dateFormat = "2 January 2006"
|
||||
|
||||
mainSections = ["samples"]
|
||||
description = "A powerful, lightweight theme for Hugo built with Tailwind CSS."
|
||||
|
||||
[author]
|
||||
name = "Congo"
|
||||
|
|
|
@ -13,10 +13,12 @@ enableSearch = true
|
|||
enableCodeCopy = true
|
||||
|
||||
# robots = ""
|
||||
fingerprintAlgorithm = "sha256"
|
||||
|
||||
[header]
|
||||
layout = "basic" # valid options: basic, hamburger, hybrid, custom
|
||||
# logo = "img/logo.jpg"
|
||||
# logoDark = "img/dark-logo.jpg"
|
||||
showTitle = true
|
||||
|
||||
[footer]
|
||||
|
|
|
@ -89,17 +89,17 @@ The default file can be used as a template to create additional languages, or re
|
|||
<!-- prettier-ignore-start -->
|
||||
|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.|
|
||||
|`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.|
|
||||
|`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.|
|
||||
|`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`.|
|
||||
|`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.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.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.|
|
||||
|
@ -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.|
|
||||
|`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.|
|
||||
|`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.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.|
|
||||
|`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).|
|
||||
|
|
|
@ -96,15 +96,15 @@ Then in the root of your site repository, create a `netlify.toml` file:
|
|||
|
||||
[build.environment]
|
||||
NODE_ENV = "production"
|
||||
GO_VERSION = "1.19"
|
||||
GO_VERSION = "1.20"
|
||||
TZ = "UTC" # Set to preferred timezone
|
||||
|
||||
[context.production.environment]
|
||||
HUGO_VERSION = "0.110.0"
|
||||
HUGO_VERSION = "0.112.3"
|
||||
HUGO_ENV = "production"
|
||||
|
||||
[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`.
|
||||
|
|
|
@ -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.
|
||||
|
||||
| Website | Details |
|
||||
| ---------------------------------------------------------------------- | ----------------------------- |
|
||||
| [jamespanther.com](https://jamespanther.com) | Personal site - Theme author |
|
||||
| [antoinesoetewey.com](https://antoinesoetewey.com/) | Personal site |
|
||||
| [leif.io](https://leif.io/) | Personal site and Tech blog |
|
||||
| [dr460nf1r3.org](https://dr460nf1r3.org/) | Personal site and Blog |
|
||||
| [OCram85.com](https://ocram85.com) | Personal site and Blog |
|
||||
| [mackiser.github.io](https://mackiser.github.io) | Personal site and Blog |
|
||||
| [jamesmillner.dev](https://jamesmillner.dev) | Personal site and Blog |
|
||||
| [jeremic.ca](https://jeremic.ca) | Personal site and Blog |
|
||||
| [rohn.tech](https://rohn.tech) | Personal site |
|
||||
| [klimafreundlicher-kochen.de](https://www.klimafreundlicher-kochen.de) | Food blog (in German) |
|
||||
| [seyslee.github.io](https://seyslee.github.io) | Tech blog (in Korean) |
|
||||
| [datanalyze.be](https://datanalyze.be/) | Professional site |
|
||||
| [sneaky-potato.github.io](https://sneaky-potato.github.io/) | Professional site and Blog |
|
||||
| [kelset.dev](https://kelset.dev) | Personal site |
|
||||
| [docteurelsavancaster.com](https://docteurelsavancaster.com/) | Professional site |
|
||||
| [ruihao-li.github.io](https://ruihao-li.github.io/) | 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 |
|
||||
| [Jh123x](https://jh123x.com/) | Personal site and Blog |
|
||||
| [sforzando LLC. and Inc.](https://sfz.dev/) | Corporate site and Blog |
|
||||
| [aidansmith.me](https://aidansmith.me/) | Personal Site |
|
||||
| [nunocoracao.com](https://nunocoracao.com) | Personal site and Blog |
|
||||
| [szegedkungfu.hu](https://balance-se.github.io/) | Sports association site |
|
||||
| [jcransom.com](https://www.jcransom.com/) | Personal Site and Blog |
|
||||
| [cbrincoveanu.com](https://www.cbrincoveanu.com/) | Personal site and Blog |
|
||||
| [medical-humanities](https://medical-humanities.org) | Academic site |
|
||||
| [boyersnet.com](https://boyersnet.com) | Personal site and Blog |
|
||||
| [major.io](https://major.io) | Personal site and Blog |
|
||||
| [bayas.dev](https://bayas.dev) | Personal site and Blog |
|
||||
| [顾宇的博客](https://www.guyu.me/) | Personal Blog (in Chinese) |
|
||||
| [cgutierr-zgz.github.io](https://cgutierr-zgz.github.io/) | Personal site and Tech blog |
|
||||
| [adam.sr](https://adam.sr) | 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) |
|
||||
| [kpavlov.me](https://kpavlov.me) | Personal site and Blog |
|
||||
| [pfisterer.dev](https://pfisterer.dev) | Personal site and Blog |
|
||||
| [davidrothera.me](https://davidrothera.me) | Personal site and Blog |
|
||||
| [ethantroy.com](https://ethantroy.com) | Personal Site and Blog |
|
||||
| [sug.bitprism.net](https://sug.bitprism.net) | Personal Site and Blog |
|
||||
| [arjuns.me](https://arjuns.me) | Personal Site and Blog |
|
||||
| [statistix.be](https://statistix.be/) | Professional site |
|
||||
| [leonidasv.com](https://leonidasv.com/) | Personal site and Blog |
|
||||
| [andrew-jones.com](https://andrew-jones.com/) | Personal site and tech blog |
|
||||
| [nikita.computer](https://nikita.computer/) | Personal site and tech blog |
|
||||
| Website | Details |
|
||||
| ---------------------------------------------------------------------- | ------------------------------- |
|
||||
| [jamespanther.com](https://jamespanther.com) | Personal site - Theme author |
|
||||
| [antoinesoetewey.com](https://antoinesoetewey.com/) | Personal site |
|
||||
| [leif.io](https://leif.io/) | Personal site and Tech blog |
|
||||
| [dr460nf1r3.org](https://dr460nf1r3.org/) | Personal site and Blog |
|
||||
| [OCram85.com](https://ocram85.com) | Personal site and Blog |
|
||||
| [mackiser.github.io](https://mackiser.github.io) | Personal site and Blog |
|
||||
| [jamesmillner.dev](https://jamesmillner.dev) | Personal site and Blog |
|
||||
| [jeremic.ca](https://jeremic.ca) | Personal site and Blog |
|
||||
| [rohn.tech](https://rohn.tech) | Personal site |
|
||||
| [klimafreundlicher-kochen.de](https://www.klimafreundlicher-kochen.de) | Food blog (in German) |
|
||||
| [seyslee.github.io](https://seyslee.github.io) | Tech blog (in Korean) |
|
||||
| [datanalyze.be](https://datanalyze.be/) | Professional site |
|
||||
| [sneaky-potato.github.io](https://sneaky-potato.github.io/) | Professional site and Blog |
|
||||
| [kelset.dev](https://kelset.dev) | Personal site |
|
||||
| [docteurelsavancaster.com](https://docteurelsavancaster.com/) | Professional site |
|
||||
| [ruihao-li.github.io](https://ruihao-li.github.io/) | 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 |
|
||||
| [Jh123x](https://jh123x.com/) | Personal site and Blog |
|
||||
| [sforzando LLC. and Inc.](https://sfz.dev/) | Corporate site and Blog |
|
||||
| [aidansmith.me](https://aidansmith.me/) | Personal Site |
|
||||
| [nunocoracao.com](https://nunocoracao.com) | Personal site and Blog |
|
||||
| [szegedkungfu.hu](https://balance-se.github.io/) | Sports association site |
|
||||
| [jcransom.com](https://www.jcransom.com/) | Personal Site and Blog |
|
||||
| [cbrincoveanu.com](https://www.cbrincoveanu.com/) | Personal site and Blog |
|
||||
| [medical-humanities](https://medical-humanities.org) | Academic site |
|
||||
| [boyersnet.com](https://boyersnet.com) | Personal site and Blog |
|
||||
| [major.io](https://major.io) | Personal site and Blog |
|
||||
| [bayas.dev](https://bayas.dev) | Personal site and Blog |
|
||||
| [顾宇的博客](https://www.guyu.me/) | Personal Blog (in Chinese) |
|
||||
| [cgutierr-zgz.github.io](https://cgutierr-zgz.github.io/) | Personal site and Tech blog |
|
||||
| [adam.sr](https://adam.sr) | 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) |
|
||||
| [kpavlov.me](https://kpavlov.me) | Personal site and Blog |
|
||||
| [pfisterer.dev](https://pfisterer.dev) | Personal site and Blog |
|
||||
| [davidrothera.me](https://davidrothera.me) | Personal site and Blog |
|
||||
| [ethantroy.com](https://ethantroy.com) | Personal Site and Blog |
|
||||
| [sug.bitprism.net](https://sug.bitprism.net) | Personal Site and Blog |
|
||||
| [arjuns.me](https://arjuns.me) | Personal Site and Blog |
|
||||
| [statistix.be](https://statistix.be/) | Professional site |
|
||||
| [sathyabh.at](https://sathyabh.at) | Personal Site and Blog |
|
||||
| [leonidasv.com](https://leonidasv.com/) | Personal site and 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).
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{{- $section := .Site.GetPage "section" .Section -}}
|
||||
{{- $showDate := .Params.showDate | default .Site.Params.article.showDate -}}
|
||||
{{- $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)
|
||||
"section" ($section.Title | emojify | safeJS)
|
||||
"summary" (.Summary | emojify | safeJS)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{{ with .Site.Author.image }}
|
||||
{{ $authorImage := resources.Get . }}
|
||||
{{ if $authorImage }}
|
||||
{{ $authorImage := $authorImage.Fill "192x192" }}
|
||||
{{ $authorImage := $authorImage.Fill "192x192 Center" }}
|
||||
<img
|
||||
class="!mb-0 !mt-0 me-4 h-24 w-24 rounded-full"
|
||||
width="96"
|
||||
|
|
|
@ -1 +1 @@
|
|||
{{ return time.Format (site.Language.Params.dateFormat | default ":date_long") . }}
|
||||
{{ return time.Format (site.Params.dateFormat | default ":date_long") . }}
|
||||
|
|
|
@ -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." }}
|
||||
{{ 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." }}
|
||||
{{ 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." }}
|
||||
{{ end }}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<head>
|
||||
<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="{{ . }}" />
|
||||
{{ end }}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
@ -31,6 +31,7 @@
|
|||
{{ end -}}
|
||||
{{/* Asset bundles */}}
|
||||
{{ $assets := newScratch }}
|
||||
{{ $algorithm := .Site.Params.fingerprintAlgorithm | default "sha256" }}
|
||||
{{ $cssScheme := resources.Get (printf "css/schemes/%s.css" (lower .Site.Params.colorScheme | default "congo")) }}
|
||||
{{ if not $cssScheme }}
|
||||
{{ $cssScheme = resources.Get "css/schemes/congo.css" }}
|
||||
|
@ -42,7 +43,7 @@
|
|||
{{ if $cssCustom }}
|
||||
{{ $assets.Add "css" (slice $cssCustom) }}
|
||||
{{ 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
|
||||
type="text/css"
|
||||
rel="stylesheet"
|
||||
|
@ -50,7 +51,7 @@
|
|||
integrity="{{ $bundleCSS.Data.Integrity }}"
|
||||
/>
|
||||
{{ $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>
|
||||
{{ if .Site.Params.enableSearch | default false }}
|
||||
{{ $jsFuse := resources.Get "lib/fuse/fuse.min.js" }}
|
||||
|
@ -66,7 +67,7 @@
|
|||
{{ $assets.Add "js" (slice $jsRTL) }}
|
||||
{{ end }}
|
||||
{{ 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>
|
||||
{{ end }}
|
||||
{{/* Icons */}}
|
||||
|
@ -111,4 +112,4 @@
|
|||
{{ if templates.Exists "partials/extend-head.html" }}
|
||||
{{ partial "extend-head.html" .Site }}
|
||||
{{ end }}
|
||||
</head>
|
||||
</head>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{{ with .Site.Author.image }}
|
||||
{{ $authorImage := resources.Get . }}
|
||||
{{ if $authorImage }}
|
||||
{{ $authorImage := $authorImage.Fill "288x288" }}
|
||||
{{ $authorImage := $authorImage.Fill "288x288 Center" }}
|
||||
<img
|
||||
class="mb-2 rounded-full h-36 w-36"
|
||||
width="144"
|
||||
|
|
|
@ -1,14 +1,24 @@
|
|||
{{- if .Site.Params.header.logo }}
|
||||
{{- $logo := resources.Get .Site.Params.header.logo }}
|
||||
{{- $logo_dark := resources.Get .Site.Params.header.logoDark }}
|
||||
{{- if $logo }}
|
||||
<a href="{{ "" | relLangURL }}" class="mr-2">
|
||||
<img
|
||||
src="{{ $logo.RelPermalink }}"
|
||||
width="{{ div $logo.Width 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 }}"
|
||||
/>
|
||||
{{- 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>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
href="{{ printf .url $.Permalink $.Title }}"
|
||||
title="{{ i18n .title }}"
|
||||
aria-label="{{ i18n .title }}"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>{{ partial "icon.html" .icon }}</a
|
||||
>
|
||||
{{ end }}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{{ if .IsTranslated }}
|
||||
<ul class="flex flex-row list-none">
|
||||
<ul class="flex list-none flex-row">
|
||||
{{ range .AllTranslations }}
|
||||
<li class="ml-2">
|
||||
<a
|
||||
href="{{ .RelPermalink }}"
|
||||
class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2"
|
||||
>{{ .Language.Params.displayName | emojify }}</a
|
||||
>{{ site.Params.displayName | emojify }}</a
|
||||
>
|
||||
</li>
|
||||
{{ end }}
|
||||
|
|
|
@ -8,17 +8,17 @@ HUGO_THEME = "repo"
|
|||
TZ = "Australia/Melbourne"
|
||||
|
||||
[context.production.environment]
|
||||
HUGO_VERSION = "0.110.0"
|
||||
HUGO_VERSION = "0.112.3"
|
||||
HUGO_ENV = "production"
|
||||
|
||||
[context.deploy-preview]
|
||||
command = "cd exampleSite && hugo --gc --minify -D -b $DEPLOY_PRIME_URL"
|
||||
|
||||
[context.deploy-preview.environment]
|
||||
HUGO_VERSION = "0.110.0"
|
||||
HUGO_VERSION = "0.112.3"
|
||||
|
||||
[context.branch-deploy]
|
||||
command = "cd exampleSite && hugo --gc --minify -D -b $DEPLOY_PRIME_URL"
|
||||
|
||||
[context.branch-deploy.environment]
|
||||
HUGO_VERSION = "0.110.0"
|
||||
HUGO_VERSION = "0.112.3"
|
||||
|
|
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hugo-congo-theme",
|
||||
"version": "2.5.4",
|
||||
"version": "2.6.0",
|
||||
"description": "Congo theme for Hugo",
|
||||
"scripts": {
|
||||
"preinstall": "rimraf assets/lib",
|
||||
|
@ -30,14 +30,14 @@
|
|||
"homepage": "https://github.com/jpanther/congo#readme",
|
||||
"devDependencies": {
|
||||
"@tailwindcss/typography": "^0.5.9",
|
||||
"chart.js": "^4.2.1",
|
||||
"chart.js": "^4.3.0",
|
||||
"fuse.js": "^6.6.2",
|
||||
"katex": "^0.16.6",
|
||||
"mermaid": "^9.4.3",
|
||||
"katex": "^0.16.7",
|
||||
"mermaid": "^10.2.0",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier-plugin-go-template": "^0.0.13",
|
||||
"prettier-plugin-tailwindcss": "^0.2.7",
|
||||
"rimraf": "^5.0.0",
|
||||
"prettier-plugin-tailwindcss": "^0.3.0",
|
||||
"rimraf": "^5.0.1",
|
||||
"tailwindcss": "^3.3.2",
|
||||
"vendor-copy": "^3.0.1"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue