Skip to content

The generated repository

Running folheto init my-blog --user ana creates the folder below, a complete blog repository ready to be pushed to GitHub. Each part is explained in the sections that follow.

my-blog/
├── feeds.json                       # configured feeds
├── mkdocs.yml                       # blog + RSS (Material for MkDocs)
├── pyproject.toml                   # mkdocs, material, rss plugin
├── README.md
├── .gitignore
├── docs/
│   ├── index.md
│   ├── .authors.yml                 # one author per feed (written by the CLI)
│   ├── stylesheets/
│   │   ├── base.css                 # structure, driven by tokens
│   │   └── themes/                  # newspaper.css, classic.css, minimal.css
│   └── posts/<category>/<title>-<hash>.md
└── .github/
    └── workflows/
        ├── sync.yml                 # cron: sync + commit + deploy
        └── deploy.yml               # mkdocs build -> GitHub Pages

The blog

  • One post per news item, with date (date and time, Fortaleza time zone), categories, authors and feed in the front matter. The first paragraph is the summary on the blog index (<!-- more -->).
  • Categories: Material category pages.
  • Authors: each feed is an author (/author/<feed>/), which separates the news of a single feed. The avatar is a colored initial generated by the CLI.
  • RSS (mkdocs-rss-plugin), a single feed with everything:
    • feed_rss_created.xml: sorted by creation date;
    • feed_rss_updated.xml: sorted by update date;
    • JSON versions feed_json_created.json and feed_json_updated.json.

Themes

The look comes from docs/stylesheets/base.css (structure) plus one file in docs/stylesheets/themes/ (colors and fonts). Every theme has a light and a dark version; the site follows the system preference and has a toggle in the header.

Theme Style
newspaper (default) modern newspaper: white page, serif headlines, orange section stripe
classic printed newspaper: paper and ink, justified serif, drop cap; dark is the "night edition"
minimal clean and technical: all sans-serif, soft corners, indigo accent

Choosing: folheto init --theme classic, or later change the theme file name under extra_css in mkdocs.yml.

Customizing: the files are yours. Each theme file defines tokens (--bg, --fg, --accent, --font-body, --font-head, --radius, ...) in two blocks: default is the light scheme and slate is the dark one. Edit the values, or copy a theme to create your own and point extra_css at it.

Where folheto runs

folheto is not a dependency of the generated repository: you run it from your own installation (uv tool install folheto), so locally you just type folheto sync. The workflow that needs it (sync.yml) runs uv tool run folheto@<version> ..., pinned to the version that generated the repository; change the version in that file to upgrade. deploy.yml only needs MkDocs, which comes from pyproject.toml (uv run mkdocs ...).

Publishing on GitHub Pages

  1. Settings > Pages: Source: GitHub Actions.
  2. Push to main. Deploy publishes the site; Sync runs every 6 hours (cron in sync.yml), commits the new posts and triggers the deploy.

Republishing the full text of third-party sites on a public site may infringe copyright. Prefer sources that allow it and, when in doubt, use --feed-only, which publishes only what the feed already discloses.