blog/themes/farallon/layouts/partials/head.html

39 lines
1.9 KiB
HTML
Raw Normal View History

2024-05-06 12:00:46 +08:00
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,minimum-scale=1">
<meta name="description"
content="{{ if .IsHome }}{{ $.Site.Params.description }}{{ else if .IsPage }}{{ .Params.description}}{{ else }}{{ .Description }}{{ end }}" />
{{ $styles := resources.Get "scss/app.scss" | toCSS | minify | fingerprint }}
{{ if .IsPage }}
<meta property="og:title" content="{{ .Page.Title }}">
<meta property="og:url" content="{{ .Page.Permalink }}">
<meta property="og:image" content="{{ .Params.cover}}">
<meta property="og:description" content="{{ .Params.description}}">
<meta property="og:type" content="article">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image:src" content="{{ .Params.cover}}">
<meta name="twitter:title" content="{{ .Page.Title }}">
<meta name="twitter:description" content="{{ .Params.description}}">
{{ end }}
<link rel="stylesheet" href="{{ $styles.Permalink }}" integrity="{{ $styles.Data.Integrity }}" media="screen">
2024-08-28 08:41:19 +08:00
<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>
2024-05-06 12:00:46 +08:00
{{ $favicon := resources.Get "images/favicon.png" }}
2024-06-14 14:03:34 +08:00
<link type="image/vnd.microsoft.icon" href="{{ $.Site.Params.icon }}" rel="shortcut icon">
2024-05-06 12:00:46 +08:00
{{ if .OutputFormats.Get "RSS" }}
{{ with .OutputFormats.Get "RSS" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}
2024-06-14 14:03:34 +08:00
{{ end }}