1
0
Fork 0
forked from github/pelican
Custom Pelican theme, colorway heavily inspired by rosepinetheme.com https://lugh.ch
  • CSS 68.5%
  • HTML 26.5%
  • JavaScript 5%
Find a file
Deniz Turgut 03d9c38871 Rewrite pelican.utils.slugify to use unicode and add tests
Adds a use_unicode kwarg to slugify to keep unicode
characters as is (no ASCII-fying) and add tests for
it. Also reworks how slugification logic.

slugify started with the Django method for slugiying:
 - Normalize to compatibility decomposed from (NFKD)
 - Encode and decode with 'ascii'

This works fine if the decomposed form contains ASCII
characters (i.e. ç can be changed in to c+CEDILLA and
ASCII would keep c only), but fails when decomposition
doesn't result in ASCII characters (i.e. Chinese). To
solve that 'unidecode' was added, which works fine for
both cases. However, old method is now redundant but
was kept. This commit removes the old method and
adjusts logic slightly.

Now slugify will normalize all text with composition
mode (NFKC) to unify format for regex substitutions.
And then if use_unicode is False, uses unidecode to
convert it to ASCII.
2020-04-19 20:10:46 +03:00
.github Update stale.yml 2019-10-21 20:12:39 +02:00
docs Add Typogrify/SmartyPants dashes config parameter (#2615) 2020-04-16 13:32:19 +02:00
pelican Rewrite pelican.utils.slugify to use unicode and add tests 2020-04-19 20:10:46 +03:00
requirements Run tests in parallel on multi-core systems 2020-04-13 08:55:29 +02:00
samples Add a draft without date for #2488 2020-04-14 23:52:46 +03:00
.coveragerc [coveralls] Exclude tests from coverage 2014-06-24 22:29:36 +01:00
.editorconfig Add initial EditorConfig configuration 2019-11-09 08:37:54 -08:00
.gitattributes Add missing .gitattributes attributes. Refs #2069 2016-12-23 08:03:57 -08:00
.gitignore Add poetry.lock to list of files for Git to ignore 2020-04-12 15:21:17 +02:00
.mailmap .mailmap: Add mappings to consolidate author names and emails 2013-04-12 10:51:48 -04:00
.pre-commit-config.yaml Put pre-commit excludes where they actually belong 2020-04-14 17:47:07 +02:00
.travis.yml Remove Python 2.7 support from settings 2019-11-05 21:04:56 +01:00
CONTRIBUTING.rst Minor CONTRIBUTING fixes 2019-11-12 14:20:50 -08:00
LICENSE Update links to HTTPS and current 301 redirects in docs/templates/themes (#2661) 2020-04-12 16:38:35 +02:00
MANIFEST.in Add pyproject.toml to MANIFEST.in 2019-07-14 17:09:11 +02:00
pyproject.toml Run tests in parallel on multi-core systems 2020-04-13 08:55:29 +02:00
README.rst Update links to HTTPS and current 301 redirects in docs/templates/themes (#2661) 2020-04-12 16:38:35 +02:00
setup.cfg Revert setup.py changes. Ensure universal wheels. 2014-07-01 14:33:04 -07:00
setup.py Increase Jinja version minimum to 2.11+ 2020-04-12 17:02:06 +02:00
tasks.py Add Invoke tasks for building and serving docs 2019-11-12 08:36:22 -08:00
THANKS Initial pass of removing Python 2 support 2019-11-26 06:16:41 +09:00
tox.ini Run tests in parallel on multi-core systems 2020-04-13 08:55:29 +02:00

Pelican |build-status| |pypi-version|
=====================================

Pelican is a static site generator, written in Python_.

* Write content in reStructuredText_ or Markdown_ using your editor of choice
* Includes a simple command line tool to (re)generate site files
* Easy to interface with version control systems and web hooks
* Completely static output is simple to host anywhere


Features
--------

Pelican currently supports:

* Chronological content (e.g., articles, blog posts) as well as static pages
* Integration with external services (e.g., Google Analytics and Disqus)
* Site themes (created using Jinja2_ templates)
* Publication of articles in multiple languages
* Generation of Atom and RSS feeds
* Syntax highlighting via Pygments_
* Importing existing content from WordPress, Dotclear, and other services
* Fast rebuild times due to content caching and selective output writing

Check out `Pelican's documentation`_ for further information.


How to get help, contribute, or provide feedback
------------------------------------------------

See our `contribution submission and feedback guidelines <CONTRIBUTING.rst>`_.


Source code
-----------

Pelican's source code is `hosted on GitHub`_. If you feel like hacking,
take a look at `Pelican's internals`_.


Why the name "Pelican"?
-----------------------

"Pelican" is an anagram of *calepin*, which means "notebook" in French.


.. Links

.. _Python: https://www.python.org/
.. _reStructuredText: http://docutils.sourceforge.net/rst.html
.. _Markdown: https://daringfireball.net/projects/markdown/
.. _Jinja2: https://palletsprojects.com/p/jinja/
.. _Pygments: https://pygments.org/
.. _`Pelican's documentation`: https://docs.getpelican.com/
.. _`Pelican's internals`: https://docs.getpelican.com/en/latest/internals.html
.. _`hosted on GitHub`: https://github.com/getpelican/pelican

.. |build-status| image:: https://img.shields.io/travis/getpelican/pelican/master.svg
   :target: https://travis-ci.org/getpelican/pelican
   :alt: Travis CI: continuous integration status
.. |pypi-version| image:: https://img.shields.io/pypi/v/pelican.svg
   :target: https://pypi.python.org/pypi/pelican
   :alt: PyPI: the Python Package Index