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

Add support for AsciiDoctor extensions #5688

Closed
wessven opened this issue Feb 10, 2019 · 16 comments
Closed

Add support for AsciiDoctor extensions #5688

wessven opened this issue Feb 10, 2019 · 16 comments

Comments

@wessven
Copy link

wessven commented Feb 10, 2019

I propose adding a feature which automatically detects which AsciiDoctor extensions are installed, and (if they make sense in the context of Hugo) enable them.

My motivation for this is that I want to use asciidoctor-bibtex. This extension allows BibTeX files to be used from within an AsciiDoc file, and to render citations and bibliographies. But this change will also be effective for other extensions, such as asciidoctor-diagram.

I am busy working on a solution for this and would be able to submit a pull request soonish.

Related to #3330 and #2996.

@wessven
Copy link
Author

wessven commented Feb 10, 2019

WIP result attached. asciidoctor-bibtex fails when a page does not contain a bibliography, so it can't be enabled for every page. Will add logic to only enable an extension if certain criteria in the document is met.

screenshot_20190210_210623

@wessven
Copy link
Author

wessven commented Feb 18, 2019

Submitted PR #5692

@mojavelinux
Copy link

What this really comes down to is allowing control over the -r flag of the asciidoctor command. I wouldn't limit the acceptable values to a fixed set since the catalog of extensions is open ended.

@wessven
Copy link
Author

wessven commented Apr 16, 2019

Sorry for the slow reply. Busy planning a wedding and things are a bit crazy.

I agree with you. I was hoping that this would be a simple fix (I have never developed in Go before), but then I couldn't figure out how to access elements specified within the document. I.e. how to get the value which must be passed to the -r parameter. Matters are further complicated by the fact that the extension in which I am interested (asciidoctor-bibtex) fails the document conversion if the extension is specified, but not used within the source document. So it cannot be "on by default".

@mojavelinux
Copy link

how to get the value which must be passed to the -r parameter

I would imagine it would come from the Hugo configuration object.

@wessven
Copy link
Author

wessven commented Apr 16, 2019

Great, thanks for the tip. I'll have a look at this when I next have a chance.

@stale
Copy link

stale bot commented Aug 15, 2019

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@stale stale bot added the Stale label Aug 15, 2019
@mojavelinux
Copy link

How can this issue be marked as stale when there's an open PR that's never been addressed?

@stale stale bot removed the Stale label Aug 15, 2019
@stale
Copy link

stale bot commented Dec 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@stale stale bot added the Stale label Dec 13, 2019
@celtic-coder
Copy link

PR #5692 is still open.

@stale stale bot removed the Stale label Dec 13, 2019
@stale
Copy link

stale bot commented Apr 11, 2020

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@stale stale bot added the Stale label Apr 11, 2020
@celtic-coder
Copy link

What is the status of PR #5692?

@stale stale bot removed the Stale label Apr 12, 2020
@snipem
Copy link

snipem commented Apr 16, 2020

@celtic-coder Seems to be stale. There is newer one with ongoing discussion: #6561

@celtic-coder
Copy link

Hi @snipem,
Yes, I have been keeping an eye on that one as well. Thanks for the heads up! 🙂

Kind Regards,
Liam

@stale
Copy link

stale bot commented Aug 16, 2020

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@stale stale bot added the Stale label Aug 16, 2020
@stale stale bot closed this as completed Sep 20, 2020
@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 Jan 28, 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.

5 participants