pelican-themes icon indicating copy to clipboard operation
pelican-themes copied to clipboard

gum: Add optional extra CSS and JS resources

Open slinkp opened this issue 1 year ago • 1 comments

With this change, the gum theme can be tweaked for style and behavior without forking it:

  1. Create a static css or js file, eg "content/static/foo.css" and "content/static/foo.js" in your site tree.

  2. In pelicanconf.py, make sure the directory containing your file is included in STATIC_PATHS.

  3. Add to pelicanconf.py:

THEME = 'gum'
CUSTOM_CSS_FILES = ['static/foo.css']
CUSTOM_JS_FILES = ['static/foo.js']

These will be loaded after the default Gum styles and scripts.

Remotely hosted assets can be supported as well, via CUSTOM_CSS_URLS and CUSTOM_JS_URLS.

I'm using this on my own website to eg override a few colors and tag cloud text styles: https://slinkp.com/

slinkp avatar Jul 09 '23 06:07 slinkp