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

Allow defining asciidoc attributes to pass to invocation of asciidoctor #4082

Closed
marekr opened this issue Nov 14, 2017 · 4 comments
Closed

Comments

@marekr
Copy link

marekr commented Nov 14, 2017

So asciidoctor has attributes you can set on the command line to set globally

i.e.

:icons: font
:iconsdir: /images/icons

which can be set by in CLI usage like:

asciidoctor -a icons=font -a iconsdir=/images/icons

So instead of putting in the two attributes in every file, it can just be globally set.

Looking at

func getAsciidocContent(ctx *RenderingContext) []byte {

I don't see any way to pass along extra arguments

It would be nice if there was some sort of config level option in hugo to pass extra parameters to external helpers.

@marekr marekr changed the title pass asciidoc parameters to generator Allow defining asciidoc attributes to pass to invocation of asciidoctor Nov 14, 2017
@bep
Copy link
Member

bep commented Nov 14, 2017

There has been a recent discussion about this.

@bep
Copy link
Member

bep commented Jan 23, 2018

See the discussion here: #4060

@bep bep closed this as completed Jan 23, 2018
@mojavelinux
Copy link

Not being able to pass global AsciiDoc attributes to Asciidoctor severely limits its usefulness. There are certain attributes you don't even want to set per document because they are a publishing detail.

Rather than adding additional configuration for AsciiDoc / Asciidoctor, you may just consider allowing the arguments to the asciidoctor command to be controlled. This would not only allow global attributes to be set (the -a flag), but also make it possible to load extensions (-r flag).

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants