asciidoctor-vscode icon indicating copy to clipboard operation
asciidoctor-vscode copied to clipboard

Find templates automatically under .asciidoctor/templates

Open lask79 opened this issue 1 year ago • 5 comments
trafficstars

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 avatar Feb 03 '24 20:02 lask79

I think that's a good idea 👍🏻

ggrossetie avatar Feb 03 '24 23:02 ggrossetie

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

ggrossetie avatar Feb 04 '24 11:02 ggrossetie

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?

ahus1 avatar Feb 04 '24 20:02 ahus1

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

ggrossetie avatar Feb 06 '24 18:02 ggrossetie

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.

ahus1 avatar Feb 11 '24 16:02 ahus1