1
0
Fork 0
forked from github/pelican
pelican-theme/pelican
Andy Pearce 39518e15ef Allow text substitutions when generating slugs
The `slugify()` function used by Pelican is in general very good at
coming up with something both readable and URL-safe. However, there are
a few specific cases where it causes conflicts. One that I've run into
is using the strings `C++` and `C` as tags, both of which transform to
the slug `c`. This commit adds an optional `SLUG_SUBSTITUTIONS` setting
which is a list of 2-tuples of substitutions to be carried out
case-insensitively just prior to stripping out non-alphanumeric
characters. This allows cases like `C++` to be transformed to `CPP` or
similar. This can also improve the readability of slugs.
2013-07-04 12:17:21 +01:00
..
tests Allow text substitutions when generating slugs 2013-07-04 12:17:21 +01:00
themes Clean up and improve <head> of notmyidea theme 2013-04-23 06:51:22 -07:00
tools Merge pull request #880 from joeshaw/pre-index-fix 2013-06-29 08:02:27 -07:00
__init__.py Keep certain files when cleaning output; fix #574 2013-06-25 19:03:32 -07:00
contents.py Allow text substitutions when generating slugs 2013-07-04 12:17:21 +01:00
generators.py Merge pull request #898 from saimn/fix-markup-cli 2013-06-19 06:51:59 -07:00
log.py fix for issue #761: handle unicode correctly in summary for Markdown 2013-04-03 19:38:42 -04:00
paginator.py Port pelican to python 3. 2013-01-11 03:20:09 +01:00
readers.py readers: Ensure the reader class is enabled before instantiating 2013-06-12 17:37:21 -04:00
rstdirectives.py Port pelican to python 3. 2013-01-11 03:20:09 +01:00
server.py Adding a message for gracefully shutting down dev server 2013-03-19 12:15:58 +01:00
settings.py Allow text substitutions when generating slugs 2013-07-04 12:17:21 +01:00
signals.py generators: Update PagesGenerator to use new read_file 2013-06-12 15:02:31 -04:00
urlwrappers.py Allow text substitutions when generating slugs 2013-07-04 12:17:21 +01:00
utils.py Allow text substitutions when generating slugs 2013-07-04 12:17:21 +01:00
writers.py Replace settings.get(key) with settings[key] for default settings 2013-06-02 14:24:27 -04:00