A simple Pelican theme that attempts to integrate opengraph and schema.org tags as well as having an easy to read experience. It is designed with one author in mind.
These properties can be be used to improve meta data for the site.
TWITTER_USERNAME
: Used to toggle information that is twitter specific.
GITHUB_USERNAME
: Used to help with indeweb logins when twitter is not available
FACEBOOK_PROFILES_URL
: Used to toggle information that facebook might need.
FACEBOOK_APPID
: If you have an AppID from facebook.
DISQUS_SITENAME
: To allow chat on the site.
GITHUB_USERNAME
: To allow for Github authentication.
OPEN_GRAPH_INFO
: To allow OpenGraph information.
WEBMENTIONS:
: To allow the site to have webmentions. Set to url of address (example: mandarismoore.com)
MICROBLOG_USERNAME
: To allow you to validate your Micro.blog account.
AUTHOR_IMAGE
: A picture of the author to use
AUTHOR_NOTE
: Information that the author wants to share
AUTHOR_URL
: URL for the author
I use the following to make sure that all my icons are placed where I'm expecting.
EXTRA_PATH_METADATA = {'extra/favicon.png': {'path': 'favicon.png'},
'extra/apple-touch-icon.png': {'path': 'apple-touch-icon.png'},
'extra/apple-touch-icon-precomposed.png': {'path': 'apple-touch-icon-precomposed.png'},
'extra/favicon.ico': {'path': 'favicon.ico'},}
This theme relies on the pelican-open_graph plugin. There are other kinds out there but I've been using this one for years.
A new version of RSS has come out that distributes the content as JSON instead of xml. You can read about the plugin on its github page.
I have it set to toggle on when FEED_JSON
is defined so that it matches the other feeds.
This theme uses two markdown extensions to format the raw text into html. These need to be installed into your environment by downloading and then running the python setup.py install
command.
I use this to make standalone images into figures. You can read about my set up here. As of this writing, I've still have a pull request to allow reference links.
Link: https://github.com/jdittrich/figureAltCaption
Python-Markdown has a built in feature for making a Table of Contents and making sure that the text being generated has the correct heading levels.
This is what I have in my config file to control the markdown generation.
MARKDOWN = {
'extension_configs': {
'markdown.extensions.codehilite': {'css_class': 'highlight'},
'markdown.extensions.extra': {},
'markdown.extensions.meta': {},
'markdown.extensions.toc': {'baseheader': '3', 'title': 'Table of Contents'}
'figureAltCaption':{},
},
'output_format': 'html5',
}