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

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

  • 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.

  • 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

  • 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.

  • 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?

  • "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.

  • 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.

  • 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,

  • 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.

  • 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.

  • 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.

  • Support for Google Analytics 4

    Support for Google Analytics 4

    • [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

    Pelican currently supports Google Analytics Universal Analytics, which is set to be decommissioned July 1st 2023 and users are demanded to move to version Google Analytics 4. I have not found in issues or the documentation how to use Google Analytics 4. I assume it is not currently supported.

    The feature request is to support the new version of Google Analytics on Pelican. I believe the documentation for implementing support for Google Analytics 4 is here https://developers.google.com/analytics/devguides/collection/ga4.

  • Please test with Docutils 0.19b1

    Please test with Docutils 0.19b1

    Hi,

    We've just released Docutils 0.19b1, and intend to release 0.19 final on 05/07/2022 (a week on Tuesday). Please would you test with the pre-release, and raise any issues to me either on this issue or on the Docutils tracker?

    • The release notes are at: https://docutils.sourceforge.io/RELEASE-NOTES.html#release-0-19b1-2022-06-21
    • The detailed change history is at: https://docutils.sourceforge.io/HISTORY.html#release-0-19b1-2022-06-21
    • You can install 0.19b1 with python -m pip install --pre "docutils==0.19b1" or install Docutils' master with python -m pip install "git+https://repo.or.cz/docutils.git#subdirectory=docutils".

    Thanks, Adam

  • Pass setting value from environment variable in command line

    Pass setting value from environment variable in command line

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

    Issue

    I had some troubles to correctly pass a setting variable value (single string) from an environment variable, in bash, using the -e Pelican option. In my case it was an api token which I don't want to store in the repository. Similar problem I had with GitLab CI/CD variable.

    Since it took me a long time to get it right, I thought I'll share. This is the command

    pelican content/ -e API_KEY=''\"$API_KEY\"'' -s pelicanconf.py -t themes/ccns/
    

    The environment variable $API_KEY must be between ''\" and \"''.

  • Jinja template for XML files

    Jinja template for XML files

    • [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.

    Issue

    I'd like to generate an XML file as part of the build of the website - in this case a podcast-compatible RSS feed - and, having read the documentation, do not understand how to go about this.

    I understand how to write a Jinja2 template which will generate the correct XML. What I don't understand is how to make Pelican use that template to generate the file I need. Can I do that as part of a theme, or do I need to write an entire plugin?

  • Describe all `CHECK_MODIFIED_METHOD` options

    Describe all `CHECK_MODIFIED_METHOD` options

    Fixes #2991.

    I'm sorry, but I was unable to run hub pull-request per the contribution guidelines:

    $ hub pull-request -i 2991
    github.com username: Lx
    github.com password for Lx (never stored): 
    Error creating pull request: Not Found (HTTP 404)
    Not Found
    

    I can't offer improvements for those docs because I don't know what the expected outcomes of using that tool are.

Simple, lightweight, and magic-free static site/blog generator for Python coders

makesite.py Take full control of your static website/blog generation by writing your own simple, lightweight, and magic-free static site generator in

Jul 5, 2022
Static site generator for designers. Uses Python and Django templates.

News Cactus 3 is out! We're happy to announce Cactus 3. It brings a set of great new features like asset fingerprinting, an asset pipeline, pretty url

Jun 25, 2022
AutoLoader is a plugin for Pelican, a static site generator written in Python.

AutoLoader AutoLoader is a plugin for Pelican, a static site generator written in Python. AutoLoader is designed to autoload the other Pelican plugins

Mar 21, 2022
Kaktos is a python static site generator
Kaktos is a python static site generator

Python static site generator κάκτος Kaktos is a python static site generator. The idea is create a simple static site generator for people that don't

Jan 14, 2022
barely is a lightweight, but highly extensible static site generator written in pure python.
barely is a lightweight, but highly extensible static site generator written in pure python.

barely is a lightweight, but highly extensible static site generator. Explore the docs » Quickstart · See available Plugins · Report Bug · Request Fea

Jul 5, 2022
A simple static site generator with deployment to S3/Cloudfront.

Stasis A simple static site generator with deployment to S3/Cloudfront. Features Stasis is a static website generator written in Python, using Pandoc

Aug 30, 2021
dirmaker is a simple, opinionated static site generator for quickly publishing directory websites.
dirmaker is a simple, opinionated static site generator for quickly publishing directory websites.

dirmaker is a simple, opinionated static site generator for publishing directory websites (eg: Indic.page, env.wiki It takes entries from a YAML file and generates a categorised, paginated directory website.

Jun 11, 2022
Simple Static Site Inductor Made in Python

sssimp ?? Simple Static Site Inductor Made in Python How to use Create a folder called input, inside create a folder called content and an empty file

Jun 1, 2022
A Python Static Website Generator

Version 0.8.9 Overview Hyde starter kit by merlinrebrovic is a really nice way to get started with hyde. Hyde layout for bootstrap by auzigog is also

Jun 19, 2022
A static website and blog generator
A static website and blog generator

Nikola, a Static Site and Blog Generator In goes content, out comes a website, ready to deploy. Why Static Websites? Static websites are safer, use fe

Jul 4, 2022
a static website generator to make beautiful customizable pictures galleries that tell a story
a static website generator to make beautiful customizable pictures galleries that tell a story

Prosopopee Prosopopee. Static site generator for your story. Make beautiful customizable pictures galleries that tell a story using a static website g

May 16, 2022
A static website generator for people who enjoy the simpler things in life.

A static website generator for people who enjoy the simpler things in life.

Apr 21, 2022
Hobby Project. A Python Library to create and generate static web pages using just python.

PyWeb ??️ ?? Current Release: 0.1 A Hobby Project ?? PyWeb is a small Library to generate customized static web pages using python. Aimed for new deve

Nov 18, 2021
Project documentation with Markdown.

MkDocs Project documentation with Markdown. View the MkDocs documentation. Project release notes. Visit the MkDocs wiki for community resources, inclu

Jul 1, 2022
The lektor static file content management system
The lektor static file content management system

Lektor Lektor is a static website generator. It builds out an entire project from static files into many individual HTML pages and has a built-in admi

Jul 1, 2022
Makes dynamic linked shit "static". Amazing

static.py What does it do? You give it a dynamically linked binary and it will make a directory that has all the dependencies (recursively). It also f

Nov 19, 2021
A declarative website generator designed for high-quality websites, with a focus on easy maintenance and localization.

Grow Grow is a declarative tool for rapidly building, launching, and maintaining high-quality static HTML. Easy installation Jinja template engine Con

May 30, 2022
A Python media index

pyvideo https://pyvideo.org is simply an index of Python-related media records. The raw data being used here comes out of the pyvideo/data repo. Befor

May 30, 2022
Static site generator that supports Markdown and reST syntax. Powered by Python.

Pelican Pelican is a static site generator, written in Python. Write content in reStructuredText or Markdown using your editor of choice Includes a si

Jul 5, 2022
A python-based static site generator for setting up a CV/Resume site
A python-based static site generator for setting up a CV/Resume site

ezcv A python-based static site generator for setting up a CV/Resume site Table of Contents What does ezcv do? Features & Roadmap Why should I use ezc

May 16, 2022