Python-based static site generator for writing challenges (such as writober)
Project description
Daily Writing
This repo hosts an open source project that let you create a website presenting daily writings, it was created with challenges like Writober or Writever in mind, but it's not tied to a specific challenge.
Daily Writing mainly turns a bunch of markdown files (one per writing, at most one per day), a configuration file, and a directory of static files into a static HTML website that can be deployed.
Daily Writing offers various features, such as:
- A page for each writing and a homepage. A menu displaying a calendar with all the writing for all months.
- Each day is linked to a "prompt" (as in writever/writober prompt), and can have a title distinct from the prompt. This is useful if the title of your writing isn't excatly the prompt you were given for the day. Also, if your prompts are in a given language and the title is the prompt you translated to your language, it's nice. The prompt will be displayed in the menu over the title.
- A given writing can span over multiple days and their associated prompts (e.g. if you're late), and the calendar will reflect that. Those days may even be non-consecutive. It's assumed that the title will be composed of multiple parts each related to the associated prompts.
- Each day in a month is linked to a unique color, and the calendar is colored accordingly. The homepage displays all the month's colors.
- Posts can be written in advance and will only be published of their date.
- Links to the previous and next writings, for binge-reading.
- Most metadata can be extracted from the name of the file and the writing markdown title, but can then be normalized to frontmatter. Having a frontmatter is necessaryÒ when using a CMS editor.
- Writings spanning multiple days will have a gradient between the colors of the days.
- A CMS, at
/adminto update your writings and the site settings directly from your browser. - A RSS feed.
- Nice preview images when you post links to social networks.
- Discreet links to the GitHub source of each writing, to ease online edition or typo reporting.
- Privacy-minded Google fonts, downloaded and optimized at build time so that you can get various fonts without offering your reader's data to Google (damn, that was a mess to code)
- Dark mode. No light mode. Contributions welcome on that.
- Support for extra custom CSS. If you want to add a light mode but just for yourself.
- Support of various locales, for date formats. Apart from dates and numbers, all the words that appear on the interface are configurable, so technically, we support all languages that Unicode supports.
- If you rename a file but want to keep its original URL too, you can add aliases.
Author's personal undying love of handcrafted open source and meticulous yak shaving went into this project. He likes to think that it shows.
An example:
https://writober.ewjoach.im/ is deployed from https://github.com/ewjoachim/writober, using this project.
Extraction rules
From a single file without a frontmatter, these are the informations being extracted.
Say the file is at 2026/10/03-hello.md and its content starts with a title that says:
# 03 - Bonjour. The system will find that this writing covers a single day
(2026-10-03), its prompt is "hello" and its official title is "Bonjour".
Say the file is at 2026/10/03-hello-darkness.md and its content starts with a title
that says: # 03&04 - Bonjour, Obscurité. The system will find that this writing covers
2 days:
2026-10-03for which the prompt ishelloand the titleBonjour,2026-10-04for which the prompt isdarknessand the titleObscurité.
You can always override those values by editing the frontmatter.
Installation
Github
- Create a repository from the template
- Adjust configuration with your details
- Your repository is deployed through GitHub actions (
https://<username>.github.io/<repo name>) - Write your stories
Elsewhere
(Feel free to contribute installation instructions for other platforms).
Configuration
Your website can be configured through either:
daily-writing.toml,pyproject.tomlwithin the[tool.daily-writing]section- environments variables,
- CLI flags.
The same options are available in all ways, but they're not spelled out exactly the
same way. In the toml configuration and environment variables, words are
separated by _ (underscores). In the flags, they're separated by - (dashes).
Environment variables are all upper case and prefixed with DAILY_WRITING_
Examples:
daily-writing.toml:server_url = "https://writober.ewjoach.im"- environments variables:
SERVER_URL="https://writober.ewjoach.im" - CLI flags:
--server-url="https://writober.ewjoach.im"
The easiest and most up-to-date way to learn about every configuration option is
through: daily-writing -h. Feel free to consult daily-writing.toml for a working example.
[!NOTE] There is one extra configuration element: setting the
GITHUB_TOKENenvironment variable will help you avoid rate limiting to GitHub's API. It's not added in the normal configuration elements to avoid accidentally committing it to your repository.
CLI
There are 2 main subcommands:
daily-writing buildbuilds the websitedaily-writing servelaunches a local development server that autobuilds the website and auto-reload pages in your browser when changes are detected.
CI/CD Deployment
Solutions like GitHub Pages, Cloudflare Pages, GitLab Pages, etc will make your life easier, as you can edit the markdown files online or push them through git, and have them get redeployed automatically daily and upon changes.
Here's a GitHub Actions workflow example:
name: Deploy
on:
push:
branches: ["main"]
workflow_dispatch:
schedule:
- cron: "1 22,23 * 10 *" # Adjust to whenever relvant to you
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup Pages
uses: actions/configure-pages@v5
- uses: astral-sh/setup-uv@v6
- name: Sphinx build
run: uv run daily-writing build
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: _build
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Adding new content
Manual
Add and edit your markdown files in the repository via Git or via your platform's Web interface.
Online
Daily-Writing can come with a CMS, allowing you to get a nice admin interface that doesn't require to interact with Git.
Integration is not yet 100% streamlined, but it's coming.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file daily_writing-0.1.0.tar.gz.
File metadata
- Download URL: daily_writing-0.1.0.tar.gz
- Upload date:
- Size: 32.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c5874eb1e65643e9ff2fb18676d02240690404081db80d15fc1f13d01ad0095
|
|
| MD5 |
c269816ec709f4da55dbf99130bf324d
|
|
| BLAKE2b-256 |
78c6275d9b0dfb4bc5feb5061114af3ea228cf07dd1cfd236775aa848252f42b
|
Provenance
The following attestation bundles were made for daily_writing-0.1.0.tar.gz:
Publisher:
ci.yml on ewjoachim/daily-writing
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
daily_writing-0.1.0.tar.gz -
Subject digest:
9c5874eb1e65643e9ff2fb18676d02240690404081db80d15fc1f13d01ad0095 - Sigstore transparency entry: 1741278076
- Sigstore integration time:
-
Permalink:
ewjoachim/daily-writing@c8f016f5edd3e2185cbda0b2c7323404ab1e5d19 -
Branch / Tag:
refs/tags/0.1 - Owner: https://github.com/ewjoachim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@c8f016f5edd3e2185cbda0b2c7323404ab1e5d19 -
Trigger Event:
push
-
Statement type:
File details
Details for the file daily_writing-0.1.0-py3-none-any.whl.
File metadata
- Download URL: daily_writing-0.1.0-py3-none-any.whl
- Upload date:
- Size: 37.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f328c4e7405abbc6f65e4c8b4213c30ce781d8e53e64feff28aa31d2112b0fab
|
|
| MD5 |
f1caaeaa62a49dde322e55877b37f32b
|
|
| BLAKE2b-256 |
a7ae9c8dfdb2d9164f9d3d9e618f07ebe75a3fa3378be3a3c38ecc2350526cd3
|
Provenance
The following attestation bundles were made for daily_writing-0.1.0-py3-none-any.whl:
Publisher:
ci.yml on ewjoachim/daily-writing
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
daily_writing-0.1.0-py3-none-any.whl -
Subject digest:
f328c4e7405abbc6f65e4c8b4213c30ce781d8e53e64feff28aa31d2112b0fab - Sigstore transparency entry: 1741278157
- Sigstore integration time:
-
Permalink:
ewjoachim/daily-writing@c8f016f5edd3e2185cbda0b2c7323404ab1e5d19 -
Branch / Tag:
refs/tags/0.1 - Owner: https://github.com/ewjoachim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@c8f016f5edd3e2185cbda0b2c7323404ab1e5d19 -
Trigger Event:
push
-
Statement type: