Update head.html

This commit is contained in:
浪子 2024-08-28 08:41:19 +08:00
parent 12e4a75fb4
commit b4b65490c3
1 changed files with 13 additions and 0 deletions

View File

@ -16,6 +16,19 @@
<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" }}