Static site generator that supports Markdown and reST syntax. Powered by Python.

Overview

Pelican GitHub Actions CI: continuous integration status PyPI: the Python Package Index Repology: the packaging hub

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.

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.

Comments
  • Pelican logo

    Pelican logo

    If some talented individual could cook up a vector logo (SVG) for pelican users and their themes, we could proudly show a "Generated by Pelican" icon. :bird:

    Just an idea, perhaps something like http://openclipart.org/detail/26579/pelican-with-fish-by-johnny_automatic

    opened by russkel 129
  • Different license

    Different license

    The AGPL is a highly viral license, which means that there are contexts where I cannot use Pelican even though I would want to.

    Given that Pelican is not intended to be used as a server-side application, the GPL would preserve the same essential freedoms while allowing a greater scope for use.

    I don't mean to whinge. Fundamentally, I am grateful for Pelican and for it being released as open source software. I realize that license changing bugs can be a hassle and I respect the right of authors of a work to choose how it's shared. However, I do want to make it clear that at least one of your users would rather it weren't AGPL.

    opened by jml 44
  • speed up

    speed up

    to speed up the generation on really big blogs (>200 entries), Pelican should look at the rst.md file dates + html dates and skip the files that are up to date

    opened by tarekziade 40
  • Add Site Search

    Add Site Search

    I'm thinking we could just generate a JSON file that contains the search index, and have some client side JS search through that index and display results.

    I'm not sure the best way to roll this into Pelican, however, as it seems to me that a large portion of the functionality would need to be written into the theme? Unless we have Pelican generate the index and a generic implementation of the JS search code, and have the templates just call that generic search routine to get a list of objects to style how it sees fit.

    I'm thinking we could model this after Sphinx quite nicely.

    I'm willing to take on this piece once there's a good plan for implementation and for rolling into Pelican.

    enhancement 
    opened by stupergenius 40
  • Error when attempting to manually overwrite a category page

    Error when attempting to manually overwrite a category page

    I am trying to manually overwrite an automatically generated category page (which worked in previous versions) and I get this error:

    CRITICAL: File /Users/jack/code/mine/jack.minardi.org/.source/output/projects/index.html is to be overwritten
    

    Which I think was introduced by this commit: https://github.com/getpelican/pelican/commit/ff7410c

    Is there any way to go back to the old behavior where I was able to manually write my own page to a category page.

    If not, is there a different way to accomplish what I am trying to do?

    opened by jminardi 38
  • "pelican -lr" fails on Windows

    Hi @justinmayer !

    I just installed pelican from the latest commit and found pelican -lr to not be working on Windows. Either works, on the other hand (pelican -l or pelican -r).

    I get the following output:

    $ pelican -lrD
    DEBUG: Pelican version: 3.7.2.dev0
    DEBUG: Python version: 3.6.2
    DEBUG: Adding current directory to system path
    DEBUG: Temporarily adding PLUGIN_PATHS to system path
    DEBUG: Restoring system path
    CRITICAL: TypeError: can't pickle generator objects
    Traceback (most recent call last):
      File "c:\users\jonathan hale\appdata\local\programs\python\python36\lib\runpy.                                                                                              py", line 193, in _run_module_as_main
        "__main__", mod_spec)
      File "c:\users\jonathan hale\appdata\local\programs\python\python36\lib\runpy.                                                                                              py", line 85, in _run_code
        exec(code, run_globals)
      File "C:\Users\Jonathan Hale\AppData\Local\Programs\Python\Python36\Scripts\pe                                                                                              lican.exe\__main__.py", line 9, in <module>
      File "c:\users\jonathan hale\appdata\local\programs\python\python36\lib\site-p                                                                                              ackages\pelican\__init__.py", line 563, in main
        p1.start()
      File "c:\users\jonathan hale\appdata\local\programs\python\python36\lib\multip                                                                                              rocessing\process.py", line 105, in start
        self._popen = self._Popen(self)
      File "c:\users\jonathan hale\appdata\local\programs\python\python36\lib\multip                                                                                              rocessing\context.py", line 223, in _Popen
        return _default_context.get_context().Process._Popen(process_obj)
      File "c:\users\jonathan hale\appdata\local\programs\python\python36\lib\multip                                                                                              rocessing\context.py", line 322, in _Popen
        return Popen(process_obj)
      File "c:\users\jonathan hale\appdata\local\programs\python\python36\lib\multip                                                                                              rocessing\popen_spawn_win32.py", line 65, in __init__
        reduction.dump(process_obj, to_child)
      File "c:\users\jonathan hale\appdata\local\programs\python\python36\lib\multip                                                                                              rocessing\reduction.py", line 60, in dump
        ForkingPickler(file, protocol).dump(obj)
    TypeError: can't pickle generator objects
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\jonathan hale\appdata\local\programs\python\python36\lib\multip                                                                                              rocessing\spawn.py", line 99, in spawn_main
        new_handle = reduction.steal_handle(parent_pid, pipe_handle)
      File "c:\users\jonathan hale\appdata\local\programs\python\python36\lib\multip                                                                                              rocessing\reduction.py", line 87, in steal_handle
        _winapi.DUPLICATE_SAME_ACCESS | _winapi.DUPLICATE_CLOSE_SOURCE)
    PermissionError: [WinError 5] Zugriff verweigert
    
    

    ("Zugriff verweigert" means "Access denied")

    This is on a basic pelican-quickstart project, no additional plugins, content or custom theme.

    Though this may be important for #2162 .

    Cheers, Jonathan.

    opened by Squareys 31
  • Add THEME_TEMPLATE_OVERRIDES. Refs #2021

    Add THEME_TEMPLATE_OVERRIDES. Refs #2021

    Allow for overriding individual templates from the theme by configuring the Jinja2 Environment loader to search for templates in the THEME_TEMPLATE_OVERRIDES path before the theme's templates/ directory.

    opened by pedrohdz 31
  • Pelican should print a warning when encountering a .md file while markdown is not installed

    Pelican should print a warning when encountering a .md file while markdown is not installed

    Hello,

    Currently, pelican will skip .md files if the "markdown" python packge is not installed. This result in a WARNING: No valid files found in content." which is extremely confusing and has made me lost 30min of debugging.

    A better behavior would be to print a warning because there isn't a situation where a user would add a .md file to his content/ while not wanting it to be parsed.

    Kind regards,

    opened by Psycojoker 30
  • Avoid Markdown 2.6 deprecations

    Avoid Markdown 2.6 deprecations

    • Short extension names ('extra', 'meta') are deprecated
      https://pythonhosted.org/Markdown/release-2.6.html#shortened-extension-names-deprecated
    • Extension config as part of extension name is deprecated
      https://pythonhosted.org/Markdown/release-2.6.html#extension-configuration-as-part-of-extension-name-deprecated

    The MD_EXTENSIONS documentation in docs/settings.rst hasn't been touched, so it still shows the old value.

    opened by kernc 30
  • Images can be anywhere in the content directory, not only static paths

    Images can be anywhere in the content directory, not only static paths

    Hello Using Pelican version 3.2.2

    → pelican --version
    3.2.2
    

    With the current file

    Title: Network Panel in Firefox 23 Developer Tools
    Date: 2013-08-07
    Slug: network-panel-firefox
    Status: draft
    
    […]
    ![Firefox 22 Screenshot with developer tools](|filename|firefox22-devtools.jpg)
    
    […]
    ![Firefox 23 Screenshot with developer tools](|filename|firefox23-devtools.jpg)
    

    In the current structure

    → ls -1 content/2013/08/07/
    firefox22-devtools.jpg
    firefox23-devtools.jpg
    network-panel.md
    

    And generating the html

    → make html
    

    creates the output among other lines.

    WARNING: Unable to find 2013/08/07/firefox22-devtools.jpg, skipping url replacement
    WARNING: Unable to find 2013/08/07/firefox23-devtools.jpg, skipping url replacement
    

    Then accessing the draft folder

    http://localhost:8000/drafts/network-panel-firefox.html
    

    Images are not displayed. Inside the HTML, the code is

    <p><img alt="Firefox 23 Screenshot with developer tools" 
           src="|filename|firefox23-devtools.jpg" /></p>
    

    make rsync_upload has the same issue

    Using

    RELATIVE_URLS = True
    

    doesn't solve the issue.

    What I would expect

    The images to be displayed and put at the right place on 2013/08/07/firefox23-devtools.jpg.

    Thanks.

    enhancement 
    opened by karlcow 29
  • New, More Thorough HTMLParser

    New, More Thorough HTMLParser

    Included is a new HTMLParser class that more closely mimics HTML style and also uses python's builtin HTMLParser class rather than relying on regexes.

    Rather than parsing for metadata in HTML comments, it pulls metadata out of the meta tag. It also pulls the title out of the title tag. A summary can either be provided by using a summary meta tag, or by putting in an html comment into the body of the page where everything above the comment will become the summary. This last feature I gladly leave open for discussion - it is somewhat fragile, but I have seen it used in other places and should capture the intent of a summary.

    I also converted the utils.open function to a proper context manager, as it would silence some errors when exit could not be found.

    needs docs 
    opened by mankyd 29
  • RTL support for languages written from Right to Left

    RTL support for languages written from Right to Left

    • [x] I have searched the issues (including closed ones) and believe that this is not a duplicate.
    • [x] I have searched the documentation and believe that my question is not covered.
    • [x] I am willing to lend a hand to help implement this feature.

    Feature Request

    Few languages are written from right to left like, Arabic, Persian Urdu and Hebrew. To display those languages correctly it requires direction support.

    For more info https://rtlcss.com/learn/

    It might simple to change by converting the css using rtlcss: https://rtlcss.com/playground/

    Other python static site generator that supports RTL: https://squidfunk.github.io/mkdocs-material/setup/changing-the-language/#directionality

    This might be more related to Theme but user should be able to set directionality in config file and standard theme should support it at least.

    enhancement 
    opened by damascene 0
  • WIP: translate the documentation into Spanish

    WIP: translate the documentation into Spanish

    I'm translating the documentation into Spanish. I think that translating changelog is not worth the effort, so I'm going to leave that out.

    I'm using this guide.

    Related issue #2401

    opened by jorgesumle 0
  • MarkDown (and variables) inside <details> tag gets ignored

    MarkDown (and variables) inside
    tag gets ignored

    • [x] I have read the Filing Issues and subsequent “How to Get Help” sections of the documentation.

    • [x] I have searched the issues (including closed ones) and believe that this is not a duplicate.

    • OS version and name: ARMBIAN 5.31 stable Debian GNU/Linux 10 (buster) 4.19.62-sunxi

    • Python version: 3.7.3

    • Pelican version: 4.7.1

    • Link to theme: Pelican Elegant

    • Links to plugins: ['post_stats', 'pelican.plugins.related_posts', 'pelican.plugins.tipue_search', 'extract_toc', 'pelican.plugins.sitemap', 'pelican.plugins.neighbors', 'pelican.plugins.photos', 'pelican.plugins.thumbnailer', 'pelican.plugins.series', ]

    • Link to your site: https://matija.suklje.name/hooks-highscores

    • Link to your source: N/A

    • Link to a Gist with the contents of your settings file: https://gist.github.com/silverhook/dcd30826d2b331a0819abaa386c03a08

    Issue

    I am using the <details> and <summary> HTML tags on my website.

    When doing so, I noticed that whatever MarkDown is written within those tags gets ignored and parses verbatim as text.

    For example, what I would like to do is e.g.:

    <details>
    <summary>Expand for images of _proof_<summary>
    
    Some `fancy` text here to prove my **point** better.
    
    ![Screenshot: Anger Force Reloaded score summary]({static}/images/Leaderboards/AFR – 2020-11-03.jpg)
    </details>
    

    But instead I need to use HTML by hand:

    <details>
    <summary>Expand for images of <em>proof</em><summary>
    
    Some <code>fancy</code> text here to prove my <strong>point</strong> better.
    
    <img alt="Screenshot: Anger Force Reloaded score summary" src="/images/Leaderboards/AFR – 2020-11-03.jpg"/>
    </details>
    

    This is especially annoying when linking to existing static files or articles/pages in Pelican as neither {filename} nor {static} (nor {attach}) get expanded. Which means I need to predict where the file will end up, instead of letting Pelican do the heavy lifting, which is what would happen if the <details> tag was missing.

    bug 
    opened by silverhook 0
  • Change author metadata

    Change author metadata

    Hello, I need to add metadata (i.e: :avatar:) to author but I do not find how to. I've tested several things such as creating a dedicated profile page into /content/author/my-author.rst but content is not used my custom html.

    Is there a way to do it ?

    question 
    opened by smorele 1
  • "Previous" and "Next" links styling issues

    • [x] I have searched the issues (including closed ones) and believe that this is not a duplicate.

    Issue

    In the docs, the pagination links, "Previous" and "Next" , can vary a lot in size. Sometimes the boxes are very small and text is difficult to read. Screenshots attached!

    Screenshot from 2022-12-26 19-31-20

    Screenshot from 2022-12-26 19-32-22

    Screenshot from 2022-12-26 19-40-37

    My guess from taking a brief look is that a minimum width needs to be set somewhere. I'm happy to take this on!

    docs 
    opened by emtes 2
Releases(4.8.0)
  • 4.8.0(Jul 11, 2022)

  • 4.7.2(Feb 9, 2022)

  • 4.7.1(Oct 12, 2021)

  • 4.7.0(Oct 1, 2021)

    • Improve default theme rendering on mobile and other small screen devices (#2914)
    • Add support for hidden articles (#2866)
    • Improve word count behavior when generating summary CJK & other locales (#2864)
    • Add progress spinner during generation (#2869) and richer logging (#2897), both via Rich
    • Invoke tasks serve and livereload now auto-open a web browser pointing to the locally-served web site (#2764)
    • Support some date format codes used by ISO dates (#2902)
    • Document how to add a new writer (#2901)
    Source code(tar.gz)
    Source code(zip)
    pelican-4.7.0-py3-none-any.whl(1.33 MB)
    pelican-4.7.0.tar.gz(1.08 MB)
  • 4.6.0(Mar 23, 2021)

  • 4.5.4(Jan 4, 2021)

  • 4.5.2(Nov 22, 2020)

  • 4.5.1(Nov 2, 2020)

  • 4.5.0(Aug 20, 2020)

    • List registered plugins via pelican-plugins command
    • Override settings via -e / --extra-settings CLI option flags
    • Add settings for custom Jinja globals and tests
    • Customize article summary ellipsis via SUMMARY_END_SUFFIX setting
    • Customize Typogrify dash handling via new TYPOGRIFY_DASHES setting
    • Support Unicode when generating slugs
    • Support Asciidoc .adoc file generation in Pelican importer
    • Improve user experience when pelican --listen web server is quit
    • Improve Invoke tasks template
    • Include tests in source distributions
    • Switch CI from Travis to GitHub Actions
    • Remove support for Python 2.7

    For more information, including upgrade instructions, please refer to the release announcement.

    Source code(tar.gz)
    Source code(zip)
    pelican-4.5.0-py2.py3-none-any.whl(657.74 KB)
    pelican-4.5.0.tar.gz(408.79 KB)
  • 4.2.0(Oct 17, 2019)

  • 4.1.3(Oct 9, 2019)

  • 4.1.2(Sep 23, 2019)

  • 4.1.1(Aug 23, 2019)

  • 4.1.0(Jul 14, 2019)

    • Live browser reload upon changed files (provided via Invoke task)
    • Add pyproject.toml, managed by Poetry
    • Support for invoking python -m pelican
    • Add relative source path attribute to content
    • Allow directories in EXTRA_PATH_METADATA
    • Add all_articles variable to period pages (for recent posts functionality)
    • Improve debug mode output
    • Remove blank or duplicate summaries from Atom feed
    • Fix bugs in pagination, pelican-import, pelican-quickstart, and feed importer
    Source code(tar.gz)
    Source code(zip)
  • 4.0.1(Nov 30, 2018)

    • Refactor pelican.server logging
    • Fix bug in which all static files were processed as "draft"
    • Bug fixes for Invoke/Makefile automation, Importer, and other miscellanea

    If upgrading from 3.7.x or earlier, please note that slug-related settings in 4.0+ use {slug} and/or {lang} rather than %s. If %s-style settings are encountered, Pelican will emit a warning and fall back to the default setting. Some user-submitted themes might try to format setting values but fail upon site build with a TypeError. In such cases, the theme needs to be updated. For example, instead of TAG_FEED_ATOM|format(tag.slug), use TAG_FEED_ATOM.format(slug=tag.slug)

    Source code(tar.gz)
    Source code(zip)
  • 4.0.0(Nov 13, 2018)

    • Replace develop_server.sh script with pelican --listen
    • Improved copy/link behavior for large static files (e.g., videos)
    • New {static} syntax to link to static content; content linked to by {static} and {attach} is automatically copied over even if not in STATIC_PATHS
    • Pages can now have draft status
    • Show current settings via new --print-settings flag
    • New signals: feed_generated and page_generated_write_page
    • Replace Fabric with Invoke and fabfile.py template with tasks.py
    • New ARTICLE_TRANSLATION_ID and PAGE_TRANSLATION_ID settings to specify metadata attributes used to identify/disable translations
    • HTML reader now parses multiple occurrences of metadata tags as a list
    • New Blogger XML backup importer
    • Wordpress importer now updates file links to point to local copies if the files were downloaded with --wp-attach.
    • Many bug fixes, tweaks, and other enhancements
    Source code(tar.gz)
    Source code(zip)
  • 3.7.1(Jan 10, 2017)

  • 3.7.0(Dec 12, 2016)

    • Atom feeds output <content> in addition to <summary>
    • Atom feeds use <published> for the original publication date and <updated> for modifications
    • Simplify Atom feed ID generation and support URL fragments
    • Produce category feeds with category-specific titles
    • RSS feeds now default to summary instead of full content — set RSS_FEED_SUMMARY_ONLY = False to revert to previous behavior
    • Replace MD_EXTENSIONS with MARKDOWN setting
    • Replace JINJA_EXTENSIONS with more-robust JINJA_ENVIRONMENT setting
    • Improve summary truncation logic to handle special characters and tags that span multiple lines, using HTML parser instead of regular expressions
    • Include summary when looking for intra-site link substitutions
    • Link to authors and index via {author}name and {index} syntax
    • Override widget names via LINKS_WIDGET_NAME and SOCIAL_WIDGET_NAME
    • Add INDEX_SAVE_AS option to override default index.html value
    • Remove PAGES context variable for themes in favor of pages
    • SLUG_SUBSTITUTIONS now accepts 3-tuple elements, allowing URL slugs to contain non-alphanumeric characters
    • Tag and category slugs can be controlled with greater precision using the TAG_SUBSTITUTIONS and CATEGORY_SUBSTITUTIONS settings
    • Author slugs can be controlled with greater precision using the AUTHOR_SUBSTITUTIONS setting
    • DEFAULT_DATE can be defined as a string
    • Use mtime instead of ctime when DEFAULT_DATE = 'fs'
    • Add --fatal=errors|warnings option for use with continuous integration
    • When using generator-level caching, ensure previously-cached files are processed instead of just new files
    • Add Python and Pelican version information to debug output
    • Improve compatibility with Python 3.5
    • Comply with and enforce PEP8 guidelines
    • Replace tables in settings documentation with data:: directives
    Source code(tar.gz)
    Source code(zip)
Owner
Pelican dev team
Pelican dev team
Livemark is a static page generator that extends Markdown with interactive charts, tables, and more.

Livermark This software is in the early stages and is not well-tested Livemark is a static site generator that extends Markdown with interactive chart

Frictionless Data 86 Dec 25, 2022
Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed. Now in Python!

markdown-it-py Markdown parser done right. Follows the CommonMark spec for baseline parsing Configurable syntax: you can add new rules and even replac

Executable Books 398 Dec 24, 2022
A markdown lexer and parser which gives the programmer atomic control over markdown parsing to html.

A markdown lexer and parser which gives the programmer atomic control over markdown parsing to html.

stonepresto 4 Aug 13, 2022
Mdformat is an opinionated Markdown formatter that can be used to enforce a consistent style in Markdown files

Mdformat is an opinionated Markdown formatter that can be used to enforce a consistent style in Markdown files. Mdformat is a Unix-style command-line tool as well as a Python library.

Executable Books 180 Jan 6, 2023
A super simple script which uses the GitHub API to convert your markdown files to GitHub styled HTML site.

A super simple script which uses the GitHub API to convert your markdown files to GitHub styled HTML site.

Çalgan Aygün 213 Dec 22, 2022
A lightweight and fast-to-use Markdown document generator based on Python

A lightweight and fast-to-use Markdown document generator based on Python

快乐的老鼠宝宝 1 Jan 10, 2022
A fast yet powerful Python Markdown parser with renderers and plugins.

Mistune v2 A fast yet powerful Python Markdown parser with renderers and plugins. NOTE: This is the re-designed v2 of mistune. Check v1 branch for ear

Hsiaoming Yang 2.2k Jan 4, 2023
markdown2: A fast and complete implementation of Markdown in Python

Markdown is a light text markup format and a processor to convert that to HTML. The originator describes it as follows: Markdown is a text-to-HTML con

Trent Mick 2.4k Dec 30, 2022
A fast, extensible and spec-compliant Markdown parser in pure Python.

mistletoe mistletoe is a Markdown parser in pure Python, designed to be fast, spec-compliant and fully customizable. Apart from being the fastest Comm

Mi Yu 546 Jan 1, 2023
A Python implementation of John Gruber’s Markdown with Extension support.

Python-Markdown This is a Python implementation of John Gruber's Markdown. It is almost completely compliant with the reference implementation, though

Python-Markdown 3.1k Dec 30, 2022
A Python implementation of John Gruber’s Markdown with Extension support.

Python-Markdown This is a Python implementation of John Gruber's Markdown. It is almost completely compliant with the reference implementation, though

Python-Markdown 3.1k Dec 31, 2022
Extensions for Python Markdown

PyMdown Extensions Extensions for Python Markdown. Documentation Extension documentation is found here: https://facelessuser.github.io/pymdown-extensi

Isaac Muse 685 Jan 1, 2023
Lightweight Markdown dialect for Python desktop apps

Litemark is a lightweight Markdown dialect originally created to be the markup language for the Codegame Platform project. When you run litemark from the command line interface without any arguments, the Litemark Viewer opens and displays the rendered demo.

null 10 Apr 23, 2022
A markdown template manager for writing API docs in python.

DocsGen-py A markdown template manager for writing API docs in python. Contents Usage API Reference Usage You can install the latest commit of this re

Ethan Evans 1 May 10, 2022
Read a list in markdown and do something with it!

Markdown List Reader A simple tool for reading lists in markdown. Usage Begin by running the mdr.py file and input either a markdown string with the -

Esteban Garcia 3 Sep 13, 2021
Yuque2md - Offline download the markdown file and image from yuque

yuque2md 按照语雀知识库里的目录,导出语雀知识库中所有的markdown文档,并离线图片到本地 使用 安装 Python3.x clone 项目 下载依

JiaJianHuang 4 Oct 30, 2022
Convert HTML to Markdown-formatted text.

html2text html2text is a Python script that converts a page of HTML into clean, easy-to-read plain ASCII text. Better yet, that ASCII also happens to

Alireza Savand 1.3k Dec 31, 2022
Comprehensive Markdown plugin built for Django

Django MarkdownX Django MarkdownX is a comprehensive Markdown plugin built for Django, the renowned high-level Python web framework, with flexibility,

neutronX 740 Jan 8, 2023
Awesome Django Markdown Editor, supported for Bootstrap & Semantic-UI

martor Martor is a Markdown Editor plugin for Django, supported for Bootstrap & Semantic-UI. Features Live Preview Integrated with Ace Editor Supporte

null 659 Jan 4, 2023