-
Notifications
You must be signed in to change notification settings - Fork 357
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
GitBook to Antora migration #842
Comments
@msavy Just a quick thought about this, maybe it is easier to try to convert asciidoc to markdown like explained here: https://tinyapps.org/blog/201701240700_convert_asciidoc_to_markdown.html |
Worth considering, but we are using many features that are in asciidoctor that are not in markdown. |
Do you have an example? |
User guide a better case, I suspect. Off the top of my head: Not saying it won't be possible, but will be difficult to change over. Please do experiment, though. |
BTW apologies for slow responses and short messages, but Apiman is extracurricular largely for me now. So just doing things as-and-when I can spare time! |
Totally understandable, I think apiman is also hard if you work fulltime on it :) I just tried to convert the policies.adoc from the user guide to markdown. I think it is not so bad for a quick convert :) The broken code blocks should be easy to fix |
Not bad - the only thing that jumped out at me when skimming the result is the Sample Configuration sections. |
I had a little attempt at porting to antora this evening, and it worked very well. With a small amount of additional effort I'll push up something onto a GH repo for us to preview. Just a screenshot to tease (left vs right menu not a fixed thing). Doesn't show everything; for example, there's a menu on the left also for your top-level nav items. Anyway, good experiment! Will get back to you shortly with more so we can compare our options. |
Yeah, the problem here is that the conversion escapes the markdown syntax:
if this is done right we got {
"rules": [{
"pathPattern": "/admin/.**",
"verb": "**",
"role": "admin"
}, {
"pathPattern": "/.*",
"verb": "GET",
"role": "user"
}],
"multiMatch": true,
"requestUnmatched": false
} But the other tool seems to work also pretty well :) |
I've pushed up a rough version just so we can have a look and figure which approach is better before investing any more time. This is the default theme without any customisations (it's trivial to do). There's also a super-cool free Algolia search function that we can use as a FLOSS project (see the search box here -- https://docs.antora.org/antora/2.1/playbook/configure-ui/#default-ui-output-directory) Another interesting Antora feature is that you can generate the docs against tags and branches also, and that will be linked in. Would be cool, but I doubt we want to go to the effort of reworking all previous release docs. But you can see that on the antora docs at the bottom left where you can select a specific version to view. NB: if we go ahead with this, git history will be preserved. This is just a rough proto. We would just use GH actions to automatically update in the same manner GitBook does. Also, I'm not familiar with new GitBook. It may have some cool new features? What do you all think? One caveat for both approaches is that we possibly need something for switching between 'properties' and 'JSON' samples for deployment guide. I think a simple addon in Antora would do that but I've not looked yet; alternatively we just show both at once! |
Forgot to say, I didn't bother fixing up the variable substitutions yet -- but that's a trivial job. I am 100% open-minded on this; interested to hear thoughts. |
This looks really nice at first glance! |
@volkflo any thoughts? |
@msavy I think going with antora is a good choice. I briefly looked at the default UI they offer (https://antora.gitlab.io/antora-ui-default/) and this looks pretty good for me :) I personally prefer markdown over asciidoc but I can understand that we do not want to migrate all of the documentation. |
Florian is taking my PoC and will develop it into something that should be ready for automation and production-grade. We've mapped out a plan that we think should work very well for our use-cases. |
I would like to remove the Production Guide](https://github.com/apiman/apiman-docs-production-guide) and merge it into the installation guide (maybe a section for prod deployments) Any concerns about that? :) |
Seems OK to me 👍 |
We've made some really nice progress on this both in terms of automation and getting something generated. Not far from being ready to deploy. @volkflo has done a good job taking the PoC to a production-ready state, and I've added a few bits of automation around it too. I also want to auto-trigger website rebuilds when docs repos are updated, so that's on my list. You can check it out on: http://www.apiman.io/apiman-docs
|
Have added a ytt (https://carvel.dev/ytt) overlay that will allow update of version numbers via CI rather easily. However, this would require the apiman-docs-user-guide repo to know when a release has been done, so we can either do that by repository dispatch or add that to the release scripts. https://github.com/apiman/apiman-docs-user-guide/blob/antora/antora-overlay.yml This works by:
it simply writes out the result to console/file and we commit that back to the repo
|
Ok, here's the plan for the final bits:
|
I keep forgetting about this so writing it down here.
Looks like GitBook are archiving their legacy service on 30th April, meaning that it won't regenerate automatically for us any more (but will continue to be hosted).
Unfortunately, their new services does not appear to support Asciidoc for whatever reason, and we make extensive use of Asciidoc features throughout the documentation.
However, I think there is a clear solution: Antora.
It was written by Dan Allen (Asciidoctor creator & maintainer), as an alternative to GitBook that has first-class Asciidoc support.
The only downside is that we will need to host it ourselves, I think. That should not be a major hassle, really.
Here's a short blog-post from someone who migrated -- https://blog.yuzutech.fr/blog/from-gitbook-to-antora/index.html
Here are the Antora docs -- https://docs.antora.org/antora/2.2/
Here are some examples of Antora in other projects -- https://docs.couchbase.com/server/4.1/introduction/intro.html
I will do some further reading and tests this evening to progress things and see whether there are any edge cases.
The text was updated successfully, but these errors were encountered: