mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
docs: build: Use proper path to file in 'contribute' link
NEWS.rst is based in the root of the repository and 'hvsupport.html' doesn't have a backing file which can be edited since it's fully generated. Our 'contribute -> edit this page' link on the bottom of the page is wrong in those cases. Fix it by adding the contribute section only when there's a source and base the 'source' of a html file in the root of the repository. Along with that we need to modify the scripts/meson-html-gen.py script to accept optional 'pagesrc' and the XSL template to skip the 'contribute' section when we don't have a source. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
@@ -12,7 +12,7 @@ parser.add_argument("timestamp", type=str, help="docs timestamp")
|
||||
parser.add_argument("style", type=str, help="XSL stile file")
|
||||
parser.add_argument("infile", type=str, help="path to source HTML file")
|
||||
parser.add_argument("htmlfile", type=str, help="path to generated HTML file")
|
||||
parser.add_argument("pagesrc", type=str, help="path to source file used for edit this page")
|
||||
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', '')
|
||||
|
||||
Reference in New Issue
Block a user