Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: modernize API documentation
* 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
- Loading branch information
Showing
87 changed files
with
1,256 additions
and
2,048 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Simple workflow for deploying static content to GitHub Pages | ||
name: Deploy API docs content to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["feature/asciidoctor"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Single deploy job since we're just deploying | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
## libzmq-specific CI/CD ## | ||
- name: Install AsciiDoctor | ||
run: sudo apt install -y asciidoctor | ||
- name: Convert AsciiDoc with AsciiDoctor into HTML | ||
run: ./autogen.sh && ./configure && make --directory=doc | ||
|
||
## boilerplate steps to publish github Pages ## | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: 'doc/' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# - Find Asciidoctor | ||
# this module looks for asciidoctor | ||
# | ||
# ASCIIDOCTOR_EXECUTABLE - the full path to asciidoc | ||
# ASCIIDOCTOR_FOUND - If false, don't attempt to use asciidoc. | ||
set (PROGRAMFILESX86 "PROGRAMFILES(X86)") | ||
|
||
find_program(ASCIIDOCTOR_EXECUTABLE asciidoctor asciidoctor | ||
PATHS "$ENV{ASCIIDOCTOR_ROOT}" | ||
"$ENV{PROGRAMW6432}/asciidoctor" | ||
"$ENV{PROGRAMFILES}/asciidoctor" | ||
"$ENV{${PROGRAMFILESX86}}/asciidoctor") | ||
|
||
find_program(A2X_EXECUTABLE a2x | ||
PATHS "$ENV{ASCIIDOCTOR_ROOT}" | ||
"$ENV{PROGRAMW6432}/asciidoctor" | ||
"$ENV{PROGRAMFILES}/asciidoctor" | ||
"$ENV{${PROGRAMFILESX86}}/asciidoctor") | ||
|
||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_ARGS(AsciiDoctor REQUIRED_VARS ASCIIDOCTOR_EXECUTABLE) | ||
mark_as_advanced(ASCIIDOCTOR_EXECUTABLE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.