Skip to main content

Support Wikilinks when generating Pelican sites

Project description

Support Wikilinks when generating Pelican sites.

Wikilinks is a plugin for Pelican, a static site generator written in Python.

PyPI version number Changelog Supported Python version License Download Count

Installation

The easiest way to install Wikilinks is through the use of pip. This will also install the required dependencies automatically.

pip install minchin.pelican.plugins.wikilinks

Further configuration will depend on the version of Pelican you are running. On version 4.5 or newer and you haven’t defined PLUGINS in your pelicanconf.py, nothing more in needed. On earlier versions of Pelican, or if you’ve defined PLUGINS, you’ll need to add the autoloader to your list of plugins in your pelicanconf.py file:

# pelicanconf.py

PLUGINS = [
    # ...
    'minchin.pelican.plugins.wikilinks',
    # ...
]

Usage Notes

In basic usage, this allow links of the form [[ my work ]] or [[ my work | is finished ]]. Both of these will create a link to a file named my work (e.g. my work.md). By default, the name displayed for the link will be the filename; alternately add a title to the link by using a bar and anything after the bar will be used as the displayed name (e.g. | is finished).

Known Issues

The plugin relies on each link target having a unique filename; non-unique filenames may result in links not going where you were expecting.

Perhaps this should be added as token of a Markdown reader, but the link target list is only available after all sources have been rendered. Because the plugin is run after Markdown (or ReStructured) is rendered, there currently isn’t a way to make sure that this isn’t run on links within code blocks, etc.

Future To Dos

  • support link anchors (e.g. my work#heading)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page