kkga / ter

A tiny wiki-style site generator with Zettelkasten flavor.
https://ter.kkga.me
MIT License
96 stars 6 forks source link

Katex support? #2

Open 5u4 opened 2 years ago

5u4 commented 2 years ago

This is an awesome project!

I am wondering whether it is possible to add Katex support.

After some research, I found out it may be done through changing the marker renderer https://github.com/markedjs/marked/issues/1538#issuecomment-575838181. Now I am stuck on finding a katex binding on deno for translating const katex = require('katex').

I am not familiar with deno. Any help will be appreciated :)

kkga commented 2 years ago

Hi, thanks!

Looks like Katex provides an ESM module: https://katex.org/docs/browser.html#ecmascript-module

In theory, you should be able to import it and use.

5u4 commented 2 years ago

thanks!

thangisme commented 1 year ago

I know this is old but I'd be nice to have a math option in post frontmatter if set to true then it will render katex

kkga commented 1 year ago

This would be a good enhancement, but at the moment I don't have the bandwidth to implement it. Leaving it here as a potential contribution.