diff options
author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2023-02-16 20:52:49 +0900 |
---|---|---|
committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2023-02-16 20:52:49 +0900 |
commit | 21f317aab2368ec6ef341dc23b4257ffa24946af (patch) | |
tree | f525eb1f04c031dc5b3d3817e7588f860d0cad3f /page.xslt | |
parent | e24d423e566d3cc688acd359991359d59990e3cb (diff) | |
download | px-21f317aab2368ec6ef341dc23b4257ffa24946af.tar.gz |
Use symlink instead of meta refresh redirect
I couldn't figure out a way to disable caching for the latter.
Diffstat (limited to 'page.xslt')
-rw-r--r-- | page.xslt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/page.xslt b/page.xslt index a9ea776..0cbc2bc 100644 --- a/page.xslt +++ b/page.xslt @@ -17,6 +17,11 @@ <h1>PAGE <xsl:value-of select="@curr"/></h1> <xsl:if test="@next != ''"><a href="/{@next}/">NEXT</a></xsl:if> </nav> + <xsl:variable name="base"> + <xsl:text>/</xsl:text> + <xsl:value-of select="@curr"/> + <xsl:text>/</xsl:text> + </xsl:variable> <xsl:for-each select="post"> <xsl:variable name="id"> @@ -27,8 +32,9 @@ <xsl:value-of select="@title"/> </a></h2> <xsl:for-each select="picture"> - <a href="{@filename}.jpg"> - <img alt="{@desc}" title="{@desc}" src="{@filename}.small.jpg"/> + <a href="{$base}{@filename}.jpg"> + <img alt="{@desc}" title="{@desc}" + src="{$base}{@filename}.small.jpg"/> </a><br/> </xsl:for-each> </article> |