mirror of https://gitee.com/openkylin/libvirt.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 <jtomko@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
5d6059f8ec
commit
10ae8eb59c
|
@ -429,6 +429,10 @@ manpages/%.html.in: manpages/%.rst
|
||||||
%.html.tmp: %.html.in site.xsl subsite.xsl page.xsl \
|
%.html.tmp: %.html.in site.xsl subsite.xsl page.xsl \
|
||||||
$(acl_generated)
|
$(acl_generated)
|
||||||
$(AM_V_GEN)name=`echo $@ | sed -e 's/.tmp//'`; \
|
$(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 $@` ; \
|
dir=`dirname $@` ; \
|
||||||
if test "$$dir" = "."; \
|
if test "$$dir" = "."; \
|
||||||
then \
|
then \
|
||||||
|
@ -438,6 +442,7 @@ manpages/%.html.in: manpages/%.rst
|
||||||
style=subsite.xsl; \
|
style=subsite.xsl; \
|
||||||
fi; \
|
fi; \
|
||||||
$(XSLTPROC) --stringparam pagename $$name \
|
$(XSLTPROC) --stringparam pagename $$name \
|
||||||
|
--stringparam pagesrc $$src \
|
||||||
--stringparam builddir '$(abs_top_builddir)' \
|
--stringparam builddir '$(abs_top_builddir)' \
|
||||||
--stringparam timestamp $(timestamp) --nonet \
|
--stringparam timestamp $(timestamp) --nonet \
|
||||||
$(top_srcdir)/docs/$$style $< > $@ \
|
$(top_srcdir)/docs/$$style $< > $@ \
|
||||||
|
|
|
@ -453,7 +453,7 @@ br.clear {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
#contact, #community {
|
#contact, #community, #contribute {
|
||||||
float: left;
|
float: left;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
margin-left: 3em;
|
margin-left: 3em;
|
||||||
|
|
|
@ -77,6 +77,7 @@
|
||||||
<!-- This is the master page structure -->
|
<!-- This is the master page structure -->
|
||||||
<xsl:template match="/" mode="page">
|
<xsl:template match="/" mode="page">
|
||||||
<xsl:param name="pagename"/>
|
<xsl:param name="pagename"/>
|
||||||
|
<xsl:param name="pagesrc"/>
|
||||||
<xsl:param name="timestamp"/>
|
<xsl:param name="timestamp"/>
|
||||||
<xsl:text disable-output-escaping="yes"><!DOCTYPE html>
|
<xsl:text disable-output-escaping="yes"><!DOCTYPE html>
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
|
@ -165,6 +166,12 @@
|
||||||
<li><a href="http://serverfault.com/questions/tagged/libvirt">serverfault</a></li>
|
<li><a href="http://serverfault.com/questions/tagged/libvirt">serverfault</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="contribute">
|
||||||
|
<h3>Contribute</h3>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://gitlab.com/libvirt/libvirt/-/blob/master/docs/{$pagesrc}">edit this page</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
<div id="conduct">
|
<div id="conduct">
|
||||||
Participants in the libvirt project agree to abide by <a href="{$href_base}governance.html#codeofconduct">the project code of conduct</a>
|
Participants in the libvirt project agree to abide by <a href="{$href_base}governance.html#codeofconduct">the project code of conduct</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
<xsl:apply-templates select="." mode="page">
|
<xsl:apply-templates select="." mode="page">
|
||||||
<xsl:with-param name="pagename" select="$pagename"/>
|
<xsl:with-param name="pagename" select="$pagename"/>
|
||||||
|
<xsl:with-param name="pagesrc" select="$pagesrc"/>
|
||||||
<xsl:with-param name="timestamp" select="$timestamp"/>
|
<xsl:with-param name="timestamp" select="$timestamp"/>
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
<xsl:apply-templates select="." mode="page">
|
<xsl:apply-templates select="." mode="page">
|
||||||
<xsl:with-param name="pagename" select="$pagename"/>
|
<xsl:with-param name="pagename" select="$pagename"/>
|
||||||
|
<xsl:with-param name="pagesrc" select="$pagesrc"/>
|
||||||
<xsl:with-param name="timestamp" select="$timestamp"/>
|
<xsl:with-param name="timestamp" select="$timestamp"/>
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
Loading…
Reference in New Issue