aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMartin Kletzander <mkletzan@redhat.com>2012-06-22 15:21:18 +0200
committerMartin Kletzander <mkletzan@redhat.com>2012-08-10 10:54:23 +0200
commit3924072e4eb2e359002a86b3199cccb4e1d7bf40 (patch)
tree44c57bcbe961b23da17afce1c014161324530aaa /docs
parentnwfilter: fix crash during filter define when lxc driver failed startup (diff)
downloadlibvirt-3924072e4eb2e359002a86b3199cccb4e1d7bf40.tar.gz
libvirt-3924072e4eb2e359002a86b3199cccb4e1d7bf40.tar.bz2
libvirt-3924072e4eb2e359002a86b3199cccb4e1d7bf40.zip
docs: fix 404 page when fetched from different location
Error 404 page had relative paths specified for both the image and stylesheets which caused a problem when requested URL included a subfolder (e.g. http://libvirt.org/asdf/asdf ). This patch corrects this behaviour by modifying href_base to '/' (for style-sheets) and changing the src of the image (to be '/' always).
Diffstat (limited to 'docs')
-rw-r--r--docs/404.html.in2
-rw-r--r--docs/site.xsl11
2 files changed, 11 insertions, 2 deletions
diff --git a/docs/404.html.in b/docs/404.html.in
index 936387145..6021ad0d0 100644
--- a/docs/404.html.in
+++ b/docs/404.html.in
@@ -15,7 +15,7 @@
</ul>
<p class="image">
- <img src="libvirtLogo404.png" alt="libvirt Logo"/>
+ <img src="/libvirtLogo404.png" alt="libvirt Logo"/>
</p>
diff --git a/docs/site.xsl b/docs/site.xsl
index a6801e661..a65c10d28 100644
--- a/docs/site.xsl
+++ b/docs/site.xsl
@@ -14,7 +14,16 @@
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
- <xsl:variable name="href_base" select="''"/>
+ <xsl:variable name="href_base">
+ <xsl:choose>
+ <xsl:when test="$pagename = '404.html'">
+ <xsl:value-of select="'/'"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="''"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
<xsl:template match="/">
<xsl:apply-templates select="." mode="page">