Skip to content

Commit

Permalink
Replace .Site.BaseURL by absURL (solves athul#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
hcartiaux committed Jul 24, 2024
1 parent a323a0e commit 175c640
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<header>
<div class="main">
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
<a href="{{ absURL "/" }}">{{ .Site.Title }}</a>
</div>
<nav>
{{ range .Site.Menus.main }}
<a href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
{{ if eq .Site.Params.mode "toggle" -}}
| <span id="dark-mode-toggle" onclick="toggleTheme()"></span>
<script src="{{ .Site.BaseURL }}js/themetoggle.js"></script>
<script src="{{ absURL "js/themetoggle.js" }}"></script>
{{ end }}
</nav>
</header>
5 changes: 2 additions & 3 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{{ if and (isset .Site.Params "social") (.Site.Params.useCDN | default false) -}}
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
{{- else if or (isset .Site.Params "social") (eq .Site.Params.mode "toggle") -}}
<script src="{{ .Site.BaseURL }}js/feather.min.js"></script>
<script src="{{ absURL "js/feather.min.js" }}"></script>
{{ end }}
{{ if .Site.Params.useCDN | default false -}}
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@1,500&display=swap" rel="stylesheet">
Expand Down Expand Up @@ -80,7 +80,6 @@
<script defer src="{{ absURL "katex/katex.min.js" }}"></script>
<script defer src="{{ absURL "katex/auto-render.min.js" }}" onload="renderMathInElement(document.body);"></script>
{{ end -}}

<!-- inline KaTeX -->
<script>
document.addEventListener("DOMContentLoaded", function() {
Expand All @@ -107,7 +106,7 @@
{{- else if (hasPrefix . "<script")}}
{{ .| safeHTML }}
{{- else }}
<script src="{{ $.Site.BaseURL }}{{ . }}"></script>
<script src="{{ absURL . }}"></script>
{{- end }}
{{- end }}
</head>

0 comments on commit 175c640

Please sign in to comment.