feat: load console for mobile browsers in debug mode

This commit is contained in:
olOwOlo 2017-10-13 21:38:30 +08:00
parent 0ba82dd176
commit 22515fb8c0
No known key found for this signature in database
GPG key ID: 456394B6E7A15EA6
2 changed files with 9 additions and 1 deletions

View file

@ -42,6 +42,8 @@ copyright = "" # default: author.name ↓ # 默认为下面配
url = "/categories/" url = "/categories/"
[params] [params]
debug = false # If true, load `eruda.min.js`. See https://github.com/liriliri/eruda
since = "2017" # Site creation time # 站点建立时间 since = "2017" # Site creation time # 站点建立时间
# site info (option) # 站点信息(可选) # site info (option) # 站点信息(可选)
@ -51,7 +53,7 @@ copyright = "" # default: author.name ↓ # 默认为下面配
# paginate of archives, tags and categories # 归档、标签、分类每页显示的文章数目 # paginate of archives, tags and categories # 归档、标签、分类每页显示的文章数目
archive-paginate = 3 archive-paginate = 3
# The date format to use; for a list of valid formats, see https://gohugo.io/functions/format/ # The date format to use; for a list of valid formats, see https://gohugo.io/functions/format/
dateFormatToUse = "2006-01-02" dateFormatToUse = "2006-01-02"

View file

@ -50,6 +50,12 @@
<link rel="manifest" href="{{ "manifest.json" | relURL }}"> <link rel="manifest" href="{{ "manifest.json" | relURL }}">
<link rel="mask-icon" href="{{ "safari-pinned-tab.svg" | relURL }}" color="#5bbad5"> <link rel="mask-icon" href="{{ "safari-pinned-tab.svg" | relURL }}" color="#5bbad5">
<!-- debug -->
{{- if .Site.Params.debug }}
<script src="https://cdn.jsdelivr.net/npm/eruda@1.2.6/eruda.min.js" integrity="sha256-Jmz4bc3kp+rRrXX2tGadNBKFLwtzMapr8kHABxSAAP8=" crossorigin="anonymous"></script>
<script>eruda.init();</script>
{{- end }}
<!-- Styles --> <!-- Styles -->
<link href="{{ "dist/even.min.css?v=2.6.3" | relURL }}" rel="stylesheet"> <link href="{{ "dist/even.min.css?v=2.6.3" | relURL }}" rel="stylesheet">
{{ if .Site.Params.bootcdn -}} {{ if .Site.Params.bootcdn -}}