From 22515fb8c090568c21a5dbe80e2e38380b53e908 Mon Sep 17 00:00:00 2001
From: olOwOlo <26087907+olOwOlo@users.noreply.github.com>
Date: Fri, 13 Oct 2017 21:38:30 +0800
Subject: [PATCH] feat: load console for mobile browsers in debug mode
---
exampleSite/config.toml | 4 +++-
layouts/partials/head.html | 6 ++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index f98d300..b56118d 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -42,6 +42,8 @@ copyright = "" # default: author.name ↓ # 默认为下面配
url = "/categories/"
[params]
+ debug = false # If true, load `eruda.min.js`. See https://github.com/liriliri/eruda
+
since = "2017" # Site creation time # 站点建立时间
# site info (option) # 站点信息(可选)
@@ -51,7 +53,7 @@ copyright = "" # default: author.name ↓ # 默认为下面配
# paginate of archives, tags and categories # 归档、标签、分类每页显示的文章数目
archive-paginate = 3
-
+
# The date format to use; for a list of valid formats, see https://gohugo.io/functions/format/
dateFormatToUse = "2006-01-02"
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 892a857..a1264e6 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -50,6 +50,12 @@
+
+{{- if .Site.Params.debug }}
+
+
+{{- end }}
+
{{ if .Site.Params.bootcdn -}}