Skip to content

Commit

Permalink
🐛 fix(sitemap): use the base url for JS/CSS loading
Browse files Browse the repository at this point in the history
Related: #221
  • Loading branch information
welpo committed Nov 14, 2023
1 parent 1df3f7f commit c8a1705
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions static/sitemap_style.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9">
<xsl:output method="html" encoding="UTF-8" indent="yes" />

<!-- The base URL is assumed to be the first URL in the sitemap. -->
<xsl:variable name="baseUrl" select="(sitemap:urlset/sitemap:url)[1]/sitemap:loc"/>

<xsl:template match="/sitemap:urlset">
<html>
<head>
<title>Sitemap</title>
<link rel="stylesheet" href="/main.css"/>
<script src="/js/sortTable.min.js" defer="defer"></script>
<link rel="stylesheet" href="{$baseUrl}main.css"/>
<script src="{$baseUrl}js/sortTable.min.js" defer="defer"></script>
</head>
<body>
<div class="full-width">
Expand Down

0 comments on commit c8a1705

Please sign in to comment.