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

Find templates automatically under .asciidoctor/templates #843

Open
lask79 opened this issue Feb 3, 2024 · 5 comments
Open

Find templates automatically under .asciidoctor/templates #843

lask79 opened this issue Feb 3, 2024 · 5 comments
Labels
💬 discussion Disccussion on new features, projects, etc... ✨ enhancement

Comments

@lask79
Copy link
Contributor

lask79 commented Feb 3, 2024

It currently is possible to add your own template files using asciidoc.preview.templates.
But the path has to be abolute.

Given that the extension already finds extensions under .asciidoctor/lib it would also be great if it also pick up templates under .asciidoctor/templates

@lask79 lask79 added ✨ enhancement 💬 discussion Disccussion on new features, projects, etc... labels Feb 3, 2024
@ggrossetie
Copy link
Member

I think that's a good idea 👍🏻

@ggrossetie ggrossetie changed the title Find templates automatically under ./asciidoctor/templates Find templates automatically under .asciidoctor/templates Feb 4, 2024
@ggrossetie
Copy link
Member

@ahus1 Do you think it makes sense to automatically load templates from .asciidoctor/templates?

@ahus1
Copy link
Contributor

ahus1 commented Feb 4, 2024

Makes sense to me, I like it. Do you have an example repository somewhere to test it?

Btw, would those templates work the same way for JRuby and the JS variants of Asciidoctor?

@ggrossetie
Copy link
Member

Not sure about JRuby templates. In Asciidoctor.js, we are loading files that are located in a template directory based on their name.

@ahus1
Copy link
Contributor

ahus1 commented Feb 11, 2024

It seems to make sense for a Asciidoctor.js setup, so let's proceed. I'll then see what I need to do to make it work with AsciidoctorJ one way or another.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💬 discussion Disccussion on new features, projects, etc... ✨ enhancement
Projects
None yet
Development

No branches or pull requests

3 participants