From: Daniel P. Berrangé Date: Wed, 8 Apr 2020 15:18:58 +0000 (+0100) Subject: docs: add 'edit this page' link to footer of every page X-Git-Tag: v6.3.0-rc1~168 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10ae8eb59c37ac4abf8c359644f103be2e0efb52;p=thirdparty%2Flibvirt.git docs: add 'edit this page' link to footer of every page To encourage contributors to make changes to the main website, add a footer link to every page which links to the corresponding source file in git. With gitlab, they are able to edit content directly in the web browser and then submit a merge request. This gives a way to contribute content that is arguably easier than our wiki which requires manual account creation, while this will also benefit from maintainer review. Reviewed-by: Ján Tomko Signed-off-by: Daniel P. Berrangé --- diff --git a/docs/Makefile.am b/docs/Makefile.am index 61862c4ab7..404121a2a2 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -429,6 +429,10 @@ manpages/%.html.in: manpages/%.rst %.html.tmp: %.html.in site.xsl subsite.xsl page.xsl \ $(acl_generated) $(AM_V_GEN)name=`echo $@ | sed -e 's/.tmp//'`; \ + genhtmlin=`echo $@ | sed -e 's/.tmp/.in/'`; \ + rst=`echo $@ | sed -e 's/.html.tmp/.rst/'`; \ + src="$$genhtmlin"; \ + test -f "$$genhtmlin" && src="$$rst"; \ dir=`dirname $@` ; \ if test "$$dir" = "."; \ then \ @@ -438,6 +442,7 @@ manpages/%.html.in: manpages/%.rst style=subsite.xsl; \ fi; \ $(XSLTPROC) --stringparam pagename $$name \ + --stringparam pagesrc $$src \ --stringparam builddir '$(abs_top_builddir)' \ --stringparam timestamp $(timestamp) --nonet \ $(top_srcdir)/docs/$$style $< > $@ \ diff --git a/docs/libvirt.css b/docs/libvirt.css index 18e55dac59..a6f343908d 100644 --- a/docs/libvirt.css +++ b/docs/libvirt.css @@ -453,7 +453,7 @@ br.clear { text-decoration: underline; } -#contact, #community { +#contact, #community, #contribute { float: left; padding: 0px; margin-left: 3em; diff --git a/docs/page.xsl b/docs/page.xsl index ddae5ab508..6923871400 100644 --- a/docs/page.xsl +++ b/docs/page.xsl @@ -77,6 +77,7 @@ + <!DOCTYPE html> @@ -165,6 +166,12 @@
  • serverfault
  • +
    +

    Contribute

    + +
    Participants in the libvirt project agree to abide by the project code of conduct
    diff --git a/docs/site.xsl b/docs/site.xsl index c9d41f2c93..73ddd8ca6b 100644 --- a/docs/site.xsl +++ b/docs/site.xsl @@ -27,6 +27,7 @@ + diff --git a/docs/subsite.xsl b/docs/subsite.xsl index f56ac0491c..bfd34eebd2 100644 --- a/docs/subsite.xsl +++ b/docs/subsite.xsl @@ -17,6 +17,7 @@ +