mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-10-16 23:33:52 +03:00
docs: fix libvirt go-import metadata in pages and links in 404 page
The meson conversion lost the <meta> tags providing the go-import, because the "$pagename" variable lost the .html suffix. Rather than fix that, just change to using "$pagesrc" instead, as it is a better fit. The 404 page also needs to use absolute links to work correctly for pages in sub-folders. Reviewed-by: Pavel Hrdina <phrdina@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
@@ -15,12 +14,9 @@ parser.add_argument("htmlfile", type=str, help="path to generated HTML file")
|
||||
parser.add_argument("pagesrc", type=str, default="", nargs='?', help="(optional) path to source file used for edit this page")
|
||||
args = parser.parse_args()
|
||||
|
||||
name = os.path.basename(args.htmlfile).replace('.html', '')
|
||||
|
||||
html_tmp = subprocess.run(
|
||||
[
|
||||
args.xsltproc,
|
||||
'--stringparam', 'pagename', name,
|
||||
'--stringparam', 'pagesrc', args.pagesrc,
|
||||
'--stringparam', 'builddir', args.builddir,
|
||||
'--stringparam', 'timestamp', args.timestamp,
|
||||
|
Reference in New Issue
Block a user