Duckquill
Duckquill is an opinionated, modern, pretty, and clean Zola theme that has the purpose of greatly simplifying the process of rolling up your blog. It aims to provide all the necessary options for comfortable writing, while keeping the balance of simplicity.
With it, you can change some configuration variables, tweak some of the included graphics, and have a nice blog up in minutes!
Some of the features Duckquill has to offer:
- Cute and informative social media cards for Discourse, Facebook, LinkedIn, Mastodon and more.
- Mastodon-powered comments; comment under a post by using your Mastodon account.
- Lightweight by default, powerful when needed; no mandatory JavaScript is used by default.
- Privacy respecting analytics using GoatCounter, with support for self-hosting.
- Estimated read time of the post; put away those with short attention spans.
- Light/dark/system theme switcher (for some reason everyone likes these).
- Everything is tinted with the user-defined accent color for a pleasant look.
- GitHub-style alerts. Yes, they’re pretty, but don’t overuse them.
- Post banners; they’re even used in the social media cards!
- YouTube/Vimeo shortcodes for easy video embedding.
- Tiny by default; only ~100kB. Take that, 5MB Medium!
- Customizable copyright text; you Better Quack Soul!
- Image styling via URL. Yes, you read that right.
- Useless CRT style that everyone seems to like.
- Fully localizeable, worry not, it’s pretty easy.
- Social links in the footer, with special styling.
- LaTeX markup support via the KaTeX library.
- Emoji favicon if you’re lazy to draw one.
- Copy button for code blocks.
- Search functionality.
Note
Although Duckquill is made based on the needs of my website, I am very open to feature requests as long as they are somewhat useful to others, so if you need a feature/configuration that does not exist, feel free to open an issue, or better yet, a pull request!
Tip
If you use Duckquill and enjoy it, or just like my work, please consider buying me a coffee, it would mean the world to me ^^.
Installation
First, if you already have Git setup, add this theme as a submodule:
Otherwise, simply clone it to your themes
directory:
Important
It is highly recommended to switch from the
main
branch to the latest release:
Then, enable it in your config.toml
:
= "duckquill"
To update the theme, simply switch to a new tag:
Important
Check the changelog for all versions after the one you are using; there may be breaking changes that require manual involvement.
Options
Duckquill offers some configuration options to make it fit you better; most options have pretty descriptive comments, so it should be easy to understand what they do.
Front Matter
Duckquill has some front matter variables that you can use by setting them in the [extra]
section:
Global
Configuration variables from config.toml
that can be set/overriden per page/section:
default_theme
: Which theme should be used by default (light/dark).accent_color
: Sets theme and browser theme color.accent_color_dark
: Ditto but for the dark theme. If not set regular variant will be used.fix_contrast
: Whether to fix low contrast in text selection, checkboxes, etc. Use only if the default doesn’t provide enough contrast, e.g. the accent color is set to yellow.fix_contrast_dark
: Ditto but for the dark theme.emoji_favicon
: Use emoji as a favicon. Only one emoji is being rendered, everything else is truncated.styles
: Additional CSS styles; expects them to be in the./static/
directory. If you are using Sass it will be generated there automatically.scripts
: Additional JavaScript scripts; expects them to be in the./static/
directory.katex
: Whether to enable the KaTeX library for rendering LaTeX.toc
: Enables table of contents. Only first 2 levels of headings are listed.toc_inline
: Whether to render inline table of contents at the top of all pages, in addition to floating quick navigation buttons.toc_ordered
: Whether to use numbered (ordered) list for table of contents.
Other variables:
apple_touch_icon
: Filename of the colocated Apple Touch Icon.favicon
: Filename of the colocated favicon.card
: Filename of the colocated metadata card.archive
: Displays an archived message.trigger
: Displays a trigger warning message.disclaimer
: Displays a disclaimer message.
Blog post specific:
banner
: Filename of the colocated banner image. Recommended dimensions are 2:1 aspect ratio and 1920x960 resolution.banner_pixels
Makes the banner use nearest neighbor algorithm for scaling, useful for keeping pixel-art sharp.archived
: Make the post visually stand out in the post list. Also accepts message as a value.featured
: Ditto but doesn’t accept message as a value.hot
: Ditto.poor
: Ditto.
In [extra.comments]
section:
host
: The Mastodon server on which the post was posted.user
: The username of the poster.id
: ID of the post; the one in the URL.
Localization
Duckquill ships with a localization system based on one used in tabi, it’s very easy to use and quite flexible at the same time.
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 either ISO 639-1 or BCP 47.
Inside that file, copy-paste one of the existing translations from Duckquill and adapt it to your needs. You can also check tabi 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 Styles
To add your own or override existing styles, create a custom style and add it in the config.toml
:
[]
= [
"YOUR_STYLE.css",
"ALSO_YOUR_STYLE.css"
]
Additional styles are expected it to be in the static
directory. If you are using Sass they will be compiled there by default.
If for some reason overridden style is not respected, try using !important
(don’t use it unless needed). You can import styles from Duckquill using:
You can also load styles per page/section by setting them inside page’s front matter:
[]
= [
"YOUR_PAGE_STYLE.css"
]
Accent Color
Duckquill respects chosen accent color everywhere. To use your own, simply change it in config.toml
:
[]
= "#3584e4"
Additionally, you can set a separate color for dark mode:
[]
= "#ff7800"
Favicon
Files named favicon.png
and apple-touch-icon.png
are used as favicon and Apple Touch Icon respectively. For animated favicon you can use APNG with the png
file extension.
In the Wild
This list is starting to get long, so click on it to expand it.
- agustinramirodiaz.github.io
- alavi.me
- amritcodes.xyz
- arfh.pages.dev
- bambalabs.co
- bano.dev
- benjaminandre.be
- blog.digital-horror.co
- blog.pansi21.xyz
- cabysm.github.io
- daudix.one (obviously)
- daveparr.info
- davepoltorak.com
- enriquekesslerm.com
- gregorni.gitlab.io
- harrypotterexplained.com
- hyouteki.github.io
- ikergimenez.neocities.org
- kaipeacock.com
- luciengheerbrant.com
- lukoktonos.com
- matteorisso.github.io
- maxime.letemple.fr
- mourelask.xyz
- muelsyse.codeberg.page
- mukuljoshi.xyz
- nbenedek.me
- nezumi.party
- nisf.be
- nullpuppy.github.io
- nutn-isc.gitlab.io
- orbitalmartian.codeberg.page
- orzklv.uz
- penandink.work
- pyter.at
- rbd.gg
- rerere.unlogic.co.uk
- rossjr.dev
- samienr.com
- shrimple.srht.site
- siddharthsabron.in
- skaven.org
- sorg.codeberg.page
- sungsphinx.codeberg.page
- tmblog.pages.dev
- treeniks.github.io
- vikramxd.github.io
- voluxyy.github.io
- Yours? (feel free to contact me or send a pull request)
In Credits
Assets Sources
All sources for Duckquill’s assets are available here and licensed under CC BY-SA 4.0. The reason for not putting the sources in the same repo as Duckquill itself is simple: I want it to be as small as possible, so that repo cloning is fast and doesn’t make the site significantly heavier; this is also why the demo uses remote images instead of local copies.
Credits
Tools Used
- VSCodium - Free/Libre Open Source Software Binaries of VS Code
- Capitalize - Title capitalization without random websites.
- Even Better TOML - For
config.toml
basically. - Monokai Pro - Awfully pretty theme.
- PX to REM - Easy conversion from PX to REM and vice versa.
- SCSS IntelliSense - Not sure if it actually works. ¯\_(ツ)_/¯
- Sort CSS - A lifesaver for long CSS properties.
- Tera - Tera template engine (the one Zola uses) support.
- Firefox developer tools - Best of its kind.
As for the code formatter I use built-in VSCodium one. Prettier is good but I don’t like how it tries to make code fit in a very narrow column, this can be changed of course, but built-in formatter does it’s job so I don’t bother doing so.
Thanks To
- Jakub Steiner for the OS Component Website, which served as a starting point and inspiration.
- Óscar for tabi and its translation system, rel attributes, and Content Security Policy.
- Carl Schwan for the Mastodon-powered Comments.
- Jonathan Neal for the normalize.css.
- GNOME design team for the icon development kit
- Modern Font Stacks for the system font stack.
- TheEvilSkeleton for helping to improve the look and accessibility.
- Dexter Reed for being the first Duckquill user, preventing it from being axed.
- Everyone who supported me and said good stuff <3