Hosting raw HTML pages in a Pelican static website
The simplest way to include arbitrary files in the output is with EXTRA_PATH_METADATA
and STATIC_PATHS
. For example, from my blog's config:
STATIC_PATHS = [
'images',
'extra',
]
EXTRA_PATH_METADATA = {
'extra/custom.css': {'path': 'custom.css'},
'extra/robots.txt': {'path': 'robots.txt'},
'extra/favicon.ico': {'path': 'favicon.ico'},
'extra/CNAME': {'path': 'CNAME'},
'extra/LICENSE': {'path': 'LICENSE'},
'extra/README': {'path': 'README'},
}
This takes the specified files from /content/extra
and puts them in the root of /output
.
As you have an HTML file in your extras, you will also need to include your static directory in ARTICLE_EXCLUDES
to prevent Pelican from trying to process the file.