Go to file
Vitaly Potyarkin a392498f69 Support all edge cases for direct template links
Non-hardcoded paths are not that simple.

Direct templates do not always have meaningful *_URL or even *_SAVE_AS
values. More than that, those variables are not even defined by default.
Therefore we need to replicate the logic used by Pelican itself when
calculating the path to direct template output.

Related:

- DIRECT_TEMPLATES handling by Pelican:
  01eb08c42b/pelican/generators.py (L537-L550)
- Pelican issue for "Why are CATEGORIES_URL and TAGS_URL gone?"
  https://github.com/getpelican/pelican/issues/1225

Merges #75
2019-10-22 11:47:27 +03:00
alchemy Support all edge cases for direct template links 2019-10-22 11:47:27 +03:00
screenshots Add screenshots with different Boostwatch themes 2019-10-18 17:06:18 +03:00
.gitignore Enable installation with pip 2019-09-27 12:20:52 +03:00
CODE_OF_CONDUCT.md Refresh code of conduct 2017-11-21 15:25:00 +03:00
LICENSE Add missing copyright year 2017-11-21 15:25:36 +03:00
MANIFEST.in Enable installation with pip 2019-09-27 12:20:52 +03:00
README.md Allow providing JavaScript assets for generated website 2019-10-18 18:08:37 +03:00
setup.py Enable installation with pip 2019-09-27 12:20:52 +03:00

README.md

Pelican Alchemy

A magical Pelican theme

Alchemy is a functional, clean, responsive theme for the Pelican static site generator.

Inspired by crowsfoot and clean-blog, it features:

** Features link to external assets (webfonts etc).

Screenshots

Default colors

Old style (see below)

Sketchy (Boostwatch)

Solar (Boostwatch)

United (Boostwatch)

To enable old visual style add THEME_CSS_OVERRIDES = ['theme/css/oldstyle.css'] to your pelicanconf.py and use no Boostwatch themes. See stylesheet for more information.

Installation

From Git repo

Clone the repo:

git clone https://github.com/nairobilug/pelican-alchemy

Set the THEME variable in your Pelican config:

THEME = '<PATH_TO_REPO>/alchemy'

As a Submodule

In your Pelican site:

mkdir themes
git submodule add https://github.com/nairobilug/pelican-alchemy themes/pelican-alchemy

And in Pelican config:

THEME = 'themes/pelican-alchemy/alchemy'

With pip

Alternatively, you can install this theme with pip:

pip install "https://github.com/nairobilug/pelican-alchemy/tarball/master"

And import it from Pelican config:

import alchemy
THEME = alchemy.path()

Usage

Visit the Settings wiki for examples:

  • SITESUBTITLE: Subtitle that appears in the header.
  • SITEIMAGE: Image that appears in the header.
  • DESCRIPTION: Index HTML head <meta> description.
  • LINKS: A list of tuples (Title, URL) for menu links.
  • ICONS: A list of tuples (Icon, URL) for icon links.
  • BOOTSTRAP_CSS: URL of Bootstrap CSS file. Use this to enable Boostwatch themes.
  • 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.
  • THEME_JS_OVERRIDES: Sequence of JavaScript URLs to enable with this theme. Alchemy uses no JS by default. Both relative and absolute URLs are supported.

Misc settings:

  • DISQUS_SITENAME
  • GAUGES
  • GOOGLE_ANALYTICS
  • PIWIK_URL
  • PIWIK_SITE_ID

Example pelicanconf.py (demo website).

Tips & Tricks

https://github.com/nairobilug/pelican-alchemy/wiki/Tips

How to Contribute

  1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
  2. Fork the repository on GitHub to start making your changes to the master branch (or branch off of it).
  3. Send a pull request and bug the maintainer until it gets merged and published. :)

Alchemy follows the Contributor Covenant code of conduct.

License

MIT © 2017 Nairobi GNU/Linux Users Group