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 accessability 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-0.1.1.post1.tar.gz
.
File metadata
- Download URL: pelican-katex-0.1.1.post1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 812a805ff59470c494b1d42bd32a5c32aabf0976358019acc6acd1a5689bc49a |
|
MD5 | 23c295d940195851768512166a2a5641 |
|
BLAKE2b-256 | 63e72961bc9be8e53a08bd38ea823e0a5c8425554bba832b3f20b7345e4627e2 |
File details
Details for the file pelican_katex-0.1.1.post1-py3-none-any.whl
.
File metadata
- Download URL: pelican_katex-0.1.1.post1-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33f1be5ff332f55dbda1925edecbb95c83ba4b15e366a9266b31ef0366c4a8ae |
|
MD5 | c6145c4cf4476a3d01fab56347f1e70d |
|
BLAKE2b-256 | 701d706c0151c4a451a103a5048c40905870b1f39e4327eb8719e9126c3e6f96 |