Introduction
I created StuffPages as a quick way to publish simple web pages on my web server. Basically, it takes Markdown files from a specified directory, turns them into CSS-styeld HTML files, and saves the output in another specified directory.
Have a look at some examples!
Installation
-
Make sure Python 3 (>=3.6) is installed
-
Install pipx
python3 -m pip install --user pipx python3 -m pipx ensurepath -
Install StuffPages
pipx install stuffpages
Usage
-
Initialize StuffPages within the directory that contains the Markdown files:
cd /path/to/directory/ stuffpages init -
Adapt
/path/to/directory/_stuffpages/config.pyaccording to your settings:output_diris the name of the directory that will contain the converted HTML filesignore_dirsis a list of (sub)directories (within the directory that contains the Markdown files) to not build pages fromdefaultsare the values to be used when nothing is set in the metadata of the Markdown file:titleis the default title for generated pagesdescriptionis the default description for generated pagesauthoris the default name of the author shown on generaged pagesauthorlinkis the default target the author name links tostyleis a URL or file path for the css style to be usedsettingsis an optional list of the following settings:nonavfor not creating a nav sectionnoheaderfor not creating a header sectionnofooterfor not creating a footer sectionselfcontainedfor having a _resources directory for each page
html_headis a list of lines that are injected in the final HTML output between<head>and</head>html_navis a list of lines that are injected in the final HTML output between<nav>and</nav>html_headeris a list of lines that are injected in the final HTML output between<header>and</header>html_footeris a list of lines that are injected in the final HTML output between<footer>and</footer>pagelisting_formatis a string describing the format for each item in pages listings ([PAGE])breadcrumb_formatis a string describing the format for each item in breadcrumb listings ([BREADCRUMB])extrasis a dictionary with additional modules to be used by the Markdown Python packageextras-configsis a dictionary of configurations for the additional modules
-
Build the HTML pages:
stuffpages build
Listings
Each Markdown file, as well as the html_(head|nav|header|footer) in the config file can contain special listings markers:
[TOC]will be replaced by the table of contents[PAGES]will be replaced by a list of pages sorted by title, prepending!(i.e.[!PAGES]) will reverse sort, and appending a defaults/meta data variable name (e.g. Description) will sort by that defaults/meta data (e.g.[PAGES Description])[BREADCRUMB]will be replaced by a breadcrumb trail of links from the current page to the parent page
Metadata
Release files for StuffPages 0.7.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| StuffPages-0.7.4.tar.gz | 15.8 kB | Without provenance | Details for StuffPages-0.7.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| StuffPages-0.7.4-py3-none-any.whl | Python 3 | none | any | Details for StuffPages-0.7.4-py3-none-any.whl |
Total release size: 48.2 kB
Release files / StuffPages-0.7.4.tar.gz
| Download URL | StuffPages-0.7.4.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7fb92550516e7232fb28e394a3dea9464b1078f0968c3172276ef949c38ed068
|
|
BLAKE2b-256 checksum How to use checksums |
b26c06788b58e96e1560255beec4ecdcca1a03bc192e4df5486271708c25ca5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.9
|
Release files / StuffPages-0.7.4-py3-none-any.whl
| Download URL | StuffPages-0.7.4-py3-none-any.whl |
|---|---|
| Size | 32.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
788386759d9e53bc0f5c8dbe03bf8ea799c00265014019daae0012b273ef5baf
|
|
BLAKE2b-256 checksum How to use checksums |
35ab592f0b91ad6207baf5803de119dd7de6baccc6c1c34b6a6f70ccff1c516a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.9
|
Security for StuffPages 0.7.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.