david-swift f97222f65d Write docs for Duckling #4
Add template for localization
2025-04-11 16:51:27 +02:00

1.7 KiB

+++ weight = 1 title = "Blogs" [extra] section = 1 +++

A blog is a place to publish articles. Take a look at the sample blog.

To create a blog, start with a Zola section. Set the following front matter variables:

template = "article_list.html"
page_template = "article.html"

Then, add pages.

Options

Use the default Zola section front matter variables to configure the blog. In addition to the default front matter variables for pages, Duckling provides some additional variables that can be set under [extra]:

  • 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.

The following options are available in the [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.

Example

The code for the sample blog can be used as a reference or as a starting point. It is available in the project's source code.