From b7807bb175b9355a3d05aeb55e469bba47b5c484 Mon Sep 17 00:00:00 2001 From: daudix Date: Thu, 20 Jun 2024 23:39:37 +0300 Subject: [PATCH] More info on translation and custom stylesheets --- content/_index.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/content/_index.md b/content/_index.md index d121cd9..9d5ef7a 100644 --- a/content/_index.md +++ b/content/_index.md @@ -74,9 +74,11 @@ Duckquill offers some configuration options to make it fit you better; most opti Duckquill ships with a localization system based on one used in [tabi](https://github.com/welpo/tabi), it's very easy to use and quite flexible at the same time. -To add a translation, create a file in your site's `i18n` directory called `[lang-code].toml`, e.g `ru.toml`. The language code should be ISO 639-1 or IETF BCP 47. +To add a translation, simply create a file in your site's `i18n` directory called `[lang-code].toml`, e.g `fr.toml`. The language code should be [ISO 639-1](https://localizely.com/iso-639-1-list/) or [BCP 47](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry). -Inside the file, copy-paste one of the existing translations from Duckquill and adapt it to your needs. Make sure to also check [tabi](https://github.com/welpo/tabi/tree/main/i18n) translation files for reference. +Inside that file, copy-paste one of the existing translations from Duckquill and adapt it to your needs. You can also check [tabi](https://github.com/welpo/tabi/tree/main/i18n) translation files for reference. + +Additionally to translating Duckquill, you can also override the English stings by copy-pasting `en.toml` from Duckquill to the `i18n` directory of your website and adjusting the values to your liking. ### Custom Stylesheets @@ -97,6 +99,16 @@ If for some reason overridden class are not respected, try using `!important`. Y @use "../themes/duckquill/sass/NEEDED_FILE.scss"; ``` +You can also load stylesheets per page/section by setting them inside page's front matter: + +```toml +[extra] +stylesheets = [ + "YOUR_STYLE.css", + "ALSO_YOUR_STYLE.css" +] +``` + ### Primary Color Duckquill respects chosen primary color everywhere, simply change the primary color in `config.toml`: @@ -147,7 +159,7 @@ primary_color_alpha = "COLOR_CODE" - [treeniks.github.io](https://treeniks.github.io) - [vikramxd.github.io](https://vikramxd.github.io) - [zorrn.net](https://www.zorrn.net) -- Yours? (feel free to [contact me](https://daudix.codeberg.page/contact/#contacts) or send a pull request) +- Yours? (feel free to [contact me](https://daudix.codeberg.page/find/#contacts) or send a pull request)