[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 1/2] docs: Fix all links to Xen man pages in html



Second try, this time also works for all links to xen-vbd-interface(7).

We don't try anymore to have pod2html generate relative links, instead
we do it ourself.

First, we modify all links to man pages to have what looks like an
absolute URL and pod2html will just write it in the html output.
Absolute URL in POD are in the form L<text|scheme:...> so let's just use
a scheme that isn't real, but easy to find in the resulting html output:
"relative:".

Then we fix the output and remove all the bogus scheme "relative" and
can end up with nice relative links.

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---

Notes:
    New output can be found here:
    https://xenbits.xenproject.org/people/aperard/2019/man-v2/
    
    Diff sample compare to the previous patch:
    
    --- html-man-v1/xl-disk-configuration.5.html        2019-01-15 
16:01:35.922122233 +0000
    +++ html/man/xl-disk-configuration.5.html   2019-01-15 18:08:31.859960271 
+0000
    @@ -150,7 +150,7 @@
     <dt id="Description2">Description</dt>
     <dd>
    
    -<p>Virtual device as seen by the guest (also referred to as guest drive 
designation in some specifications). <a>xen-vbd-interface(7)</a></p>
    +<p>Virtual device as seen by the guest (also referred to as guest drive 
designation in some specifications). <a 
href="xen-vbd-interface.7.html">xen-vbd-interface(7)</a></p>
    
     </dd>
     <dt id="Supported-values2">Supported values</dt>
    --- html-man-v1/xl.cfg.5.html       2019-01-15 16:01:36.222117709 +0000
    +++ html/man/xl.cfg.5.html  2019-01-15 18:06:36.995207695 +0000
    @@ -2651,27 +2651,27 @@
    
     <dl>
    
    -<dt id="xl-1"><a href="./xl.1.html">xl(1)</a></dt>
    +<dt id="xl-1"><a href="xl.1.html">xl(1)</a></dt>
     <dd>
    
     </dd>
    -<dt id="xl.conf-5"><a href="./xl.conf.5.html">xl.conf(5)</a></dt>
    +<dt id="xl.conf-5"><a href="xl.conf.5.html">xl.conf(5)</a></dt>
     <dd>
    
     </dd>
    -<dt id="xlcpupool.cfg-5"><a 
href="./xlcpupool.cfg.5.html">xlcpupool.cfg(5)</a></dt>
    +<dt id="xlcpupool.cfg-5"><a 
href="xlcpupool.cfg.5.html">xlcpupool.cfg(5)</a></dt>
     <dd>
    
     </dd>
    -<dt id="xl-disk-configuration-5"><a 
href="./xl-disk-configuration.5.html">xl-disk-configuration(5)</a></dt>
    +<dt id="xl-disk-configuration-5"><a 
href="xl-disk-configuration.5.html">xl-disk-configuration(5)</a></dt>
     <dd>
    
     </dd>
    -<dt id="xl-network-configuration-5"><a 
href="./xl-network-configuration.5.html">xl-network-configuration(5)</a></dt>
    +<dt id="xl-network-configuration-5"><a 
href="xl-network-configuration.5.html">xl-network-configuration(5)</a></dt>
     <dd>
    
     </dd>
    -<dt id="xen-tscmode-7"><a 
href="./xen-tscmode.7.html">xen-tscmode(7)</a></dt>
    +<dt id="xen-tscmode-7"><a href="xen-tscmode.7.html">xen-tscmode(7)</a></dt>
     <dd>
    
     </dd>

 docs/Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/docs/Makefile b/docs/Makefile
index cbc61e3f1d..974d9089ed 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -96,8 +96,9 @@ endif
 html/man/%.$(1).html: man/%.$(1).pod Makefile
 ifneq ($(POD2HTML),)
        @$(INSTALL_DIR) $$(@D)
-       sed -r -e 's%L<([^>]+)\(([1-9])\)>%L<\1(\2)|\1.\2>%g' $$< | \
-               (cd man; $(POD2HTML) --podpath=. --htmlroot=. --outfile=../$$@)
+       sed -r -e 's%L<([^>]+)\(([1-9])\)>%L<\1(\2)|relative:\1.\2.html>%g' $$< 
| \
+               $(POD2HTML) | \
+               sed -r -e 's%( href=")relative:%\1%g' > $$@
 else
        @echo "pod2html not installed; skipping $$@"
 endif
-- 
Anthony PERARD


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.