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 \
|
||||
$(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 $< > $@ \
|
||||
|
|
|
@ -453,7 +453,7 @@ br.clear {
|
|||
text-decoration: underline;
|
||||
}
|
||||
|
||||
#contact, #community {
|
||||
#contact, #community, #contribute {
|
||||
float: left;
|
||||
padding: 0px;
|
||||
margin-left: 3em;
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
<!-- This is the master page structure -->
|
||||
<xsl:template match="/" mode="page">
|
||||
<xsl:param name="pagename"/>
|
||||
<xsl:param name="pagesrc"/>
|
||||
<xsl:param name="timestamp"/>
|
||||
<xsl:text disable-output-escaping="yes"><!DOCTYPE html>
|
||||
</xsl:text>
|
||||
|
@ -165,6 +166,12 @@
|
|||
<li><a href="http://serverfault.com/questions/tagged/libvirt">serverfault</a></li>
|
||||
</ul>
|
||||
</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">
|
||||
Participants in the libvirt project agree to abide by <a href="{$href_base}governance.html#codeofconduct">the project code of conduct</a>
|
||||
</div>
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="." mode="page">
|
||||
<xsl:with-param name="pagename" select="$pagename"/>
|
||||
<xsl:with-param name="pagesrc" select="$pagesrc"/>
|
||||
<xsl:with-param name="timestamp" select="$timestamp"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="." mode="page">
|
||||
<xsl:with-param name="pagename" select="$pagename"/>
|
||||
<xsl:with-param name="pagesrc" select="$pagesrc"/>
|
||||
<xsl:with-param name="timestamp" select="$timestamp"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:template>
|
||||
|
|
Loading…
Reference in New Issue