Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pandoc lua filters support #263

Open
1 of 2 tasks
srid opened this issue Mar 10, 2022 · 2 comments
Open
1 of 2 tasks

Pandoc lua filters support #263

srid opened this issue Mar 10, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@srid
Copy link
Owner

srid commented Mar 10, 2022

Emanote definitely should support lua filters so that users can include these filters in their notebook along with .md and .tpl files.

You should be able to apply these filters on per-note or per-folder basis via specifying them in .yml files. Just like you can specify a .tpl template.

Originally posted by @srid in #250 (comment)


@srid srid added enhancement New feature or request help wanted Extra attention is needed labels Mar 10, 2022
@srid
Copy link
Owner Author

srid commented Apr 7, 2022

We can call Text.Pandoc.Filter.Lua.apply in the patch function, but this is not enough, because updating the filters themselves won't trigger the re-patching of all Pandoc documents.

Alternatively, we can apply the filter during the rendering stage - but apply is an IO action, and this will be expensive. It still won't solve the problem of automatically updating dependent docs (like backlinks).

Requires some thought here ...

@srid
Copy link
Owner Author

srid commented Apr 7, 2022

Proof of concept: https://gist.github.com/srid/6e17e3ad68a3f6ba877a8024b8ea0909 w/ git clone https://github.com/pandoc/lua-filters.git ./default/lua-filters.

That gave me an idea that we should include https://github.com/pandoc/lua-filters by default in the 'default' layer. EDIT: But this can only be done after adding a mechanism to exclude folders from being copied over to the static site.

@srid srid removed the help wanted Extra attention is needed label May 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant