website/layouts/partials/content.html
liuboaibc 317784430c SEO with redirect chains
Signed-off-by: liuboaibc <kukudehero@gmail.com>
2021-03-29 14:56:59 +08:00

72 lines
2.7 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{ $context := .context }}
{{ $parent := .parent }}
{{ $text := .text }}
<!DOCTYPE html>
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}">
<head>
{{- partial "head.html" $context -}}
{{ $style := resources.Get "scss/content.scss" | toCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
{{ $style := resources.Get "scss/markdown.scss" | toCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
</head>
<body>
{{ if .Site.Params.addGoogleTag }}
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W9FLX4R"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
{{ end }}
{{ partial "header.html" $context }}
<section class="main-section">
<div class="common-layout">
<div class='breadcrumb'>
{{ $section := $context.FirstSection }}
<span><a href='{{ $parent | relLangURL }}/'>{{ i18n $text }}</a> > </span>
<span>{{ $context.Title }}</span>
</div>
<div class='main-div middle-div'>
<div class='author'>{{ $context.Params.author }}</div>
<div class='date'>{{ i18n "Published on" }}{{ string $context.Params.createTime }}</div>
<h1>{{ $context.Title }}</h1>
<div class="share-1">
{{ partial "share.html" $context }}
</div>
<div class='content'>
<div class='md-body'>
{{ $context.Content }}
</div>
</div>
<div class="share-2">
{{ partial "share.html" $context }}
</div>
</div>
<div class='aside'>
<div class="inner-div">
<div class='title'>{{ i18n "Table of Contents" }}</div>
<div class='tabs'>{{ $context.TableOfContents }}</div>
</div>
</div>
</div>
</section>
{{ partial "footer.html" $context }}
{{ $aside := resources.Get "js/aside.js" }}
{{ $asideJS := $aside | resources.Fingerprint "sha512" }}
<script type="text/javascript" src="{{ $asideJS.RelPermalink }}" integrity="{{ $asideJS.Data.Integrity }}"></script>
{{ $tab := resources.Get "js/markdown-tab.js" }}
{{ $tabJS := $tab | resources.Fingerprint "sha512" }}
<script type="text/javascript" src="{{ $tabJS.RelPermalink }}" integrity="{{ $tabJS.Data.Integrity }}"></script>
<script>
var viewer = new Viewer(document.querySelector('.md-body'), {
url: 'src'
})
</script>
</body>
</html>