Skip to content

Commit

Permalink
🔖 Release v2.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jpanther committed Jun 4, 2023
2 parents 3dd7fe4 + 510f03d commit c114943
Show file tree
Hide file tree
Showing 26 changed files with 322 additions and 258 deletions.
20 changes: 18 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,27 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## [2.6.1] - 2023-06-04

### Changed

- Images are now marked for lazy loading by default ([#552](https://github.com/jpanther/congo/pull/552))
- Current language is no longer displayed in language selection ([#565](https://github.com/jpanther/congo/issues/565))
- Updated Simplified Chinese (China) translation ([#573](https://github.com/jpanther/congo/pull/573))

### Fixed

- Language selection repeats current language on multilingual sites instead of linking to translated content ([#565](https://github.com/jpanther/congo/issues/565))
- Icon padding inconsistent when using `--minify` option to build site ([#568](https://github.com/jpanther/congo/pull/568))
- Copyright string in the language configuration does not apply ([#572](https://github.com/jpanther/congo/issues/572))
- Upgrade to Mermaid v10.2.1 ([#569](https://github.com/jpanther/congo/pull/569))

## [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], ([#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 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))
Expand Down Expand Up @@ -688,7 +703,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.6.0...HEAD
[Unreleased]: https://github.com/jpanther/congo/compare/v2.6.1...HEAD
[2.6.1]: https://github.com/jpanther/congo/compare/v2.6.0...v2.6.1
[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
Expand Down
2 changes: 1 addition & 1 deletion assets/css/compiled/main.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Congo v2.6.0 | MIT License | https://github.com/jpanther/congo */
/*! Congo v2.6.1 | MIT License | https://github.com/jpanther/congo */

/*! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com */

Expand Down
2 changes: 1 addition & 1 deletion assets/css/main.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Congo v2.6.0 | MIT License | https://github.com/jpanther/congo */
/*! Congo v2.6.1 | MIT License | https://github.com/jpanther/congo */

@tailwind base;
@tailwind components;
Expand Down
338 changes: 169 additions & 169 deletions assets/lib/mermaid/mermaid.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ autoSwitchAppearance = true

enableSearch = false
enableCodeCopy = false
enableImageLazyLoading = true

# robots = ""
fingerprintAlgorithm = "sha256"
Expand Down
1 change: 1 addition & 0 deletions exampleSite/config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ autoSwitchAppearance = true

enableSearch = true
enableCodeCopy = true
enableImageLazyLoading = true

# robots = ""
fingerprintAlgorithm = "sha256"
Expand Down
1 change: 1 addition & 0 deletions exampleSite/content/docs/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|`autoSwitchAppearance`|`true`|Whether the theme appearance automatically switches based upon the visitor's operating system preference. Set to `false` to force the site to always use the `defaultAppearance`.|
|`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.|
|`enableImageLazyLoading`|`true`|Whether images should be marked for lazy loading by the broswer.|
|`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.|
Expand Down
4 changes: 2 additions & 2 deletions exampleSite/content/docs/hosting-deployment/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ Then in the root of your site repository, create a `netlify.toml` file:
TZ = "UTC" # Set to preferred timezone
[context.production.environment]
HUGO_VERSION = "0.112.3"
HUGO_VERSION = "0.112.7"
HUGO_ENV = "production"
[context.deploy-preview.environment]
HUGO_VERSION = "0.112.3"
HUGO_VERSION = "0.112.7"
```

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`.
Expand Down
26 changes: 13 additions & 13 deletions i18n/zh-CN.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
article:
anchor_label: "锚点"
date: "{{ .Date }}"
# date_updated: "Updated: {{ .Date }}"
date_updated: "更新于 {{ .Date }}"
draft: "草稿"
edit_title: "编辑内容"
reading_time:
other: "{{ .Count }} 分钟"
reading_time_title: "预计阅读"
# table_of_contents: "Table of Contents"
table_of_contents: "目录"
word_count:
one: "{{ .Count }} 字"
other: "{{ .Count }} 字"

author:
byline_title: "作者"

# code:
# copy: "Copy"
# copied: "Copied"
code:
copy: "复制"
copied: "已复制"

error:
404_title: "找不到网页 :confused:"
Expand All @@ -33,20 +33,20 @@ list:
externalurl_title: "链接到外部网站"
no_articles: "这里还没有任何文章可以列出。"

# nav:
# scroll_to_top_title: "Scroll to top"
# skip_to_main: "Skip to main content"
nav:
scroll_to_top_title: "回到顶部"
skip_to_main: "跳到主要内容"

# search:
# open_button_title: "Search (/)"
# close_button_title: "Close (Esc)"
# input_placeholder: "Search"
search:
open_button_title: "搜索 (/)"
close_button_title: "关闭 (Esc)"
input_placeholder: "搜索"

sharing:
email: "通过电子邮件发送"
facebook: "分享到 Facebook"
linkedin: "分享到 LinkedIn"
# mastodon: "Toot on Mastodon"
mastodon: "嘟嘟到 Mastodon"
pinterest: "钉到 Pinterest"
reddit: "提交到 Reddit"
twitter: "分享到 Twitter"
Expand Down
22 changes: 20 additions & 2 deletions layouts/_default/_markup/render-image.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
{{ $url := urls.Parse .Destination }}
{{ $altText := .Text }}
{{ $caption := .Title }}
{{ $lazyLoad := $.Page.Site.Params.enableImageLazyLoading | default true }}
{{ if findRE "^https?" $url.Scheme }}
<figure>
<img class="mx-auto my-0 rounded-md" src="{{ $url.String }}" alt="{{ $altText }}" />
<img
class="mx-auto my-0 rounded-md"
src="{{ $url.String }}"
alt="{{ $altText }}"
{{ if $lazyLoad }}
loading="lazy"
{{ end }}
/>
{{ with $caption }}<figcaption class="text-center">{{ . | markdownify }}</figcaption>{{ end }}
</figure>
{{ else }}
Expand Down Expand Up @@ -32,12 +40,22 @@
{{ end }}
{{ end }}
alt="{{ $altText }}"
{{ if $lazyLoad }}
loading="lazy"
{{ end }}
/>
{{ with $caption }}<figcaption class="text-center">{{ . | markdownify }}</figcaption>{{ end }}
</figure>
{{ else }}
<figure>
<img class="mx-auto my-0 rounded-md" src="{{ $url.String }}" alt="{{ $altText }}" />
<img
class="mx-auto my-0 rounded-md"
src="{{ $url.String }}"
alt="{{ $altText }}"
{{ if $lazyLoad }}
loading="lazy"
{{ end }}
/>
{{ with $caption }}<figcaption class="text-center">{{ . | markdownify }}</figcaption>{{ end }}
</figure>
{{ end }}
Expand Down
3 changes: 3 additions & 0 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ <h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
{{ end }}
{{ end }}
alt="{{ $.Params.featureAlt | default $.Params.coverAlt | default "" }}"
{{ if $.Site.Params.enableImageLazyLoading | default true }}
loading="lazy"
{{ end }}
/>
{{ with $.Params.coverCaption }}
<figcaption class="mb-6 -mt-3 text-center">{{ . | markdownify }}</figcaption>
Expand Down
3 changes: 3 additions & 0 deletions layouts/partials/article-link.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
160w, {{- (.Fill "320x240 smart").RelPermalink }} 2x"
src="{{ (.Fill "160x120 smart").RelPermalink }}"
{{ end }}
{{ if $.Site.Params.enableImageLazyLoading | default true }}
loading="lazy"
{{ end }}
/>
</a>
</div>
Expand Down
3 changes: 3 additions & 0 deletions layouts/partials/author.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
height="96"
alt="{{ $.Site.Author.name | default "Author" }}"
src="{{ $authorImage.RelPermalink }}"
{{ if $.Site.Params.enableImageLazyLoading | default true }}
loading="lazy"
{{ end }}
/>
{{ end }}
{{ end }}
Expand Down
10 changes: 5 additions & 5 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
>
{{ partial "icon.html" . }}
{{- partial "icon.html" . -}}
</span>
{{ end }}{{ if .Params.showName | default true }}
{{- end -}}{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
Expand Down Expand Up @@ -55,9 +55,9 @@
<span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
>
{{ partial "icon.html" . }}
{{- partial "icon.html" . -}}
</span>
{{ end }}{{ if .Params.showName | default true }}
{{- end -}}{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
Expand All @@ -75,7 +75,7 @@
{{/* Copyright */}}
{{ if .Site.Params.footer.showCopyright | default true }}
<p class="text-sm text-neutral-500 dark:text-neutral-400">
{{- with .Site.Params.copyright }}
{{- with site.Copyright }}
{{ . | emojify | markdownify }}
{{- else }}
&copy;
Expand Down
14 changes: 7 additions & 7 deletions layouts/partials/header/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
<span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
>
{{ partial "icon.html" . }}
{{- partial "icon.html" . -}}
</span>
{{ end }}{{ if .Params.showName | default true }}
{{- end -}}{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
Expand All @@ -44,9 +44,9 @@
title="{{ i18n "footer.dark_appearance" }}"
>
{{ with .Params.icon | default "moon" }}
{{ partial "icon.html" . }}
{{ end }}
{{ if .Params.showName | default true }}
{{- partial "icon.html" . -}}
{{- end -}}
{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
Expand Down Expand Up @@ -77,9 +77,9 @@
<span
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
>
{{ partial "icon.html" . }}
{{- partial "icon.html" . -}}
</span>
{{ end }}{{ if .Params.showName | default true }}
{{- end -}}{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
Expand Down
20 changes: 10 additions & 10 deletions layouts/partials/header/hamburger.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
<span
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
>
{{ partial "icon.html" . }}
{{- partial "icon.html" . -}}
</span>
{{ end }}{{ if .Params.showName | default true }}
{{- end -}}{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
Expand All @@ -60,9 +60,9 @@
title="{{ i18n "footer.dark_appearance" }}"
>
{{ with .Params.icon | default "moon" }}
{{ partial "icon.html" . }}
{{ end }}
{{ if .Params.showName | default true }}
{{- partial "icon.html" . -}}
{{- end -}}
{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
Expand All @@ -74,9 +74,9 @@
title="{{ i18n "footer.light_appearance" }}"
>
{{ with .Params.icon | default "sun" }}
{{ partial "icon.html" . }}
{{ end }}
{{ if .Params.showName | default true }}
{{- partial "icon.html" . -}}
{{- end -}}
{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
Expand All @@ -93,9 +93,9 @@
<span
class="transition-colors group-dark:hover:text-primary-400 group-hover:text-primary-600"
>
{{ partial "icon.html" . }}
{{- partial "icon.html" . -}}
</span>
{{ end }}{{ if .Params.showName | default true }}
{{- end -}}{{- if .Params.showName | default true -}}
<span
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
>{{ .Name | markdownify | emojify }}</span
Expand Down
Loading

0 comments on commit c114943

Please sign in to comment.