mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Static site generator that supports Markdown and reST syntax. Powered by Python.
- Python 85.3%
- CSS 8.7%
- Jinja 6%
The markdown import of pandoc is their own flavour of markdown. It for instance uses fenced divs[1] which are not supported by python-markdown. When importing content from Wordpress, there is several issues as explained in discussion 3113[2] This change follows a discussion with pandoc developer[3] [1] https://pandoc.org/MANUAL.html#divs-and-spans [2] https://github.com/getpelican/pelican/discussions/3113 [3] https://fosstodon.org/@pandoc/110105559949588768 Take the following Wordpress blog post sample: ```html <p><!-- wp:paragraph --></p> <p>Paragraph content</p> <p><!-- /wp:paragraph --></p> <p><!-- wp:image {"align":"center","id":3747,"sizeSlug":"full"} --></p> <div class="wp-block-image"> <figure class="aligncenter size-full"><img src="https://test.com/test.jpg" alt="" class="wp-image-3747" title="Some title"/><br /> <figcaption><em>Some caption</em></figcaption> </figure> </div> <p><!-- /wp:image --></p> ``` Before this commit: was imported as ```md `<!-- wp:paragraph -->`{=html} Paragraph content `<!-- /wp:paragraph -->`{=html} `<!-- wp:image {"align":"center","id":3747,"sizeSlug":"full"} -->`{=html} ::: wp-block-image <figure class="aligncenter size-full"> <img src="https://test.com/test.jpg" title="Some title" class="wp-image-3747" /><br /> <figcaption><em>Some caption</em></figcaption> </figure> ::: `<!-- /wp:image -->`{=html} ``` After this change: ```md <!-- wp:paragraph --> Paragraph content <!-- /wp:paragraph --> <!-- wp:image {"align":"center","id":3747,"sizeSlug":"full"} --> <div class="wp-block-image"> <figure class="aligncenter size-full"> <img src="https://test.com/test.jpg" title="Some title" class="wp-image-3747" /><br /> <figcaption><em>Some caption</em></figcaption> </figure> </div> <!-- /wp:image --> ``` Fixes #3113 |
||
|---|---|---|
| .github | ||
| docs | ||
| pelican | ||
| requirements | ||
| samples | ||
| .coveragerc | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .mailmap | ||
| .pre-commit-config.yaml | ||
| CONTRIBUTING.rst | ||
| LICENSE | ||
| MANIFEST.in | ||
| pyproject.toml | ||
| README.rst | ||
| setup.cfg | ||
| setup.py | ||
| tasks.py | ||
| THANKS | ||
| tox.ini | ||
Pelican |build-status| |pypi-version| |repology| ================================================ Pelican is a static site generator, written in Python_, that allows you to create web sites by composing text files in formats such as Markdown, reStructuredText, and HTML. With Pelican, you can create web sites without worrying about databases or server-side programming. Pelican generates static sites that can be served via any web server or hosting service. You can perform the following functions with Pelican: * Compose content in Markdown_ or reStructuredText_ using your editor of choice * Simple command-line tool (re)generates HTML, CSS, and JS from your source content * Easy to interface with version control systems and web hooks * Completely static output is simple to host anywhere Features -------- Pelican’s feature highlights include: * Chronological content (e.g., articles, blog posts) as well as static pages * Integration with external services * Site themes (created using Jinja2_ templates) * Publication of articles in multiple languages * Generation of Atom and RSS feeds * Code syntax highlighting via Pygments_ * Import existing content from WordPress, Dotclear, or RSS feeds * Fast rebuild times due to content caching and selective output writing * Extensible via a rich plugin ecosystem: `Pelican Plugins`_ Check out the `Pelican 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`_. For information on how it works, have 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 Plugins`: https://github.com/pelican-plugins .. _`Pelican 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/github/actions/workflow/status/getpelican/pelican/main.yml?branch=master :target: https://github.com/getpelican/pelican/actions/workflows/main.yml?query=branch%3Amaster :alt: GitHub Actions CI: continuous integration status .. |pypi-version| image:: https://img.shields.io/pypi/v/pelican.svg :target: https://pypi.org/project/pelican/ :alt: PyPI: the Python Package Index .. |repology| image:: https://repology.org/badge/tiny-repos/pelican.svg :target: https://repology.org/project/pelican/versions :alt: Repology: the packaging hub