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

Make a way to asciidocify YAML text properties before converting to JSON #17

Closed
briandominick opened this issue May 21, 2021 · 2 comments
Labels
enhancement New feature or request JavaScript Involves some JS struggles Liquid Incorporates Liquid templating

Comments

@briandominick
Copy link
Contributor

briandominick commented May 21, 2021

In several places, we will use JS/JSON on the very front end to display significant blocks of text drawn from YAML. It would be great if we could asciidocify this first, where applicable.

This probably means re-doing the jsonify Jekyll/Liquid filter, one way or another. Maybe an asciidoc-jsonify filter? Or, we could just use an include and iterate through the object and asciidocify as we go. That wouldn't be too hard or resource intensive.

@briandominick briandominick added Liquid Incorporates Liquid templating JavaScript Involves some JS struggles enhancement New feature or request labels May 21, 2021
@briandominick briandominick changed the title Make a way to aciidocify YAML text properties before converting to JSON Make a way to asciidocify YAML text properties before converting to JSON May 23, 2021
@briandominick
Copy link
Contributor Author

A third option here would be to parse all these strings up front with Asciidoctor.js. I really don't know what would be involved with that, and it sounds like overkill on the frontend. Still a consideration as I start to investigate this ticket.

@briandominick
Copy link
Contributor Author

Okay, the solution became pretty obvious once I started thinking about how much more effort would be required to deal with this on the backend. The asciidoctor.min.js file is 757kb, which is not minuscule, but I think it's worth it for now. I don't think we'll ever need much more than inline formatting, so maybe this can be pared down.

Including the whole node_module at this time seems ridiculous, but maybe we'll add that sourcing in when we deal with #24.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request JavaScript Involves some JS struggles Liquid Incorporates Liquid templating
Projects
None yet
Development

No branches or pull requests

1 participant