Compare commits

...

13 Commits

Author SHA1 Message Date
6c0153d795 Merge pull request 'fix(taxonomy_list): taxonomy_list still display as 'tags'' (#152) from jim60105/duckquill:fix/taxonomy_list_display_as_tags into main
Reviewed-on: https://codeberg.org/daudix/duckquill/pulls/152
2025-05-14 17:29:35 +00:00
aa3dac499b fix(taxonomy_list): taxonomy_list still display as 'tags'
Signed-off-by: CHEN, CHUN <jim60105@gmail.com>
2025-05-15 01:23:19 +08:00
6fc92ba2a1 Merge pull request 'feat(i18n): update localization for new taxonomy names in Chinese (zh)' (#150) from jim60105/duckquill:zh into main
Reviewed-on: https://codeberg.org/daudix/duckquill/pulls/150
2025-05-14 16:48:55 +00:00
83c0bdcbbb Merge pull request 'feat: localize new taxonomy names' (#149) from jim60105/duckquill:feat/localize-new-taxonomy-names into main
Reviewed-on: https://codeberg.org/daudix/duckquill/pulls/149
2025-05-14 16:48:44 +00:00
2bfd6ae136 Merge pull request 'docs: update in the wild' (#151) from jim60105/duckquill:chore/update-in-the-wild into main
Reviewed-on: https://codeberg.org/daudix/duckquill/pulls/151
2025-05-14 16:45:44 +00:00
547d7f7f7b docs: update in the wild
blog2.maki0419.com was the temporary domain name I used while migrating my blog.
Now, the website uses the Chinese single-character domain: https://琳.tw/

- Removed the entry for blog2.maki0419.com and added a new entry for 琳.tw to the list of example blogs.

Signed-off-by: CHEN, CHUN <jim60105@gmail.com>
2025-05-15 00:38:33 +08:00
a09ac31b34 feat(i18n): update localization for new taxonomy names in Chinese (zh)
- Update the date format to the Chinese style and replace terms and phrases to generalize references from "tag" to "taxon" in several keys and messages.

Signed-off-by: CHEN, CHUN <jim60105@gmail.com>
2025-05-15 00:29:09 +08:00
6ae1db5c74 feat: localize new taxonomy names
- Tag links now use the actual taxonomy name for the URL and the displayed label is wrapped in a translation macro instead of the previous placeholder-based logic.
- Simplify the taxonomy tag URL by passing the name directly and add translation support for the tag label.
- Introduce a new taxon_name_i18n variable to translate the taxonomy name and swap in this localized value for the page title and “See all” link, while also simplifying the all-taxa URL by passing taxonomy.name directly to get_url.

Signed-off-by: CHEN, CHUN <jim60105@gmail.com>
2025-05-15 00:13:14 +08:00
71c4fd5a8c Merge pull request 'display taxonomy names other than 'tags,', following config; also, support and display multiple simultaneous taxonomies' (#131) from apisashla/duckquill:main into main
Reviewed-on: https://codeberg.org/daudix/duckquill/pulls/131
2025-04-23 00:31:51 +00:00
5f96530dcf merge update 2025-04-22 00:17:37 -04:00
e65252a04d Merge branch 'main' into main 2025-04-22 03:53:41 +00:00
7157ea479d Bump to v6.3.0 2025-04-19 21:19:17 +03:00
35d94aacdf Ask user to set global site title if none is set (fixes #129) 2025-04-19 21:15:21 +03:00
10 changed files with 33 additions and 19 deletions

View File

@ -5,7 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased](https://codeberg.org/daudix/duckquill/compare/v6.1.1...main) ## [Unreleased](https://codeberg.org/daudix/duckquill/compare/v6.3.0...main)
## [v6.3.0](https://codeberg.org/daudix/duckquill/compare/v6.2.0...v6.3.0) - 2025-04-19
### Added
- Add German translation (#130).
### Fixed
- Output an error message if title is not set in `config.toml` (#129).
## [v6.2.0](https://codeberg.org/daudix/duckquill/compare/v6.1.1...v6.2.0) - 2025-03-30 ## [v6.2.0](https://codeberg.org/daudix/duckquill/compare/v6.1.1...v6.2.0) - 2025-03-30

View File

@ -66,7 +66,7 @@ It is highly recommended to switch from the `main` branch to the latest release:
```bash ```bash
cd themes/duckquill cd themes/duckquill
git checkout tags/v6.2.0 git checkout tags/v6.3.0
``` ```
Then, enable it in your `config.toml`: Then, enable it in your `config.toml`:
@ -80,7 +80,7 @@ To update the theme, simply switch to a new tag:
```bash ```bash
git submodule update --remote --merge git submodule update --remote --merge
cd themes/duckquill cd themes/duckquill
git checkout tags/v6.2.0 git checkout tags/v6.3.0
``` ```
{% alert(important=true) %} {% alert(important=true) %}
@ -212,7 +212,6 @@ Files named `favicon.png` and `apple-touch-icon.png` are used as favicon and App
- [blog.millefeuille42.fr](https://blog.millefeuille42.fr) - [blog.millefeuille42.fr](https://blog.millefeuille42.fr)
- [blog.pansi21.xyz](https://blog.pansi21.xyz) - [blog.pansi21.xyz](https://blog.pansi21.xyz)
- [blog.thundernetwork.org](https://blog.thundernetwork.org) - [blog.thundernetwork.org](https://blog.thundernetwork.org)
- [blog2.maki0419.com](https://blog2.maki0419.com)
- [cabysm.github.io](https://cabysm.github.io) - [cabysm.github.io](https://cabysm.github.io)
- [daveparr.info](https://www.daveparr.info) - [daveparr.info](https://www.daveparr.info)
- [davepoltorak.com](https://davepoltorak.com) - [davepoltorak.com](https://davepoltorak.com)
@ -256,6 +255,7 @@ Files named `favicon.png` and `apple-touch-icon.png` are used as favicon and App
- [winnydows.com](https://winnydows.com) - [winnydows.com](https://winnydows.com)
- [zlog.si-on.top](https://zlog.si-on.top) - [zlog.si-on.top](https://zlog.si-on.top)
- [zstg.is-a.dev](https://zstg.is-a.dev) - [zstg.is-a.dev](https://zstg.is-a.dev)
- [琳.tw](https://xn--jgy.tw/)
- Yours? <small>(feel free to [contact me](https://daudix.one/find/#contacts) or send a pull request)</small> - Yours? <small>(feel free to [contact me](https://daudix.one/find/#contacts) or send a pull request)</small>
</details> </details>

View File

@ -4,8 +4,7 @@ language_name = "简体中文"
# (post publication date, tag posts list...). # (post publication date, tag posts list...).
# Not used in comments, "date_locale" is used instead. # Not used in comments, "date_locale" is used instead.
# See https://docs.rs/chrono/0.4.31/chrono/format/strftime/index.html # See https://docs.rs/chrono/0.4.31/chrono/format/strftime/index.html
# TODO: Update date format to match the Chinese format. date_format = "%Y 年 %m 月 %d 日"
date_format = "%B %d, %Y"
date_locale = "zh_CN" date_locale = "zh_CN"
# Menu items. # Menu items.
@ -16,7 +15,7 @@ Demo = "演示"
Mods = "模组" Mods = "模组"
Coffee = "赞助" Coffee = "赞助"
all_tags = "查看所有标签" all_taxa = "查看所有$TAXON"
archived = "归档" archived = "归档"
author = "作者" author = "作者"
author_conjunction = "和" author_conjunction = "和"
@ -59,7 +58,7 @@ one_tags = "共有 $NUMBER 个标签"
open_post = "打开帖子" open_post = "打开帖子"
poor = "冷清" poor = "冷清"
posts = "共有 $NUMBER 篇文章" posts = "共有 $NUMBER 篇文章"
posts_with_tag = "带有 $TAG 标签的文章" posts_with_taxon = "属于 $TERM $TAXON的文章"
powered_by = "由 $ZOLA 和 $DUCKQUILL 强力驱动" powered_by = "由 $ZOLA 和 $DUCKQUILL 强力驱动"
previous = "上一篇" previous = "上一篇"
published = "发布于" published = "发布于"

View File

@ -15,7 +15,7 @@ Demo = "展示"
Mods = "模組" Mods = "模組"
Coffee = "贊助" Coffee = "贊助"
all_tags = "查看所有標籤" all_taxa = "查看所有$TAXON"
archived = "封存" archived = "封存"
author = "作者" author = "作者"
author_conjunction = "和" author_conjunction = "和"
@ -58,7 +58,7 @@ one_tags = "共有 $NUMBER 個標籤"
open_post = "打開文章" open_post = "打開文章"
poor = "冷清" poor = "冷清"
posts = "共有 $NUMBER 篇文章" posts = "共有 $NUMBER 篇文章"
posts_with_tag = "帶有 $TAG 標籤的文章" posts_with_taxon = "屬於 $TERM $TAXON的文章"
powered_by = "由 $ZOLA 和 $DUCKQUILL 提供" powered_by = "由 $ZOLA 和 $DUCKQUILL 提供"
previous = "上一篇" previous = "上一篇"
published = "發布於" published = "發布於"

View File

@ -1,5 +1,5 @@
/*! /*!
* Duckquill v6.2.0 (https://duckquill.daudix.one) * Duckquill v6.3.0 (https://duckquill.daudix.one)
* Copyright 2024-2025 David "Daudix" Lapshin * Copyright 2024-2025 David "Daudix" Lapshin
* Licensed under MIT (https://codeberg.org/daudix/duckquill/src/branch/main/LICENSE) * Licensed under MIT (https://codeberg.org/daudix/duckquill/src/branch/main/LICENSE)
*/ */

View File

@ -62,7 +62,7 @@
{%- if page.taxonomies -%} {%- if page.taxonomies -%}
{%- for name, taxon in page.taxonomies %} {%- for name, taxon in page.taxonomies %}
<ul class="tags"> <ul class="tags">
<a class="tag" href="{{- get_url(path='$TAXON', lang=lang) | replace(from="$TAXON", to=name) | lower -}}">{{ name }}:</a> <a class="tag" href="{{- get_url(path=name, lang=lang) | lower -}}">{{ macros_translate::translate(key=name, default=name, language_strings=language_strings) }}:</a>
{%- for item in taxon -%} {%- for item in taxon -%}
<li><a class="tag" href="{{ get_taxonomy_url(kind=name, name=item, lang=lang) }}">{{ item }}</a></li> <li><a class="tag" href="{{ get_taxonomy_url(kind=name, name=item, lang=lang) }}">{{ item }}</a></li>
{%- endfor %} {%- endfor %}

View File

@ -53,7 +53,7 @@
{%- for name, taxon in page.taxonomies %} {%- for name, taxon in page.taxonomies %}
<small> <small>
<ul class="tags"> <ul class="tags">
<a class="tag" href="{{- get_url(path='$TAXON', lang=lang) | replace(from="$TAXON", to=name) | lower -}}">{{ name }}:</a> <a class="tag" href="{{- get_url(path=name, lang=lang) | lower -}}">{{ macros_translate::translate(key=name, default=name, language_strings=language_strings) }}:</a>
{%- for item in taxon -%} {%- for item in taxon -%}
<li><a class="tag" href="{{ get_taxonomy_url(kind=name, name=item, lang=lang) }}">{{ item }}</a></li> <li><a class="tag" href="{{ get_taxonomy_url(kind=name, name=item, lang=lang) }}">{{ item }}</a></li>
{%- endfor %} {%- endfor %}

View File

@ -1,7 +1,11 @@
{# Taken from https://github.com/welpo/tabi/blob/69713c973c11d7646c8fe56476261d96cc1978d8/templates/partials/title.html #} {# Taken from https://github.com/welpo/tabi/blob/69713c973c11d7646c8fe56476261d96cc1978d8/templates/partials/title.html #}
{#- Setup -#} {#- Setup -#}
{%- set suffix = config.title | safe -%} {%- if config.title -%}
{%- set suffix = config.title | safe -%}
{%- else -%}
{{- throw(message='Title has not been set in config.toml, Please set one.') -}}
{%- endif -%}
{%- set custom_separator = config.extra.title_separator | default(value="-") -%} {%- set custom_separator = config.extra.title_separator | default(value="-") -%}
{%- set separator = " " ~ custom_separator ~ " " -%} {%- set separator = " " ~ custom_separator ~ " " -%}

View File

@ -3,10 +3,10 @@
{% block content %} {% block content %}
{%- set number_of_terms = terms | length -%} {%- set number_of_terms = terms | length -%}
{%- set taxon_name = taxonomy.name -%} {%- set taxon_name = taxonomy.name -%}
<h1>{{- macros_translate::translate(key="tags_title", default="$TAXON", language_strings=language_strings) | replace(from="$TAXON", to=taxon_name) -}}</h1> <h1>{{- macros_translate::translate(key=taxon_name ~ "_title", default=taxonomy.name | capitalize, language_strings=language_strings) -}}</h1>
<p> <p>
<small>{{- macros_translate::translate(key="tags", number=number_of_terms, default="$NUMBER $TAXON", language_strings=language_strings) | replace(from="$TAXON", to=taxon_name) -}}</small> <small>{{ macros_translate::translate(key=taxonomy.name, number=number_of_terms, default="$NUMBER " ~ taxonomy.name, language_strings=language_strings) }}</small>
</p> </p>
<ul class="tags"> <ul class="tags">

View File

@ -6,16 +6,17 @@
{%- set number_of_posts = term.pages | length -%} {%- set number_of_posts = term.pages | length -%}
{%- set taxon_name = taxonomy.name -%} {%- set taxon_name = taxonomy.name -%}
{%- set taxon_name_i18n = macros_translate::translate(key=taxonomy.name, default=taxonomy.name, language_strings=language_strings) -%}
{%- set term_name = "“" ~ term.name ~ "”" -%} {%- set term_name = "“" ~ term.name ~ "”" -%}
<h1> <h1>
{{- macros_translate::translate(key='posts_with_taxon', default='Posts with $TAXON $TERM', language_strings=language_strings) | replace(from="$TAXON", to=taxon_name) | replace(from="$TERM", to=term_name) -}} {{- macros_translate::translate(key='posts_with_taxon', default='Posts with $TAXON $TERM', language_strings=language_strings) | replace(from="$TAXON", to=taxon_name_i18n) | replace(from="$TERM", to=term_name) -}}
<a href="{{ current_url ~ 'atom.xml' }}"><i class="icon feed"></i></a> <a href="{{ current_url ~ 'atom.xml' }}"><i class="icon feed"></i></a>
</h1> </h1>
<p> <p>
<small> <small>
<a href="{{- get_url(path='$TAXON', lang=lang) | replace(from="$TAXON", to=taxon_name) | lower -}}"> <a href="{{- get_url(path=taxonomy.name, lang=lang) | lower -}}">
{{- macros_translate::translate(key="all_taxa", default="See all $TAXON", language_strings=language_strings) | replace(from="$TAXON", to=taxon_name) -}} {{- macros_translate::translate(key="all_taxa", default="See all $TAXON", language_strings=language_strings) | replace(from="$TAXON", to=taxon_name_i18n) -}}
</a> </a>
<br /> <br />
{{ macros_translate::translate(key='posts', number=number_of_posts, default='$NUMBER posts', language_strings=language_strings) }} {{ macros_translate::translate(key='posts', number=number_of_posts, default='$NUMBER posts', language_strings=language_strings) }}