-
-
Notifications
You must be signed in to change notification settings - Fork 360
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
Try to reconcile README, Asciidoc and GitHub (v3) #2049
Merged
Merged
Conversation
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
Also: - add 'foreign' to AM_INIT_AUTOMAKE macro so that automake doesn't fail as a consequence of the lack of a 'README' file (since we now have 'README.adoc'); - make sure README.adoc is distributed.
As the link was still pointing to the old -no longer generated- 'blazer' manpage, take the chance to reword the paragraph so that it points to the new nutdrv_qx driver.
Since GitHub doesn't allow custom macros, only use ours when generating docs, replacing their occurrences with attributes that produce links when on GitHub. This approach should work properly as long as we use them in contexts where attributes are evaluated and substituted before macros. Also, use a common attribute that points to the URL of the website. Reference: networkupstools#226
Substitute the shorthand '<< >>' syntax with attributes that conditionally expand to: - links on GitHub (references can point at most to a section of level docs/common.xsl's <chunk.section.depth>), - xref macros when generating docs. In order to achieve the result, 'chunked' docs get now their pages named after IDs. So, update all the links that use the old auto-generated names. Reference: networkupstools#226
AsciiDoc <= ~8.6.9 tests the wrong attribute and, as a consequence of that, it produces both <link> and <xref>. To workaround this issue, implement the xref macro by ourselves.
Add a new 'linksingledoc' AsciiDoc macro which guarantees that, when chunked HTML is generated, the link always points to a non-chunked file.
Add a new 'linkman2' AsciiDoc macro to support different names for the manpage and the command shown. This is also needed to properly display links to manpages in both GitHub and generated docs without defining an attribute for each manpage. Reference: networkupstools#226
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…evicted from README.adoc Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…he trailing slash is part of `(top_)srcdir` and `(top_)builddir` attributes, so empty values are non-toxic Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…r-dependent attribute definitions Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…dable docs/asciidoc-vars.conf Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…up as far as asciidoc is concerned Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…docs/asciidoc-vars.conf Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ic fashion Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…include Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
This reverts commit 07a39b950b40857c8d8e5c806551e1c40278d3bb.
… syntactic fashion" This reverts commit 300942904bef0921bba382103c9c4b96cc1c5f04.
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…: 234b70422 (2023-09-13) Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…rtability checks" per GNU docs) Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…36f4f03 (2023-09-13) Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…and (top_)(src|build)dir attributes Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…7c5e901 (2023-09-13) Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ed filenames [networkupstools#1953] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
jimklimov
added
enhancement
packaging
documentation
CI
Entries related to continuous integration infrastructure (historically also recipes like Makefiles)
labels
Sep 13, 2023
…DME file Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
This was referenced Sep 13, 2023
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Thanks for Tomas Laurinavicius <tomas@saas.group> for the suggestion. Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CI
Entries related to continuous integration infrastructure (historically also recipes like Makefiles)
documentation
enhancement
packaging
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes: #226
Closes: #669
Related-to: #1953 and #2048
Includes earlier attempts from https://github.com/aquette/nut/tree/gh_adoc, https://github.com/zykh/nut/tree/rename_readme and https://github.com/clepple/nut/tree/rename_readme - thanks to @zykh for figuring out much of the magic behind the scenes, and @clepple and @aquette for earlier blueprints!
Also, note that the proposed solution is rather clumsy due to github/markup#1095 (lack of custom asciidoc macros, configuration files, and
include:...[]
pre-processing) in the GitHub Web-UI renderer - so the least-bad approach, maintainable and working, was to define the needed asciidoc attributes in a newdocs/asciidoc-vars.conf
file and source it into original documents that use these multi-targeted features withmake maintainer-asciidocs
. If GH eventually solves their end, or at least some layers of it, the clumsy part in NUT sources and recipes can be easily retracted:docs/asciidoc-vars.conf
file might become a run-time include (anticipated syntax commented inREADME.adoc
This change currently also renders cross-reference links from one NUT document to potentially another's section as URLs to the published NUT web site, not as links to some neighboring document filename (not easy to guess statically) and hash-anchors there, hosted in the same Git branch, which would have been more helpful.
Checked to render reasonably while browsing the NUT repo on GitHub (with links pointing to expected-looking locations on the NUT website, even if they have not been published there yet - chicken-and-egg problem), as well as PDF renders (e.g.
user-manual.pdf
has internal cross-section links as well as external ones pointing to the NUT website or other "nearby" PDFs).Further work in this area should include:
*.adoc
and theasciidoc-vars.conf
hacks, if only to make their maintenance consistent; possibly the MAN page sources can be exempt as an island of their own (not so many links and includes to worry about, and original asciidoc is more readable as source there even on github, not too much readability benefit from pretty rendering);ifdef ...
choice of link types, as used already in some documents now for website/txt builds - to use http (or xref) links to document sections vs. pointers to individual filenames (the latter may help with GitHub source browsing, to auto-point to doc files in the same commit or branch under development);top_srcdir
andtop_builddir
(as respective{srcdir}/..
etc.) into newly christened*.adoc
sources based on their location in codebase (.
for workspace root,..
fordocs/
,lib/
and such,../../
fordocs/man
,scripts/something
, etc.)