Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gum: Add optional extra CSS and JS resources #752

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

slinkp
Copy link
Contributor

@slinkp slinkp commented Jul 9, 2023

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 slinkp force-pushed the slinkp/add-custom-css branch from 318a646 to 12187f5 Compare May 8, 2024 16:42
@slinkp slinkp changed the title gum: Add optional CUSTOM_CSS setting gum: Add optional extra CSS and JS resources May 8, 2024
Copy link
Member

@justinmayer justinmayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the submission, Paul. I made a few minor suggestions. What do you think about them?

gum/README.md Outdated Show resolved Hide resolved
gum/README.md Outdated Show resolved Hide resolved
gum/README.md Outdated Show resolved Hide resolved
@slinkp slinkp force-pushed the slinkp/add-custom-css branch from 2707d51 to 9359c0c Compare May 9, 2024 17:08
@slinkp slinkp force-pushed the slinkp/add-custom-css branch from 9359c0c to 70464c2 Compare May 9, 2024 17:10
@slinkp
Copy link
Contributor Author

slinkp commented May 9, 2024

@justinmayer Thanks for the feedback! All done and squashed to a single commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants