Fixes#64, #65
Now users who wish to use Bootstrap dynamic elements (like dropdown menus)
can enable JavaScript either by including required scripts into their
static assets or by referencing their CDN URLs.
By default Alchemy uses no JavaScript - that has not changed.
There are multiple places in the theme where URL value may be either
relative to site root or pointing to a third-party resource. Separating
the handler logic into a macro makes sense.
Now BOOTSTRAP_CSS may contain paths relative to site root - that allows
users to apply custom Boostwatch themes without depending on third party
resources (custom theme may be included as static file and referenced via
relative path).
This commit adds new configuration parameter, THEME_CSS_OVERRIDES, which
can contain a sequence (list, tuple, etc) of URLs to extra stylesheets
that will be used to override default theme appearance. Both absolute and
relative URLs are supported.
It makes the theme more flexible by allowing small stylesheet tweaks
without requiring to maintain a fork of the whole theme.
When this parameter is not set the theme behaves same as before.
Alchemy is a great theme, but it was not using the full potential of
underlying technology. Bootstrap provides an easy way to customize look
and feel of rendered pages, and a lot of themes for Bootstrap are freely
available, e.g. at <https://boostwatch.com>
This commit introduces a new configuration variable BOOTSTRAP_CSS to make
use of any existing Bootstrap skins. All incompatibilities in `theme.css`
were fixed:
- Instead of using constant color values we use Bootstrap css variables for
colors:
<https://getbootstrap.com/docs/4.3/getting-started/theming/#css-variables>
- The only hardcoded color value left is the color for header/footer
borders. It was moved into a variable `--alchemy-border` for easier
overriding if needed. I have tested the current value against both dark
and light Boostwatch themes, it works ok.
- Pagination template was slightly changed to avoid producing invisible
text with some of Bootstrap skins
To generate pygments theme files, get a list of known styles:
>>> from pygments.styles import STYLE_MAP
>>> STYLE_MAP.keys()
['default', 'emacs', 'friendly', 'colorful']
Generate the relevant stylesheet etc:
$ pygmentize -S emacs -f html -a '.highlight pre' > pygments/emacs.css
- New realfavicongenerator.net packages (https://realfavicongenerator.net/blog/new-favicon-package-less-is-more/)
- Support all possible Pelican feed links
- Add recommended HEAD elements (https://github.com/joshbuchea/HEAD)
- Use minified css assets
- Link to boostrap, clean-blog and font-awesome stylesheets
- Add theme options, better options names
Template consistency, update structure on base.html
Fix missing article summary on index.html
Show the article.summary for teasers