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

[asciidoc_reader] Custom AsciiDoc command #1369

Open
arokettu opened this issue Oct 17, 2022 · 3 comments
Open

[asciidoc_reader] Custom AsciiDoc command #1369

arokettu opened this issue Oct 17, 2022 · 3 comments

Comments

@arokettu
Copy link

Whitelisting possible commands prevents use of locally installed parsers like bin/asciidoc or bundle exec asciidoctor

@avaris
Copy link
Member

avaris commented Oct 17, 2022

Not necessarily. You just need asciidoc or asciidoctor in your PATH. It can point to your local install or a shell wrapper script.

Or a bit hacky but you can even do:

from pelican_plugins import asciidoc_reader  # adjust import accordingly
ASCIIDOC_CMD = "your command here"
asciidoc_reader.ALLOWED_CMDS.append(ASCIIDOC_CMD)

# ...
PLUGINS = [asciidoc_reader, ...]

@arokettu
Copy link
Author

Yes, it works with bundle exec pelican in my case but the limitation seems arbitrary. I would understand it if there was some logic that depended on the tool being used but I see none

@avaris
Copy link
Member

avaris commented Oct 18, 2022

I could agree. I'm happy to review a PR if you want to submit one :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants