mirror of https://github.com/jkjoy/hugoblog.git
Update head.html
This commit is contained in:
parent
12e4a75fb4
commit
b4b65490c3
|
@ -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" }}
|
||||||
|
|
Loading…
Reference in New Issue