CName Pelican Plugin 1.0.0 Released

CName is a plugin for Pelican, a static site generator written in Python.

CName creates a CNAME file in the root of your output directory. This is useful when you are publishing your site to GitHub Pages on a custom domain.

Installation

The easiest way to install CName is through the use of pip. This will also install the required dependencies automatically.

pip install minchin.pelican.plugins.cname

Then, in your pelicanconf.py file, add CName to your list of plugins:

PLUGINS = [
          # ...
          'minchin.pelican.plugins.cname',
          # ...
        ]

And that’s it! No further configuration is needed.

Usage

No configuration is needed. The value places in the CNAME files is based on your SITEURL setting.

Known Issues

As the plugin makes use of the SITEURL plugin, if you are using both a pelicanconf.py and a publishconf.py settings file, CName will likely generate different results for when you are testing your site locally and when you push it to production.

Credits

I can’t claim I came up with the original idea. It is based on the original code by Dmitriy Kalinin, that has languished as an open pull request in the pelican-plugins repo for the last year.

Code

The code for this project is available on GitHub. Contributions are welcome!


Other posts


Other posts under Pelican Plugins



Comments

There are no comments yet. Will add the first one?

Add a Comment

You can use the Markdown syntax to format your comment.

or alternately, send me your thoughts at minchinweb [at] gmail.com

Comment Atom Feed (for this post)