Community support for Antora, the static site generator for making documentation sites based on AsciiDoc.
People
Repo info
Activity
Dan Allen
@mojavelinux
what really amazed me in making 1.1 is how compartmentalized everything is
so for instance, when we changed the location of partials from pages/_partials to partials, that's all done in the content classifier. no other part of the code cared at all
danyill
@danyill
Yes, that's a very tricky thing to achieve when everything about Antora is "convention". Good conventions ain't easy.
Dan Allen
@mojavelinux
and the same for where to look for modules
it's all in this one place in the code
so the architecture is really surprising me. the 850 tests also helps ;)
a simple architecture, but somehow very effective. and plenty of room for the things we still want
danyill
@danyill
How are we going for extensions in Antora? I need to move my git-metadata extension to Antora. But possibly in the long game this might be a useful native Antora thing. I'd like to play with it (my Javascript is non-existent though).
Dan Allen
@mojavelinux
in fact, that's just it. we made plenty of room for ideas to go. and that is going to pay off, i'm sure of it
danyill
@danyill
I'd like to be able to bring git data into pages and also pull git data out through an inline macro (i have a PR in the extensions lab for this).
Dan Allen
@mojavelinux
Asciidoctor extensions work great.
I use about 5 of them already. and in some ways, even more powerful since they have access to the Antora context objects
danyill
@danyill
Would they work great for something which is used to taking git data? I might have thought that would require a closer integration to Antora because it's a virtual file system in Antora
My extension for git metadata just takes the file path and finds the repo and then pulls information out. I couldn't do that with Antora I'm guessing
I'm just after a hint and then I'll have a play
Dan Allen
@mojavelinux
you have access to the git repository info in the Antora context....the repository is closed at that point, but you can reopen it. though we may have to put the clone path to the repo in that data...I hadn't though about that
we may be missing where Antora cloned the repo...if you had that, you could do everything you wanted
danyill
@danyill
I may have a little play with this at some stage. Are you saying the remote isn't stored? Or the local fs path?
Dan Allen
@mojavelinux
for each file, you have access to file.src.origin which contains the repository URL, the reference, and the start path. then file.src.path gives you the path from the start path.
you could always clone the repo again yourself. but what is missing, now that I think about it, is where Antora cloned it
(if it's a local repository, that information is obviously the url)
danyill
@danyill
Where Antora temporarily stored it?
For processing/
?
_
Dan Allen
@mojavelinux
it uses an auto-generated folder name in the system cache folder (or if the cache folder that you specify in the configuration)
you could always figure it out of course by using the same logic antora uses to generate the folder name, but that's just not very nice
we should pass it on
file.src.origin.cloneDir or something of that sort
we'll need an issue for that. really no reason not to do it
keep in mind right now that is a bare repository
in the future, i'm thinking we want a setting as to whether Antora clones bare or not bare
but you still wouldn't be able to use the worktree alone since Antora works with multiple refs
but with a git client, you can access what you need
i recommend isomorphic-git for reasons previously stated
danyill
@danyill
OK. I see. Probably a little early for this. I am in no hurry. I think if I can for my purposes mostly pass attributes at build time since most of them are branch/tag related. For the rest I can just rewrite it and hard code it in when I convert to the Antora structure.
Dan Allen
@mojavelinux
if you want to file that issue to put the repo dir of the clone in the model, that will get the ball rolling on that
like I said, I have, I just don't think it gets passed on
Joseph Cayouette
@jcayouette
@danyill You are using an include to insert page headers? Does this work
danyill
@danyill
I am using include to set things like sectnums, sectlinks, data-uri, linkcss, experimental, stem, stylesheets, fontawesome, docinfo etc. related stuff for javascript. Most of which I haven't tried to get going in Antora yet...
Yes I shall file an issue soonish. Thanks!
@jcayouette something like this is typical which I just include into my header
another way to set common attributes in a more dynamic way is to use a preprocessor. then you have access to the Antora context. it's a more brute force way, but sometimes I summon it
Joseph Cayouette
@jcayouette
@danyill Ill have to give this a try, I know it wont be supported on github, but with antora we wont be using github for "viewing" docs :D The goal is antora, or a published output.
@mojavelinux Thank you
@danyill Woops :D Thank you
danyill
@danyill
Well with the BRAND SPANKING NEW Antora includes if they work up at component level what I do might be a convenient way to set attributes across an entire website
I'm used to publishing all my documentation as discrete zip files (I know...) and I have a subtree with my "regular include Asciidoc files" to help with this
:fireworks: :fireworks:
Dan Allen
@mojavelinux
I do might be a convenient way to set attributes across an entire website