Fix relative URLs when serving the specification with a custom baseURL
(#1984)
This commit is contained in:
parent
b1f66d1b71
commit
bf8dee74eb
61 changed files with 101 additions and 92 deletions
|
@ -2,7 +2,7 @@
|
|||
<main id="main">
|
||||
<div>
|
||||
<h1 id="title">Not found</h1>
|
||||
<p>This page doesn't exist. Try going back to the <a href="{{ "/" | relURL }}">main page for the Matrix Specification</a>.</p>
|
||||
<p>This page doesn't exist. Try going back to the <a href="{{ "" | relURL }}">main page for the Matrix Specification</a>.</p>
|
||||
</div>
|
||||
</main>
|
||||
{{ end }}
|
||||
|
|
|
@ -16,5 +16,5 @@
|
|||
{{ $omit_title := .omit_title }}
|
||||
|
||||
<div class="alert {{ $type }} {{ if $omit_title }}omit-title{{end}}" role="alert">
|
||||
{{ $content | markdownify }}
|
||||
{{ $content }}
|
||||
</div>
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
the place we are at in the document.
|
||||
|
||||
*/}}
|
||||
|
||||
<script defer language="javascript" type="text/javascript" src="{{ "js/toc.js" | relURL }}"></script>
|
||||
{{ $toc := resources.Get "js/toc.js" -}}
|
||||
<script defer language="javascript" type="text/javascript" src="{{ $toc.RelPermalink }}"></script>
|
||||
|
|
|
@ -13,5 +13,6 @@
|
|||
Google Fonts manually via a script:
|
||||
https://github.com/matrix-org/matrix-spec/tree/main/static/css/fonts
|
||||
*/}}
|
||||
<link rel="preload" href="{{ "/css/fonts/Inter.css" | relURL }}" as="style">
|
||||
<link rel="stylesheet" href="{{ "/css/fonts/Inter.css" | relURL }}">
|
||||
{{ $inter := resources.Get "css/fonts/Inter.css" -}}
|
||||
<link rel="preload" href="{{ $inter.RelPermalink }}" as="style">
|
||||
<link rel="stylesheet" href="{{ $inter.RelPermalink }}">
|
||||
|
|
|
@ -335,7 +335,7 @@ resolve-additional-types.)
|
|||
{{ $stringFormat := "" }}
|
||||
|
||||
{{ with index site.Data "string-formats" . }}
|
||||
{{ $stringFormat = printf "<a href=\"%s\">%s</a>" (htmlEscape .url) (htmlEscape .title) }}
|
||||
{{ $stringFormat = printf "<a href=\"%s\">%s</a>" (htmlEscape .url | relURL) (htmlEscape .title) }}
|
||||
{{ end }}
|
||||
|
||||
{{ return $stringFormat }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue