> On Aug 7, 2020, at 6:16 PM, David Blevins <[email protected]> wrote:
>
>> On Aug 7, 2020, at 5:02 PM, David Jencks <[email protected]> wrote:
>>
>> It’s possible to customize antora to do some sorts of editing on the fly,
>> but I really don’t recommend it. The first two possibilities are also
>> pretty bad ideas near Antora.
>
> Do you have a link on the editing capabilities?
As far as I know no one has ever done this, and as I said I think it’s a really
bad idea. However, Antora is flexible enough so this is possible.
IMO magic is really bad news in something like a website that no one is really
interested in dedicating themselves to. Any time you have something happening
that is the least bit non-standard and non-obvious you dramatically increase
the barriers to contribution and maintenance. Maven is sort of awful, but it’s
fairly consistent, and it pretty much brought about a revolution in build
systems by a great deal of transparency and consistency. I’m going to argue
really strongly against any solution that isn’t entirely visible from the
source. The two solutions I know of are two copies of the docs, with the EE
prefix hardcoded, and one copy with the prefix as an attribute, i.e.
asciidoctor “variable”.
Lets look for a solution that is completely visible in the adoc source. I
think an ee prefix attribute will do that, lets try it.
>
> Recommended or not, is it possible to do either of the last two and what
> would that look like?
It would look like incomprehensible magic, and no one would be able to figure
out how the result was obtained. At least I wouldn’t be able to if I stepped
away for a week.
>
>> I think we should take a look at the attribute idea in action before ruling
>> it out. For one thing, it might be possible to check for non-use of the
>> attribute by grepping for javax or jakarta, maybe in a pre-commit hook.
>
> We can certainly take a look. Even if the feature doesn't get used for this
> problem doesn't mean learning about it is bad -- we may see another valuable
> way to use it.
>
> In terms of commit hooks, if I had to chose between writing tool/script to
> force a developer to do something or writing a tool/script to do it for them,
> I'll always favor the latter if that's possible.
Well, the commit hook might replace either of ‘javax’ or ‘jakarta’ with
{ee-prefix}. I imagine there would need to be a way to use the other prefix in
a particular document. That could be another 2 attributes.
David Jencks
>
>
> -David
>