Compare commits

..

8 Commits

Author SHA1 Message Date
Wen Junhua 484a515b58
Merge 763257a3ac into 16edb5da3b 2023-11-26 23:27:47 +08:00
Wen Junhua 763257a3ac feat: add messages to i18n 2023-11-26 23:27:40 +08:00
Wen Junhua c9ee62bcde fix: update svg 2023-11-26 23:17:56 +08:00
James Panther 16edb5da3b
📝 Update changelog 2023-11-26 16:25:55 +11:00
James Panther 041fc30fe9
🔀 Merge pull request #691 from stereobooster/portable-links-2
Print warning if system can't resolve link to a markdown file
2023-11-26 16:23:01 +11:00
James Panther a9f79b7495
🔥 Remove Fathom Analytics custom domain parameter 2023-11-26 16:20:04 +11:00
James Panther 05c3fef94a
🔨 Preparing release v2.7.6 2023-11-26 15:41:00 +11:00
stereobooster e70c968e56 Print warning if system can't resolve link to a markdown file 2023-10-31 16:54:45 +01:00
38 changed files with 82 additions and 21 deletions

View File

@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased]
### Added
- Warning when building if links to markdown files cannot be resolved ([#691](https://github.com/jpanther/congo/pull/691))
### Removed
- Fathom Analytics custom domain parameter as this is no longer supported by Fathom
## [2.7.6] - 2023-11-26
### Fixed
- Some Mermaid diagram elements not styled correctly in dark mode ([#706](https://github.com/jpanther/congo/issues/706))
@ -801,7 +811,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.7.5...HEAD
[Unreleased]: https://github.com/jpanther/congo/compare/v2.7.6...HEAD
[2.7.6]: https://github.com/jpanther/congo/compare/v2.7.5...v2.7.6
[2.7.5]: https://github.com/jpanther/congo/compare/v2.7.4...v2.7.5
[2.7.4]: https://github.com/jpanther/congo/compare/v2.7.3...v2.7.4
[2.7.3]: https://github.com/jpanther/congo/compare/v2.7.2...v2.7.3

View File

@ -1,4 +1,4 @@
/*! Congo v2.7.5 | MIT License | https://github.com/jpanther/congo */
/*! Congo v2.7.6 | MIT License | https://github.com/jpanther/congo */
/*! tailwindcss v3.3.5 | MIT License | https://tailwindcss.com */

View File

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

View File

@ -1,2 +1 @@
<?xml version="1.0" encoding="utf-8"?>
<svg width="800px" height="800px" viewBox="0 0 377.764 377.764" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" fill="#3ACE01" d="M77.315 0h223.133c42.523 0 77.315 34.792 77.315 77.315v223.133c0 42.523-34.792 77.315-77.315 77.315H77.315C34.792 377.764 0 342.972 0 300.448V77.315C0 34.792 34.792 0 77.315 0z"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#FFF" d="M188.515 62.576c76.543 0 138.593 49.687 138.593 110.979 0 21.409-7.576 41.398-20.691 58.351-.649.965-1.497 2.031-2.566 3.209l-.081.088c-4.48 5.36-9.525 10.392-15.072 15.037-38.326 35.425-101.41 77.601-109.736 71.094-7.238-5.656 11.921-33.321-10.183-37.925-1.542-.177-3.08-.367-4.605-.583l-.029-.002v-.002c-64.921-9.223-114.222-54.634-114.222-109.267-.002-61.292 62.049-110.979 138.592-110.979z"/><path fill-rule="evenodd" clip-rule="evenodd" fill="#3ACE01" d="M108.103 208.954h27.952c3.976 0 7.228-3.253 7.228-7.229v-.603c0-3.976-3.252-7.228-7.228-7.228h-20.121v-45.779c0-3.976-3.252-7.228-7.228-7.228h-.603c-3.976 0-7.228 3.252-7.228 7.228v53.609c0 3.977 3.252 7.23 7.228 7.23zm173.205-33.603v-.603c0-3.976-3.253-7.228-7.229-7.228h-20.12v-11.445h20.12c3.976 0 7.229-3.252 7.229-7.228v-.603c0-3.976-3.253-7.228-7.229-7.228h-27.952c-3.976 0-7.228 3.252-7.228 7.228v53.609c0 3.976 3.252 7.229 7.228 7.229h27.952c3.976 0 7.229-3.253 7.229-7.229v-.603c0-3.976-3.253-7.228-7.229-7.228h-20.12v-11.445h20.12c3.976.002 7.229-3.251 7.229-7.226zm-53.755 31.448l.002-.003a7.207 7.207 0 0 0 2.09-5.07v-53.609c0-3.976-3.252-7.228-7.229-7.228h-.603c-3.976 0-7.228 3.252-7.228 7.228v31.469l-26.126-35.042c-1.248-2.179-3.598-3.655-6.276-3.655h-.603c-3.976 0-7.229 3.252-7.229 7.228v53.609c0 3.976 3.252 7.229 7.229 7.229h.603c3.976 0 7.228-3.253 7.228-7.229v-32.058l26.314 35.941c.162.252.339.494.53.724l.001.002c.723.986 1.712 1.662 2.814 2.075.847.35 1.773.544 2.742.544h.603a7.162 7.162 0 0 0 3.377-.844c.723-.344 1.332-.788 1.761-1.311zm-71.208 2.155h.603c3.976 0 7.228-3.253 7.228-7.229v-53.609c0-3.976-3.252-7.228-7.228-7.228h-.603c-3.976 0-7.229 3.252-7.229 7.228v53.609c0 3.976 3.253 7.229 7.229 7.229z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Pro 6.4.2 by @fontawesome - https://fontawesome.com License -https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path fill="currentColor" d="M311 196.8v81.3c0 2.1-1.6 3.7-3.7 3.7h-13c-1.3 0-2.4-.7-3-1.5l-37.3-50.3v48.2c0 2.1-1.6 3.7-3.7 3.7h-13c-2.1 0-3.7-1.6-3.7-3.7V196.9c0-2.1 1.6-3.7 3.7-3.7h12.9c1.1 0 2.4 .6 3 1.6l37.3 50.3V196.9c0-2.1 1.6-3.7 3.7-3.7h13c2.1-.1 3.8 1.6 3.8 3.5zm-93.7-3.7h-13c-2.1 0-3.7 1.6-3.7 3.7v81.3c0 2.1 1.6 3.7 3.7 3.7h13c2.1 0 3.7-1.6 3.7-3.7V196.8c0-1.9-1.6-3.7-3.7-3.7zm-31.4 68.1H150.3V196.8c0-2.1-1.6-3.7-3.7-3.7h-13c-2.1 0-3.7 1.6-3.7 3.7v81.3c0 1 .3 1.8 1 2.5c.7 .6 1.5 1 2.5 1h52.2c2.1 0 3.7-1.6 3.7-3.7v-13c0-1.9-1.6-3.7-3.5-3.7zm193.7-68.1H327.3c-1.9 0-3.7 1.6-3.7 3.7v81.3c0 1.9 1.6 3.7 3.7 3.7h52.2c2.1 0 3.7-1.6 3.7-3.7V265c0-2.1-1.6-3.7-3.7-3.7H344V247.7h35.5c2.1 0 3.7-1.6 3.7-3.7V230.9c0-2.1-1.6-3.7-3.7-3.7H344V213.5h35.5c2.1 0 3.7-1.6 3.7-3.7v-13c-.1-1.9-1.7-3.7-3.7-3.7zM512 93.4V419.4c-.1 51.2-42.1 92.7-93.4 92.6H92.6C41.4 511.9-.1 469.8 0 418.6V92.6C.1 41.4 42.2-.1 93.4 0H419.4c51.2 .1 92.7 42.1 92.6 93.4zM441.6 233.5c0-83.4-83.7-151.3-186.4-151.3s-186.4 67.9-186.4 151.3c0 74.7 66.3 137.4 155.9 149.3c21.8 4.7 19.3 12.7 14.4 42.1c-.8 4.7-3.8 18.4 16.1 10.1s107.3-63.2 146.5-108.2c27-29.7 39.9-59.8 39.9-93.1z" /></svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -68,7 +68,6 @@ fingerprintAlgorithm = "sha256"
[fathomAnalytics]
# site = "ABC12345"
# domain = "llama.yoursite.com"
[plausibleAnalytics]
# domain = "blog.yoursite.com"

View File

@ -68,7 +68,6 @@ fingerprintAlgorithm = "sha256"
[fathomAnalytics]
# site = "ABC12345"
# domain = "llama.yoursite.com"
[verification]
# google = ""

View File

@ -169,7 +169,6 @@ Congoはテーマの機能を制御する多数の設定パラメーターを提
|`sitemap.excludedKinds`|`["taxonomy", "term"]`|生成される `/sitemap.xml` から除外されるべきコンテンツの種類。許容される値については[Hugo docs](https://gohugo.io/templates/section-templates/#page-kinds)を参照してください。|
|`taxonomy.showTermCount`|`true`|TaxonomiesのリストにTermごとの記事数を表示するかどうか。|
|`fathomAnalytics.site`|_Not set_|Fathom Analyticsによって生成されたウェブサイトのサイトコード。詳細は[アナリティクス]({{< ref "partials#" >}})を参照してください。|
|`fathomAnalytics.domain`|_Not set_|Fathom Analyticsでカスタムドメインを使用している場合、カスタムドメインから`script.js`を提供するためにここに指定します。|
|`verification.google`|_Not set_|サイトのメタデータに含めるGoogleが提供するサイト検証文字列。|
|`verification.bing`|_Not set_|サイトのメタデータに含めるBingが提供するサイト検証文字列。|
|`verification.pinterest`|_Not set_|サイトのメタデータに含めるPinterestが提供するサイト検証文字列。|

View File

@ -169,7 +169,6 @@ Many of the article defaults here can be overridden on a per article basis by sp
|`sitemap.excludedKinds`|`["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`|`true`|Whether or not the number of articles within a taxonomy term is displayed on the taxonomy listing.|
|`fathomAnalytics.site`|_Not set_|The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.|
|`fathomAnalytics.domain`|_Not set_|If using a custom domain with Fathom Analytics, provide it here to serve `script.js` from the custom domain.|
|`plausibleAnalytics.domain`|_Not set_|Enter the domain of the website you want to track. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.|
|`plausibleAnalytics.event`|_Not set_|Plausible api event proxied URL. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.|
|`plausibleAnalytics.script`|_Not set_|Plausible analysis script proxied URL. Refer to the [Analytics docs]({{< ref "partials#analytics" >}}) for more details.|

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -10,18 +10,21 @@ tags: ["partials", "analytics", "privacy", "comments", "favicons", "icon", "docs
## Analytics
Congo provides built-in support for Fathom Analytics and Google Analytics. Fathom is a paid alternative to Google Analytics that respects user privacy. If you're interested you can use this affiliate link to [receive $10 credit](https://usefathom.com/ref/RLAJSV) and try the service.
Congo provides support for various analytics providers out of the box, as well as the ability to include custom code for any provider of your choice. If you don't currently have an analytics provider, check out Fathom Analytics.
### Fathom Analytics
To enable Fathom Analytics support, simply provide your Fathom site code in the `config/_default/params.toml` file. If you also use the custom domain feature of Fathom and would like to serve their script from your domain, you can also additionally provide the `domain` configuration value. If you don't provide a `domain` value, the script will load directly from Fathom DNS.
Fathom Analytics is a privacy-first service that is a great alternative to Google Analytics. It allows you to get all the visitor information you need, without spying on them. As a Congo user, you can use this affiliate link to [receive $10 credit](https://usefathom.com/ref/RLAJSV) and try the service.
[![Fathom Analytics. Website analytics without compromise. Zero cookies, GDPR compliant, and privacy-first. Start a free trial.](fathom-analytics.jpg)](https://usefathom.com/ref/RLAJSV)
To enable Fathom Analytics support, simply provide your Fathom site code in the `config/_default/params.toml` file. The script will load in your site directly from the Fathom Analytics CDN.
```toml
# config/_default/params.toml
[fathomAnalytics]
site = "ABC12345"
domain = "llama.yoursite.com"
```
### Plausible Analytics

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "تثبيت على بينتريست"
reddit: "نشر على ريديت"
twitter: "تغريد على تويتر"
telegram: "شارك على تيليجرام"
line: "شارك على لاين"
shortcode:
recent_articles: "حديثًا"

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "Пин в Pinterest"
reddit: "Публикуване в Reddit"
twitter: "Туит в Twitter"
telegram: "Споделете в Telegram"
line: Споделете в LINE""
shortcode:
recent_articles: "Последни"

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "পিন্টারেস্টে পিন করুন"
reddit: "রেড্ডিটে জমা দিন"
twitter: "ট্যুইট করুন"
telegram: "টেলিগ্রামে শেয়ার করুন"
line: "লাইনে শেয়ার করুন"
shortcode:
recent_articles: "সাম্প্রতিক"

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "Pin na Pinterest"
reddit: "Odeslat na Reddit"
twitter: "Tweet na Twitter"
telegram: "Sdílejte na Telegram"
line: "Sdílejte na LINE"
shortcode:
recent_articles: "Nedávné"

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "Auf Pinterest pinnen"
reddit: "An Reddit senden"
twitter: "Auf Twitter teilen"
telegram: "Auf Telegram teilen"
line: "Auf LINE teilen"
shortcode:
recent_articles: "Neue Beiträge"

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "Pin on Pinterest"
reddit: "Submit to Reddit"
twitter: "Tweet on Twitter"
telegram: "Share on Telegram"
line: "Share on LINE"
shortcode:
recent_articles: "Recent"

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "Pinear en Pinterest"
reddit: "Publicar en Reddit"
twitter: "Tuitear en Twitter"
telegram: "Compartir en Telegram"
line: "Compartir en LINE"
shortcode:
recent_articles: "Reciente"

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "Kiinnitä Pinterestiin"
reddit: "Lähetä Reddittiin"
twitter: "Twiittaa Twitterissä"
telegram: "Jaa Telegramissa"
line: "Jaa LINEssä"
shortcode:
recent_articles: "Viimeaikaiset"

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "Poster sur Pinterest"
reddit: "Poster sur Reddit"
twitter: "Tweeter"
telegram: "Partager sur Telegram"
line: "Partager sur LINE"
shortcode:
recent_articles: "Articles récents"

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "שיתוף בפינטרסט"
reddit: "שליחה לרדיט"
twitter: "ציוץ בטוויטר"
telegram: "שיתוף בטלגרם"
line: "שיתוף בליין"
shortcode:
recent_articles: "חדשים"

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "Megosztás a Pinteresten"
reddit: "Megosztás a Redditen"
twitter: "Megosztás a Twitteren"
telegram: "Megosztás a Telegramon"
line: "Megosztás a LINE-on"
shortcode:
recent_articles: "Friss"

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "Pin di Pinterest"
reddit: "Kirim ke Reddit"
twitter: "Tweet di Twitter"
telegram: "Bagikan ke Telegram"
line: "Bagikan ke LINE"
shortcode:
recent_articles: "Terbaru"

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "Pinna su Pinterest"
reddit: "Invia a Reddit"
twitter: "Tweetta su Twitter"
telegram: "Condividi su Telegram"
line: "Condividi su LINE"
shortcode:
recent_articles: "Recenti"

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "Pinterestでピンする"
reddit: "Redditに投稿する"
twitter: "Twitterに投稿する"
telegram: "Telegramでシェアする"
line: "LINEでシェアする"
shortcode:
recent_articles: "最近の記事"

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "Pin op Pinterest"
reddit: "Verzend naar Reddit"
twitter: "Tweet op Twitter"
telegram: "Deel op Telegram"
line: "Deel op LINE"
shortcode:
recent_articles: "Recent"

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "Udostępnij na Pinterest"
reddit: "Udostępnij na Reddit"
twitter: "Udostępnij na Twitter"
telegram: "Udostępnij na Telegram"
line: "Udostępnij na LINE"
shortcode:
recent_articles: "Ostatnie"

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "Pin no Pinterest"
reddit: "Postar no Reddit"
twitter: "Tweet no Twitter"
telegram: "Compartilhar pelo Telegram"
line: "Compartilhar pelo LINE"
shortcode:
recent_articles: "Recente"

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "Partilhar no Pinterest"
reddit: "Partilhar no Reddit"
twitter: "Partilhar no Twitter"
telegram: "Partilhar pelo Telegram"
line: "Partilhar pelo LINE"
shortcode:
recent_articles: "Recente"

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "Pune pe Pinterest"
reddit: "Postează pe Reddit"
twitter: "Scrie pe Twitter"
telegram: "Trimite pe Telegram"
line: "Trimite pe LINE"
shortcode:
recent_articles: "Cele mai noi"

View File

@ -55,6 +55,8 @@ sharing:
pinterest: "Поделиться на Pinterest"
reddit: "Опубликовать на Reddit"
twitter: "Опубликовать на Twitter"
telegram: "Поделиться на Telegram"
line: "Поделиться на LINE"
shortcode:
recent_articles: "Последние"

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "Pin na Pinterest"
reddit: "Odoslať na Reddit"
twitter: "Tweet na Twitteri"
telegram: "Zdieľaj na Telegram"
line: "Zdieľaj na LINE"
shortcode:
recent_articles: "Nedávne"

View File

@ -50,6 +50,8 @@ sharing:
pinterest: "Pinterest'te pinle"
reddit: "Reddit'te gönder"
twitter: "Twitter'da Tweetle"
telegram: "Telegram'da paylaş"
line: "LINE'da paylaş"
shortcode:
recent_articles: "Güncel"

View File

@ -55,6 +55,8 @@ sharing:
pinterest: "Зберегти на Pinterest"
reddit: "Опублікувати на Reddit"
twitter: "Поширити на Twitter"
telegram: "Поширити на Telegram"
line: "Поширити на LINE"
shortcode:
recent_articles: "Недавні дописи"

View File

@ -50,6 +50,8 @@ sharing:
pinterest: "钉到 Pinterest"
reddit: "提交到 Reddit"
twitter: "分享到 Twitter"
telegram: "分享到 Telegram"
line: "分享到 LINE"
shortcode:
recent_articles: "最近的文章"

View File

@ -51,6 +51,8 @@ sharing:
pinterest: "釘到 Pinterest"
reddit: "發送到 Reddit"
twitter: "推到 Twitter"
telegram: "分享到 Telegram"
line: "分享到 LINE"
shortcode:
recent_articles: "最近的文章"

View File

@ -2,10 +2,16 @@
{{- $isRemote := strings.HasPrefix $link "http" -}}
{{- if not $isRemote }}
{{ $url := urls.Parse .Destination }}
{{ if $url.Path }}
{{- if $url.Path }}
{{ $fragment := "" }}
{{- with $url.Fragment }}{{ $fragment = printf "#%s" . }}{{ end -}}
{{- with .Page.GetPage $url.Path }}{{ $link = printf "%s%s" .RelPermalink $fragment }}{{ end -}}
{{ end }}
{{- with .Page.GetPage $url.Path }}
{{ $link = printf "%s%s" .RelPermalink $fragment }}
{{ else }}
{{- if hasSuffix $url.Path ".md" }}
{{ warnf "[CONGO] Can't resolve: %s" .Destination }}
{{ end -}}
{{ end -}}
{{ end -}}
{{ end -}}
<a href="{{ $link | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if $isRemote }} target="_blank" rel="noreferrer"{{ end }}>{{- .Text | safeHTML -}}</a>

View File

@ -1,11 +1,7 @@
{{ if hugo.IsProduction }}
{{ with .Site.Params.fathomAnalytics.site }}
{{ if isset $.Site.Params.fathomanalytics "domain" }}
<script defer src="https://{{ $.Site.Params.fathomanalytics.domain }}/script.js" data-site="{{ . }}"></script>
{{ else }}
<script defer src="https://cdn.usefathom.com/script.js" data-site="{{ . }}"></script>
{{ end }}
{{ end }}
{{ with site.Params.plausibleAnalytics.domain }}
<script defer
data-domain="{{ . }}"

View File

@ -1,6 +1,6 @@
{
"name": "hugo-congo-theme",
"version": "2.7.5",
"version": "2.7.6",
"description": "Congo theme for Hugo",
"scripts": {
"preinstall": "rimraf assets/lib",