-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Feature: modernize API documentation #4607
Conversation
hi @bluca , @sappo , Additional steps compared to the PR original description:
Additional tests I've done:
After merging I suggest to go in the github "Settings" and then "Pages" and choose as "source" the "Github Actions" option. |
e7db1c5
to
20c506a
Compare
How can this integrate into wikidot where the rest of the documentation is (previous versions, other projects, etc) |
@bluca it won't. Older docs will still be available in wikidot. This PR will provide the latest docs on gh pages and eventually readthedocs where newer version will then be published to. |
That's problematic, search engines will always point to the old URLs as they have been around for long, so it would need redirecting, but that can't happen if the previous versions are lost |
A couple of considerations:
|
I have no opinion on where things are hosted and in which format, as long as we don't break things - if google searches suddenly start showing the wrong website or dead pages, then that's a problem. If it can be made to work with some redirects or aliases or whatnot, then it's all fine by me |
@sappo do you think it would be possible to setup some redirection from api.zeromq.org to a zeromq.readthedocs.io website (which of course does not exist yet)? Looking at https://www.wikidot.com/doc-modules:redirect-module, it seems to be possible to setup such kind of redirect... but I don't have the credentials for the zeromq wikidot website of course... |
I can do that change too, I have admin access to wikidot as well |
ok wonderful. Then do you think anything else is needed in this PR before merging ? |
The dependencies in |
done, but I'm not sure how to test it. I found this OBS page: for this PR, but in the "Monitor" tab it shows "Unavailable Build Results." |
some cache was broken, try to rebase and force push? hopefully it will actually build this time |
also squash the commit, no need to have it separate |
4edce26
to
af79607
Compare
done, the branch should be aligned to latest master, all commits squashed... let's see |
looks like asciidoctor is not available in a bunch of distributions: https://build.opensuse.org/package/show/network:messaging:zeromq:ci:zeromq:libzmq:PR-4607/libzmq |
I think in some distros (Centos/SuSE) the package is often named "rubygem-asciidoctor"... but that comes typically from EPEL or similar repositories... do you know if e.g. EPEL is enabled or can be enabled during the OBS build? |
Yes EPEL is enabled: https://build.opensuse.org/projects/network:messaging:zeromq:git-draft/meta |
I pushed an attempt to install "rubygem-asciidoctor" on RHEL/SuSE and just "asciidoctor" everywhere else. I don't have the possibility to test these many distros myself so I'll watch OBS results and iteratively try to fix all reds... at the end I can re-squash all commits together... |
@bluca do you know if it's possible to enable https://build.opensuse.org/package/show/devel%3Alanguages%3Aruby%3Aextensions/rubygem-asciidoctor during the zeromq OBS build? |
Those are 'devel' projects, IE they are used for development of new packages/versions, and should not be used when doing release builds - so no, however from there it should get included in SUSE releases |
I think you have to use |
thanks that worked well. |
yes it's stream - is epel compatible with rhel too? I am not really familiar with the rhel side of the world |
yes, EPEL is fully compatible with RHEL (and Centos Stream as well btw)... for me it's the opposite: I'm mostly familiar with RHEL side of the world, less with Debian side :) |
actually it's already configured, both centos and rhel are using the epel repository too |
then I'm a bit lost... using virtualbox I just run a Centos8 stream, and did successfully:
not sure if OBS gives some possibility to debug on the Centos8 system? or print e.g. the output of "dnf repolist" somewhere? |
no that's not possible - maybe |
using both |
Which package provides ruby(rubygems) on a real installation? We can try a substitution |
ruby(rubygems) is provided by the RPM named just rubygems. This is on my vbox Centos8 stream: Last rpm query with --provides shows that "rubygems" RPM is providing "ruby(rubygems)". I will try the same on RHEL8 but I'm pretty sure it's identical. |
I managed to get it working for centos with a hint from an obs admin, the ruby stuff is in a "module" so it has to be enabled with |
oh I see -- nice catch. |
Yeah so you can remove the different name of the dependency, as it seems it's not necessary, and also you can exclude it from rhel/centos 7 or lower so that the build doesn't break, then this can be merged |
44d4472
to
56cc3c4
Compare
done, even if the RHEL7 build in OBS keeps failing, but this time with the same error failure that I see also in libzmq "master" branch: nothing provides python3 needed by |
yeah you can ignore that, at some point I'll look into it |
.github/workflows/Docs.yaml
Outdated
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["feature/asciidoctor"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be changed to master I guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also it should filter by repository so that it doesn't run on forks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, I had mostly forgot about that! It needs to be changed to master.
However I think there is no need to filter by repository... actually I see it as a bonus the fact that forks will deploy github Pages (of course to the forked-repo Pages, e.g. my https://f18m.github.io/libzmq/ site and not to the libzmq official Pages, which will be available at https://zeromq.github.io/libzmq/) since this will allow contributors to check their changes and see how they look like (even if it's also very easy to just produce the HTML locally and preview that locally)...
* migrate from the old, unmaintained "asciidoc-py" tool to the new "asciidoctor" generator * migrate from asciidoc-py syntax to the modern Asciidoc syntax (especially page titles and section titles) * remove the need of "xmlto" utility to create the manpage output; use asciidoctor for that * add HTML output support to the doc/Makefile by using asciidoctor * change API documentation files extension from .txt to .adoc to make it more explicit that they are Asciidoc-encoded (as a bonus several IDE plugins will autodetect the .adoc format as Asciidoc) * remove asciidoc.conf: asciidoctor does not support that; this also required replacing the macro linkzmq into all documentation pages * add a new Github action CI do deploy to Github Pages the static HTMLs produced by Asciidoctors * removed references to the "xmlto" and "a2x" tools from the build and packaging systems: Asciidoctor can convert the documentation directly to e.g. pdf (via extended converters) and anyway there was no code/target for using "xmlto" and "a2x" tools anyway
56cc3c4
to
b6ca9b2
Compare
Thanks, about czmq: I will save somewhere the script I used to mass convert the asciidoc from legacy to modern format, so we can use that for czmq as well I'm now looking at readthedocs integration... |
When building from dist tarballs, docs come pre-compiled, so no extra dependency is needed. On builds from a git working tree `libzmq` actually used to depend on `asciidoc` and `xmlto` which was recently modernized to `ruby-asciidoctor`, see zeromq/libzmq#4607
When building from dist tarballs, docs come pre-compiled, so no extra dependency is needed. On builds from a git working tree `libzmq` actually used to depend on `asciidoc` and `xmlto` which was recently modernized to `ruby-asciidoctor`, see zeromq/libzmq#4607
This is a WIP PR.
See mailing list for more details.
See current rendering at: https://f18m.github.io/libzmq/
Current known issues: links in MANPAGES are weird (show some ".html" text)
Additionally this MR requires squashing prior merging.