More info on translation and custom stylesheets

This commit is contained in:
daudix
2024-06-20 23:39:37 +03:00
parent 39a7c2d3e1
commit b7807bb175

View File

@ -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? <small>(feel free to [contact me](https://daudix.codeberg.page/contact/#contacts) or send a pull request)</small>
- Yours? <small>(feel free to [contact me](https://daudix.codeberg.page/find/#contacts) or send a pull request)</small>
</details>