I would like to know how can I use a different template for a page or article in pelican?
So far, it seems that for articles is using article.html
and for pages page.html
.
You can set the output filename by using the Template
metadata in your individual files. This will override the default that you set in your configuration file.
For Markdown you would include this in your header:
Template: template_name
This is discussed in the FAQ on the pelican website.
Pelican looks for templates in whatever directory you've specified as
THEME
in yourpelicanconf.py
. If you just want to change what the output looks like, you can modifyarticle.html
orpage.html
in that directory (the default isthemes/notmyidea
relative to wherever pelican is installed). See how to create themes for Pelican for more.If you actually want to change the name of the file that Pelican looks for to generate the articles or pages, that's a bit trickier. I don't know of any setting that allows this to be altered, but the relevant bit of the Pelican source appears to be here, so if you really want this you could consider subclassing
Content
yourself of just changing the relevant lines in your copy of Pelican.