Hosting raw HTML pages in a Pelican static website

Viewed 1275

Is there a way in Pelican (Python) static site generator to pass in just a raw HTML page only? At the moment I am trying to place a google-site-verification HTML file to be permanent hosted in the root directory. I have run into this issue a few other times, unrelated to the google site verification.

In an ideal world I would place the HTML file in the content directory, like an rst or an md file, and then it is picked up and dropped into the output directory. This is obviously not working, hence why I am here.

3 Answers

The accepted answer helped me, but this comment wasn't necessary IF you want the static HTML rendered

Here's snippet from pelicanconf.py that is working for me, which adds a static site based on the html file located at content/html/page_name.html with this path http://localhost/page_name.html

STATIC_PATHS = [
    'images',
    'extra',
    'html',
]
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'},
    'html/page_name.html' : {'path' : 'page_name.html'}
}
Related