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.
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
Release history Release notifications | RSS feed
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
File details
Details for the file minchin.pelican.plugins.wikilinks-1.0.0.tar.gz
.
File metadata
- Download URL: minchin.pelican.plugins.wikilinks-1.0.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b37a813cfffb393189f515ef4ec52dd4ccfcd8ca0c33248860fdf8f6bbe43fd |
|
MD5 | 402767eed8dd784fd6fd36eac4d3c881 |
|
BLAKE2b-256 | 2860cb0de5957c0e34a2d5c07b7bcdc252cca4d880ea1284cb907cf0d1dbdc58 |
File details
Details for the file minchin.pelican.plugins.wikilinks-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: minchin.pelican.plugins.wikilinks-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 419b27844e54979529403fc56893415ba3eaf0b8f146e61352cd95c8d6fd0473 |
|
MD5 | 6a3e352b888482e55dc0eb442c3bed85 |
|
BLAKE2b-256 | 491741fd9cc01f53228b20cee8807f89820a0faa5a552de0041a3100d6f048d3 |