Update head.html

This commit is contained in:
浪子 2024-10-26 18:02:14 +08:00 committed by GitHub
parent d559c00e68
commit b649fe1a44
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 14 deletions

View File

@ -16,19 +16,6 @@
<meta name="twitter:description" content="{{ .Params.description}}"> <meta name="twitter:description" content="{{ .Params.description}}">
{{ end }} {{ end }}
<link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" media="screen"> <link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" media="screen">
<script src="//cdn.jkjoy.cn/highlight/prism.js"></script>
<link rel="stylesheet" href="//cdn.jkjoy.cn/highlight/prism.css" />
<script>
document.addEventListener('DOMContentLoaded', function () {
var defaultLanguage = 'javascript'; // 设置默认语言
document.querySelectorAll('pre code').forEach(function (block) {
if (!block.classList.length) {
block.classList.add('language-' + defaultLanguage);
}
});
Prism.highlightAll();
});
</script>
{{ $favicon := resources.Get "images/favicon.png" }} {{ $favicon := resources.Get "images/favicon.png" }}
<link type="image/vnd.microsoft.icon" href="{{ $.Site.Params.icon }}" rel="shortcut icon"> <link type="image/vnd.microsoft.icon" href="{{ $.Site.Params.icon }}" rel="shortcut icon">
{{ if .OutputFormats.Get "RSS" }} {{ if .OutputFormats.Get "RSS" }}
@ -36,4 +23,12 @@
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" /> <link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" /> <link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }} {{ end }}
{{ end }} {{ end }}
<link rel="stylesheet" href="https://cdn.imsun.org/lxgw-wenkai-screen-webfont/lxgwwenkaigbscreen.css" />
<style>
body {
font-family: "LXGW WenKai Screen", sans-serif;
}
</style>