mirror of https://github.com/jpanther/congo.git
parent
aa72ff2a73
commit
aba3d34482
|
@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
### Added
|
||||
|
||||
- Ability to specify an alternate logo image when dark appearance is active ([#533], ([#521](https://github.com/jpanther/congo/pull/521))(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))
|
||||
|
|
|
@ -13,11 +13,12 @@ enableSearch = false
|
|||
enableCodeCopy = false
|
||||
|
||||
# robots = ""
|
||||
fingerprintAlgorithm = "sha256"
|
||||
|
||||
[header]
|
||||
layout = "basic" # valid options: basic, hamburger, hybrid, custom
|
||||
# logo = "img/logo.jpg"
|
||||
# darkLogo = "img/dark-logo.jpg" # specify a different logo for dark mode if needed
|
||||
# logoDark = "img/dark-logo.jpg"
|
||||
showTitle = true
|
||||
|
||||
[footer]
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -130,6 +130,7 @@ 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.|
|
||||
|
|
|
@ -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 */}}
|
||||
|
|
Loading…
Reference in New Issue