This is a theme I started a very long time ago as a theme for the Sphinx documentation generator, but is now just a theme for the Pelican site generator. It may still function with Sphinx, but I haven't tried for nearly a decade and it wouldn't surprise me in the slightest if it didn't.
This README only contains a few brief notes, so apologies if you're trying to get this working and struggling. If I get time I might put some more details in here.
For a quick start, clone this repository somewhere -- I store it as a subtree themes/graphite in the repo where I store my blog sources, so that directory is relative to pelicanconf.py.
Within my pelicanconf.py I use these settings, although only the first two of these lines are required, depending what you want:
THEME = 'themes/graphite'
THEME_CSS = 'contrast-light.css'
THEME_CSS_MOBILE = 'contrast-light-mobile.css'
THEME_CSS_DARK = 'contrast-dark.css'
THEME_CSS_MOBILE_DARK = 'contrast-dark-mobile.css'
THEME_CSS_PRINT = 'general-print.css'
You probably want to also set at least these settings in pelicanconf.py -- see the later Settings section for the full list of settings:
SITENAME
SITEURL
The basic look is always the same, but the colours and fonts are parameterised using SASS -- if you update these, then the included updatecss.py script should perform the required generation. Any *.scss file which does not start with an underscore is converted to an equivalent *.css file in the static/ directory. The builtin colour schemes are:
To choose which colours and fonts to use, set these values in the Pelican settings file:
THEME_CSSis the normal colour scheme (defaultcontrast-light.css)THEME_CSS_DARKis the dark theme, if you want one (defaultcontrast-dark.css)THEME_CSS_MOBILEis the mobile layout CSS, if you want one (defaultcontrast-light-mobile.css)THEME_CSS_MOBILE_DARKis the dark mobile theme (defaultcontrast-dark-mobile.css)THEME_CSS_PRINTshould always be set togeneral-print.css, unless you've written your own print CSS
The four predefined options are:
graphite.cssis the original colour scheme, a light-on-dark theme with no light or mobile variants.poker.cssis a dark green variant ofgraphite.css, similarly with no variants.solarized-*.cssis my implementation of Ethan Schoonover's low contrast Solarized theme, which has dark and light variants, and mobile versions of each.contrast-*.cssis my own colour scheme very loosely based on Solarized, but significantly increasing the contrast for better accessibility.
There are a bunch of settings you can include in pelicanconf.py to change all kinds of aspects of the site. I've listed all the ones I can remember below -- some of these are standard in the Pelican theme, and some I added to support features which (at least when I added them) didn't exist there. At some point I should probably add some documentation for them, but I'm hoping most aren't too hard to figure out based on how they're used in the templates, if you're somewhat familiar with HTML.
APPLE_ICON_URLARTICLE_IMG_PATHARTICLE_IMG_SMALL_PATHAUTHORCATEGORY_FEED_ATOMCATEGORY_FEED_ATOM_URLCATEGORY_FEED_RSSCATEGORY_FEED_RSS_URLCOPYRIGHTCREDITDEFAULT_PAGINATIONDISPLAY_PAGES_ON_MENUDISQUS_SITE_NAMEFACEBOOK_APP_IDFAVICON_URLSFEED_ALL_ATOMFEED_ALL_ATOM_URLFEED_ALL_RSSFEED_ALL_RSS_URLFEED_ATOMFEED_ATOM_URLFEED_DOMAINFEED_RSSFEED_RSS_URLGITHUB_POSITIONGITHUB_URLHEADING_PREFIXHYVOR_SITE_IDGOOGLE_ANALYTICSGOOGLE_ANALYTICS_DOMAINHEADING_PREFIXLINKSLOGOURLMANIFEST_URLMENUITEMSMETA_AUTHORMETA_AUTHOR_FACEBOOKMETA_DESCRIPTIONMONTH_ARCHIVE_SAVE_ASPDF_PROCESSORPIWIK_SITE_IDPIWIK_SSL_URLPIWIK_URLSOCIALSITEIMAGEOGURLSITEIMAGETWITTERURLSITEIMAGEURLSITENAMESITESUBTITLESITEURLTAG_FEED_ATOMTAG_FEED_ATOM_URLTAG_FEED_RSSTAG_FEED_RSS_URLTHEME_COLORTHEME_COLOR_DARKTHEME_CSSTHEME_CSS_DARKTHEME_CSS_MOBILETHEME_CSS_MOBILE_DARKTHEME_CSS_PRINTTWITTER_USERNAMEYEAR_ARCHIVE_SAVE_AS