Server-side LaTeX compilation for pelican
Project description
Server-Side LaTeX Compilation for Pelican
This plugin hooks itself directly into docutils' reStructuredText parser to compile math roles and blocks with KaTeX while building your blog. Therefore, you do not need to ship the KaTeX javascript implementation with your website anymore and improve the accessibility as well as the load time of your internet presence.
Installation
Run pip install pelican-katex
and add "pelican_katex"
to the PlUGINS
setting in your configuration file. Afterwards, you should be able to remove the
katex.js
<script>
tag from your template and your math should still look
fine.
Configuration
The plugin offers several configuration options that you can set in your
pelicanconf.py
.
# Path to the katex file to use. This project comes with version `0.10` of
# katex but if you want to use a different one you can overwrite the path
# here. To use a katex npm installation, set this to `"katex"`.
# KATEX_PATH = "/path/to/katex.js"
# By default, this plugin will redefine reStructuredText's `math` role and
# directive. However, if you prefer to have leave the docutil's defaults
# alone, you can use this to define a `katex` role for example.
# KATEX_DIRECTIVE = "katex"
# Here you can pass a dictionary of default options that you want to run
# KaTeX with. All possible options are listed on KaTeX's options page,
# https://katex.org/docs/options.html.
# KATEX = {
# # Abort the build instead of coloring broken math in red
# "throwOnError": True
# }
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 pelican-katex-1.1.0.tar.gz
.
File metadata
- Download URL: pelican-katex-1.1.0.tar.gz
- Upload date:
- Size: 157.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e7f5b6e691499854f7fa17af55493bb03b71476500ad289276099eb1b40736f |
|
MD5 | 68e25c9f4fb1d059ab1ee39d0d4aa505 |
|
BLAKE2b-256 | 8770ca5ade0cbb2a1d66d44b994ed03f605cbc3ba573c1e27f79a8876d406a22 |
File details
Details for the file pelican_katex-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: pelican_katex-1.1.0-py3-none-any.whl
- Upload date:
- Size: 158.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cb791cd3a11ddba9992c99c9b2ddf069d565111b7913c12869feed578e07c10 |
|
MD5 | 371da7df5713de84f141eb889b2e04ef |
|
BLAKE2b-256 | b5bc4fe34358f3d584d519c7b6ea2419872795266cbe2a83daefebdc942ea817 |