🐛 fix(feed): load CSS in subfolder setups (#467)

main
Óscar 1 month ago committed by GitHub
parent 0e0a391ea8
commit c3b048d34a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -14,7 +14,13 @@
<meta charset="utf-8"/> <meta charset="utf-8"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/> <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/> <meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="{/atom:feed/@xml:base}/main.css"/> <!-- 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"/>
<!-- Remove http[s]:// -->
<xsl:variable name="baseUrlWithoutProtocol" select="substring-after($baseUrl, '://')"/>
<!-- Remove trailing slash -->
<xsl:variable name="clean_base_url" select="substring-before($baseUrlWithoutProtocol, '/')"/>
<link rel="stylesheet" href="{$baseUrl}main.css"/>
<link rel="stylesheet" href="{/atom:feed/atom:link[@rel='extra-stylesheet']/@href}" /> <link rel="stylesheet" href="{/atom:feed/atom:link[@rel='extra-stylesheet']/@href}" />
</head> </head>

Loading…
Cancel
Save