From 1adda175206fb128dd1dfe4935215be5bfa93b0b Mon Sep 17 00:00:00 2001
From: AmazingRise <8315221+AmazingRise@users.noreply.github.com>
Date: Fri, 26 Aug 2022 12:43:00 +0800
Subject: Fixed #134 and remove loadCSS.
---
layouts/_default/baseof.html | 11 ++++++++++-
layouts/partials/head.html | 39 ++++++++++++++++++++++++++++++---------
2 files changed, 40 insertions(+), 10 deletions(-)
(limited to 'layouts')
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 757b685..5cbe2a2 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -19,6 +19,15 @@
{{ partial "journal.html" .}}
-
+
+ {{- $hugoVersion := split (replaceRE ".*([0-9]+)\\.([0-9]+)\\.([0-9]+).*" "$1 $2 $3" hugo.Version) " " -}}
+ {{- if and (eq (int (index $hugoVersion 0)) 0) (ge (int (index $hugoVersion 1)) 101) -}}
+ {{- /* no leading slash */ -}}
+
+ {{- else -}}
+ {{- /* with leading slash */ -}}
+
+ {{- end -}}
+