Skip to content

Commit

Permalink
Merge pull request #80 from sio/override-css
Browse files Browse the repository at this point in the history
Add configuration parameter to override the stylesheet 👍
  • Loading branch information
rwanyoike committed Sep 27, 2019
2 parents 555da79 + 63e4576 commit 0c6fd9e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ Visit the [Settings wiki](https://github.com/nairobilug/pelican-alchemy/wiki/Set
- **PYGMENTS_STYLE**: Built-in Pygments style for syntax highlighting.
- **HIDE_AUTHORS**: Hide the author(s) of an article - useful for single author sites.
- **RFG_FAVICONS**: Use a Favicon Generator package.
- **THEME_CSS_OVERRIDES**: Sequence of stylesheet URLs to override CSS provided by theme.
Both relative and absolute URLs are supported.

Misc settings:

Expand Down
7 changes: 7 additions & 0 deletions alchemy/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/font-awesome.min.css">
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/pygments/{{ PYGMENTS_STYLE|default('default') }}.min.css">
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/theme.css">
{% for stylesheet in THEME_CSS_OVERRIDES or () %}
{% if stylesheet|lower|truncate(4, True, '') == 'http' %}
<link rel="stylesheet" href="{{ stylesheet }}">
{% else %}
<link rel="stylesheet" href="{{ SITEURL + '/' + stylesheet }}">
{% endif %}
{% endfor %}

{% include 'include/xml_feeds.html' %}
{% block head %}{% endblock %}
Expand Down

0 comments on commit 0c6fd9e

Please sign in to comment.