podpack-pages
A podpack app serving a site's prose content — Markdown and HTML files — from
a single name space. /pages/<name> searches the Markdown tree
(md-pages/<name>.md) first and the HTML tree (html-pages/<name>.html)
second, so a page's address never says which format it is stored in, and a
Markdown page shadows an HTML one of the same name.
Three spellings, per podpack convention: the distribution is podpack-pages,
the import name (for a site's apps list) is podpack_pages, and the app
answers to pages — its blueprint's name, which keys [apps.pages],
[site.mounts] and its directories on disk.
Content location
Content lives in the app's host data directory:
<data root>/pages/md-pages/ Markdown, searched first
<data root>/pages/html-pages/ HTML, searched second; assets live beside pages
The package ships a starter data/ tree which podpack seeds to the host on
first install, so editing a page on the host changes the site with no rebuild.
Routes
| Route | What it does |
|---|---|
/pages/<name> |
serve the page, Markdown space first |
/pages/asset/<path> |
serve an asset (image, stylesheet) belonging to a page |
Relative src/href references inside HTML pages are rewritten server-side
through url_for("pages.asset", ...), so they follow the app wherever the
site mounts it. A page named asset/... would be shadowed by the asset route;
don't create one.
Markdown rendering
Extensions mdx_math and codehilite are enabled. A leading # Heading
becomes the page's title and is removed from the body; a page without one
gets [apps.pages] default_title, or "Untitled".
Configuration
[apps.pages]
default_title = "Just another note" # title for Markdown pages with no heading
Both settings are optional; the app ships defaults.
Requirements of the site's chrome
The Markdown template fills {% block scripts %} with MathJax. A site chrome
that does not define that block silently drops it — mathematics then renders
as raw TeX.
Metadata
Release files for podpack-pages 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| podpack_pages-0.2.0.tar.gz | 1.0 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| podpack_pages-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.1 MB
Release files / podpack_pages-0.2.0.tar.gz
| Download URL | podpack_pages-0.2.0.tar.gz |
|---|---|
| Size | 1.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb892bf17a6c45c50f3027d7eabe04db6b7ae5d40f33870811e68543f65161e4
|
|
BLAKE2b-256 checksum How to use checksums |
989f1dd72e904f218ad1487dd159cdb4427dbd6ce3e46867c6dd7066e4f930e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / podpack_pages-0.2.0-py3-none-any.whl
| Download URL | podpack_pages-0.2.0-py3-none-any.whl |
|---|---|
| Size | 1.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
212a851a71faa4872fbda73b81736bdd398a0ffb9ddb8ef0a3450d4d714b6631
|
|
BLAKE2b-256 checksum How to use checksums |
eae36dc58b9d21c1befd71970f133533dafda2033ec357f61e6f5a7833db3e78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|