Skip to main content

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


Download files

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

Source Distribution

pelican-katex-0.1.1.post2.tar.gz (136.9 kB view details)

Uploaded Source

Built Distribution

pelican_katex-0.1.1.post2-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file pelican-katex-0.1.1.post2.tar.gz.

File metadata

  • Download URL: pelican-katex-0.1.1.post2.tar.gz
  • Upload date:
  • Size: 136.9 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

Hashes for pelican-katex-0.1.1.post2.tar.gz
Algorithm Hash digest
SHA256 1c20fab3f465becf8e05c96d75d299795f4710a9ed7e8be1b071203057a0438f
MD5 a3a7d4d05be7f8aa3b1b1ea35faa40be
BLAKE2b-256 f17f02f896cf650853a2b89723b970dc5105fb7ed31336d19beb078a5abcb8eb

See more details on using hashes here.

File details

Details for the file pelican_katex-0.1.1.post2-py3-none-any.whl.

File metadata

  • Download URL: pelican_katex-0.1.1.post2-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

Hashes for pelican_katex-0.1.1.post2-py3-none-any.whl
Algorithm Hash digest
SHA256 7db7bb2538c54436b66cbd3b7de53d610919a5e69f0fe1e991cac450354dac37
MD5 37645f65812a566933c3284c4841d1a1
BLAKE2b-256 5cb0e22cc906f3062a6b2cbc65abe8b92ce51af47d6fd93391d228f3992d78ea

See more details on using hashes here.

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