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 cb515df commit 0358979
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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>
10 changes: 5 additions & 5 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 All @@ -49,7 +49,7 @@
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

<!-- inline Mathjax -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
Expand All @@ -71,7 +71,7 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" onload="renderMathInElement(document.body);"></script>

<!-- inline KaTeX -->
<script>
document.addEventListener("DOMContentLoaded", function() {
Expand All @@ -84,7 +84,7 @@
});
</script>
{{ end }}

<!-- Custom CSS style get applied last -->
{{- if isset .Site.Params "customcss" }}
{{ range .Site.Params.customCSS }}
Expand All @@ -98,7 +98,7 @@
{{- else if (hasPrefix . "<script")}}
{{ .| safeHTML }}
{{- else }}
<script src="{{ $.Site.BaseURL }}{{ . }}"></script>
<script src="{{ absURL . }}"></script>
{{- end }}
{{- end }}
</head>

0 comments on commit 0358979

Please sign in to comment.