Skip to content

Commit c079e0e

Browse files
committed
docs/man/asciidoc.conf, NEWS.adoc: fix generation of links to external manual pages [follow-up to #2797]
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
1 parent 3299277 commit c079e0e

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

NEWS.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,10 @@ https://github.com/networkupstools/nut/milestone/9
299299
build times. Default activity for developer builds should remain as
300300
it was -- to try each such "axis" sequentially. [#2973]
301301

302+
- Revised generation of links to external manual pages in HTML rendering
303+
of NUT manual pages (previous recipe iterations left DocBook XML `ulink`
304+
tag "as is", which was not understood by web browsers).
305+
302306
- Revised `make install-as-root` to fall back to legacy ways of enabling
303307
services, if `systemctl preset-all` fails (assumed due to a systemd 252
304308
bug). [#3022]

docs/man/asciidoc.conf

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@
44
# Usage: linkman:command[manpage-section]
55
# Usage: linkman2:command-page[displayed-command,manpage-section]
66
#
7-
# Note:
7+
# Notes:
88
# - in linkman, {0} is the manpage section, while {target} is the command.
99
# - in linkman2, {0} is the whole list of attributes, {1} is the command to be
1010
# shown, {2} is the manpage section, while {target} is the command page.
1111
# - linkmanext and linkmanext2 macros repeat the behavior of the default ones.
1212
# These macros are intended for system man pages (e.g. HTML links might lead
1313
# to a generic internet site, or possibly to a distro-provided library
1414
# online or locally).
15+
# - UNLIKE docs/asciidoc.conf we should not use "ulink" here, otherwise it
16+
# goes "as is" into the generated HTML (and is not understood by browsers)!
1517

1618
#
1719
# Show NUT link as: <command>(<section>); if section is defined, else just show
@@ -54,9 +56,11 @@ ifdef::backend-xhtml11[]
5456
# FIXME: Allow to define external man page URL structure and whether
5557
# sections should change via configure script options:
5658
[linkmanext-inlinemacro]
57-
<ulink url="https://linux.die.net/man/{0}/{target}">{target}{0?({0})}</ulink>
59+
<a href="https://linux.die.net/man/{0}/{target}">{target}{0?({0})}</a>
60+
#<ulink url="https://linux.die.net/man/{0}/{target}">{target}{0?({0})}</ulink>
5861
[linkmanext2-inlinemacro]
59-
<ulink url="https://linux.die.net/man/{2}/{target}">{1={target}}{2?({2})}</ulink>
62+
<a href="https://linux.die.net/man/{2}/{target}">{1={target}}{2?({2})}</a>
63+
#<ulink url="https://linux.die.net/man/{2}/{target}">{1={target}}{2?({2})}</ulink>
6064
# Override HTML footer, to include NUT version
6165
[footer-text]
6266
Last updated {docdate} {doctime} -- Network UPS Tools {nutversion}

docs/nut.dict

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
personal_ws-1.1 en 3530 utf-8
1+
personal_ws-1.1 en 3531 utf-8
22
AAC
33
AAS
44
ABI
@@ -3293,6 +3293,7 @@ uid
32933293
uint
32943294
ukUNV
32953295
ul
3296+
ulink
32963297
un
32973298
uname
32983299
uncomment

0 commit comments

Comments
 (0)