git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 00/11] doc: asciidoctor: direct man page creation and fixes

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 21, 2021, 22:44 UTC
Message-ID
<20210521224452.530852-1-felipe.contreras@gmail.com>

This patch series enables direct man page creation with asciidoctor, but in addition tries to minimize the difference with asciidoc+docbook.

I fixed as many issues as I could, and now the doc-diff looks very sensible. I could not find any major issues, however, some minor ones still remain.

On the other hand the asciidoc method has issues as well, so it's not clear which method is superior at this point; both have advantages and disadvantages.

At the very least the man pages with pure asciidoctor should be quite usable now.
This series builds on top of my previous cleanups [1].
[1] https://lore.kernel.org/git/20210521223701.526547-1-felipe.contreras@gmail.com/
Felipe Contreras (9):
  doc: doc-diff: set docdate manually
  doc: use asciidoctor to build man pages directly
  doc: asciidoctor: add linkgit macros in man pages
  doc: add man pages workaround for asciidoctor
  doc: asciidoctor: add hack for xrefs
  doc: asciidoctor: add hack to improve links
  doc: asciidoctor: add support for baseurl
  doc: asciidoctor: cleanup man page hack
  doc: asciidoctor: add hack for old versions
Jeff King (1):
  doc-diff: support asciidoctor man pages
Martin Ågren (1):
  doc-diff: drop --cut-footer switch
 Documentation/Makefile                  | 15 ++++++--
 Documentation/asciidoctor-extensions.rb | 51 +++++++++++++++++++++++++
 Documentation/doc-diff                  | 35 +++++++++--------
 3 files changed, 82 insertions(+), 19 deletions(-)
Range-diff against v1:
 1:  de0ecf9c0e <  -:  ---------- doc: allow the user to provide ASCIIDOC_EXTRA
 2:  22a35efa3f <  -:  ---------- doc: doc-diff: allow more than one flag
 3:  a8ad5c703a <  -:  ---------- doc: doc-diff: set docdate manually
 4:  4d0266a3a1 <  -:  ---------- doc: use asciidoctor to build man pages directly
 5:  5efb19348b <  -:  ---------- doc: asciidoctor: add linkgit macros in man pages
 6:  d5d006298e <  -:  ---------- doc: join mansource and manversion
 7:  7c8b502df9 <  -:  ---------- doc: add man pages workaround for asciidoctor
 -:  ---------- >  1:  a2f85f4b05 doc: doc-diff: set docdate manually
 -:  ---------- >  2:  13085a13b6 doc-diff: drop --cut-footer switch
 -:  ---------- >  3:  f0b3576d77 doc: use asciidoctor to build man pages directly
 -:  ---------- >  4:  8b3bb9e9f4 doc-diff: support asciidoctor man pages
 -:  ---------- >  5:  3f9859b223 doc: asciidoctor: add linkgit macros in man pages
 -:  ---------- >  6:  df27fcb9a2 doc: add man pages workaround for asciidoctor
 8:  5d5e9d99ac !  7:  5f0ae41e3e doc: asciidoctor: add hack for xrefs
    @@ Commit message
     
      ## Documentation/asciidoctor-extensions.rb ##
     @@
    - require 'asciidoctor'
      require 'asciidoctor/extensions'
     +require 'asciidoctor/converter/manpage'
     +
    @@ Documentation/asciidoctor-extensions.rb
     +        orig_convert_inline_anchor(node)
     +      end
     +    end
    ++    alias inline_anchor convert_inline_anchor # For old versions of asciidoctor
     +  end
     +end
      
    - module Git
    -   module Documentation
    + Asciidoctor::Extensions.register :git do
    + 
 9:  f4a4f1394e =  8:  a8fb29d893 doc: asciidoctor: add hack to improve links
10:  894802bfbb !  9:  272e6e8551 doc: asciidoctor: add support for baseurl
    @@ Commit message
     
      ## Documentation/Makefile ##
     @@ Documentation/Makefile: ASCIIDOC_DOCBOOK = docbook5
    - override ASCIIDOC_EXTRA += -acompat-mode -atabsize=8
    - override ASCIIDOC_EXTRA += -I. -rasciidoctor-extensions
    - override ASCIIDOC_EXTRA += -alitdd='&\#x2d;&\#x2d;'
    -+override ASCIIDOC_EXTRA += -abaseurl='$(MAN_BASE_URL)'
    + ASCIIDOC_EXTRA += -acompat-mode -atabsize=8
    + ASCIIDOC_EXTRA += -I. -rasciidoctor-extensions
    + ASCIIDOC_EXTRA += -alitdd='&\#x2d;&\#x2d;'
    ++ASCIIDOC_EXTRA += -abaseurl='$(MAN_BASE_URL)'
      ASCIIDOC_DEPS = asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS
      DBLATEX_COMMON =
      XMLTO_EXTRA += --skip-validation
11:  d3b6899ed8 ! 10:  928a632038 doc: asciidoctor: cleanup man page hack
    @@ Documentation/asciidoctor-extensions.rb: module Asciidoctor
     +        nil
            end
          end
    -   end
    +     alias inline_anchor convert_inline_anchor # For old versions of asciidoctor
 -:  ---------- > 11:  758e5be3b7 doc: asciidoctor: add hack for old versions
-- 
2.32.0.rc0
Next: Felipe Contreras
Message 1 of 17 in “doc: asciidoctor: direct man page creation and fixes”
  1. 00/11 doc: asciidoctor: direct man page creation and fixesFelipe Contreras, May 21, 2021
  2. 01/11 doc: doc-diff: set docdate manuallyFelipe Contreras, May 21, 2021
  3. Bagas SanjayaMay 22, 2021
  4. Felipe ContrerasMay 22, 2021
  5. 02/11 doc-diff: drop --cut-footer switchFelipe Contreras, May 21, 2021
  6. 03/11 doc: use asciidoctor to build man pages directlyFelipe Contreras, May 21, 2021
  7. Felipe ContrerasJun 2, 2021
  8. 04/11 doc-diff: support asciidoctor man pagesFelipe Contreras, May 21, 2021
  9. Felipe ContrerasMay 21, 2021
  10. 05/11 doc: asciidoctor: add linkgit macros in man pagesFelipe Contreras, May 21, 2021
  11. 06/11 doc: add man pages workaround for asciidoctorFelipe Contreras, May 21, 2021
  12. 07/11 doc: asciidoctor: add hack for xrefsFelipe Contreras, May 21, 2021
  13. 08/11 doc: asciidoctor: add hack to improve linksFelipe Contreras, May 21, 2021
  14. 09/11 doc: asciidoctor: add support for baseurlFelipe Contreras, May 21, 2021
  15. 10/11 doc: asciidoctor: cleanup man page hackFelipe Contreras, May 21, 2021
  16. 11/11 doc: asciidoctor: add hack for old versionsFelipe Contreras, May 21, 2021
  17. Felipe ContrerasMay 21, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.