Commands
All commands except init run at the root of a generated repository (where
feeds.json and docs/ live).
folheto init [NAME]
Creates the folder NAME (default: folheto) with a complete blog repository.
| Option | Effect |
|---|---|
-u, --user USER |
GitHub user. Sets site_url (https://USER.github.io/NAME/) and repo_url. |
--git / --no-git |
Runs git init (default: runs). It does not commit. |
-t, --theme THEME |
Initial look of the blog: newspaper (default), classic or minimal. See themes. |
The name accepts letters, digits, ., _ and -. The folder must not exist
with content.
folheto feed add NAME URL -c CATEGORY
Adds a feed. NAME is unique (compared by slug) and identifies the source in
the posts.
| Option | Default | Effect |
|---|---|---|
-c, --category |
(required) | Category of the posts. |
-m, --max-items |
20 |
How many of the latest news items to take per sync (1 to 100). |
--full-page / --feed-only |
--feed-only |
Downloads each news page instead of using only the feed content. |
-s, --selector |
CSS selector for the news text. Requires --full-page. Without it, uses <article> or <body>. |
|
-x, --exclude |
CSS selector of elements to remove from the text (e.g. [data-read-more]). Repeatable. Requires --full-page. |
|
--images / --no-images |
--images |
Keeps or removes images. |
folheto feed edit NAME
Changes only the options you pass: -n/--rename, -u/--url, -c, -m,
--full-page/--feed-only, -s, -x, --images/--no-images. -s "" removes
the selector and -x "" clears the exclusion list (-x replaces the whole
list).
Renaming or changing the category also updates the posts already generated
(author, category and folder). Changing the selector or exclusions only applies
to new news: use feed purge and sync to redo the old ones.
folheto feed list
Lists the feeds sorted by category.
folheto feed remove NAME
Removes the feed and the posts generated by it.
folheto feed purge NAME / folheto feed purge --all
Deletes the posts generated by one feed (or by all of them) and keeps the
configuration. Run sync afterwards to download again. Posts that belong to no
configured feed are not touched.
folheto sync [-c CATEGORY]
Downloads the new news of the feeds (or only those of one category) and creates
a post for each. News that already have a post are skipped. Network failures
become warnings and the item is retried on the next sync. It also updates
docs/.authors.yml.