Compare commits
2 Commits
baa292f66a
...
9e6238bf03
| Author | SHA1 | Date | |
|---|---|---|---|
| 9e6238bf03 | |||
| a27eaa399e |
27
config.toml
27
config.toml
@ -1,14 +1,33 @@
|
||||
baseURL = "http://example.org/"
|
||||
languageCode = "en-us"
|
||||
title = "My New Hugo Site"
|
||||
baseURL = "https://wrong.wang/"
|
||||
languageCode = "zh-CN"
|
||||
title = "wrong.wang"
|
||||
theme = "hugo-w2ng"
|
||||
pygmentsStyle="github"
|
||||
hasCJKLanguage = true
|
||||
enableEmoji = true
|
||||
googleAnalytics = "UA-120056178-1"
|
||||
copyright = "This work is licensed under a CC BY-NC 4.0(署名-非商业性使用 4.0 国际) License."
|
||||
|
||||
[author]
|
||||
name = "王锐"
|
||||
|
||||
disableKinds = ["taxonomyTerm"]
|
||||
|
||||
[params]
|
||||
Footer = "© 2019 王不对 - **[CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/)** - **[RSS](/index.xml)**"
|
||||
description = "王不对的个人网站"
|
||||
Footer = "© 2019 王不对 - **[CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/)** - **[RSS](/blog/index.xml)**"
|
||||
HomeDesc = "**[博客](/blog/) 和 [飞行手册](/flight-rules/)中还有很多文章✨**"
|
||||
AuthorName = "王不对"
|
||||
Favicon = "/favicon.jpg"
|
||||
|
||||
[params.CDN]
|
||||
#enable = false
|
||||
enable = true
|
||||
# Host must end with `/`
|
||||
Host = "https://lowentropy.jinxiapu.cn/img/"
|
||||
|
||||
[params.comments.isso]
|
||||
Host = "https://c.jinxiapu.cn/"
|
||||
|
||||
[[menu.main]]
|
||||
name = "博客"
|
||||
|
||||
File diff suppressed because one or more lines are too long
13
themes/hugo-w2ng/layouts/_default/_markup/render-image.html
Normal file
13
themes/hugo-w2ng/layouts/_default/_markup/render-image.html
Normal file
@ -0,0 +1,13 @@
|
||||
{{- $img_destination := .Destination }}
|
||||
{{ if .Page.Site.Params.CDN.enable }}
|
||||
{{ $img_destination = (print .Page.Site.Params.CDN.HOST .Page.File.Dir "/" .Destination) }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Title -}}
|
||||
<figure class="max-w-2xl mx-auto rounded overflow-hidden shadow-lg">
|
||||
<img alt="{{ $.Text }}" src="{{ $img_destination | safeURL }}" />
|
||||
<figcaption class="p-2 text-center">{{ with $.Title | safeHTML }}{{ . }}{{ end }}</figcaption>
|
||||
</figure>
|
||||
{{- else }}
|
||||
<img class="mx-auto" alt="{{ $.Text }}" src="{{ $img_destination | safeURL }}" />
|
||||
{{ end -}}
|
||||
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
{{- partial "head.html" . -}}
|
||||
|
||||
<body class="font-sans">
|
||||
|
||||
@ -21,5 +21,14 @@
|
||||
<div itemprop="articleBody" class="content markdown">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{- if (and .IsPage .Params.comment | default true ) -}}
|
||||
<hr class="block my-10 mx-auto max-w-xs h-px border-t border-black">
|
||||
<div id="isso-thread"></div>
|
||||
{{ with .Page.Site.Params.comments.isso.Host }}
|
||||
<script data-isso="{{ . }}" data-isso-css="true" data-isso-lang="zh_CN"
|
||||
data-isso-reply-to-self="false" data-isso-reply-notifications="true" data-isso-require-author="true"
|
||||
data-isso-require-email="true" data-isso-vote="true" src="{{ . }}js/embed.min.js"></script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
@ -33,8 +33,5 @@
|
||||
</p>
|
||||
<p>{{ .Page.Site.Params.HomeDesc | markdownify }}</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
{{ end }}
|
||||
@ -4,4 +4,13 @@
|
||||
{{ .Page.Site.Params.Footer | markdownify }}
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
</footer>
|
||||
|
||||
{{- if (and .IsPage .Params.math) -}}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js" integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous"
|
||||
onload="renderMathInElement(document.body);"></script>
|
||||
{{- end -}}
|
||||
|
||||
<script src="//instant.page/3.0.0" type="module" defer integrity="sha384-OeDn4XE77tdHo8pGtE1apMPmAipjoxUQ++eeJa6EtJCfHlvijigWiJpD7VDPWXV1"></script>
|
||||
@ -1,10 +1,33 @@
|
||||
{{ if .Site.IsServer }}
|
||||
<meta charset="utf-8">
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
|
||||
<meta name="referrer" content="no-referrer">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta name="force-rendering" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="Cache-Control" content="no-transform">
|
||||
<meta name="format-detection" content="telephone=no,email=no,address=no">
|
||||
{{ hugo.Generator }}
|
||||
|
||||
{{ if eq .RelPermalink "/" }}
|
||||
<title>{{ .Site.Title }}</title>
|
||||
{{ else }}
|
||||
<title>{{- .Title -}}{{- with .Params.subtitle -}} - {{- . -}} {{- end }} - {{ .Site.Title -}}</title>
|
||||
{{ end }}
|
||||
|
||||
{{- if .Site.IsServer -}}
|
||||
{{ $style := resources.Get "css/styles.css" | postCSS (dict "config" "./assets/css/dev/postcss.config.js") }}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}">
|
||||
{{ else }}
|
||||
{{ $style := resources.Get "css/styles.css" | postCSS (dict "config" "./assets/css/postcss.config.js") | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">
|
||||
{{ end }}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
<link rel="shortcut icon" href="{{ .Site.Params.Favicon }}">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/AflB-FG_Virgil-embed.css">
|
||||
{{ template "_internal/schema.html" . }}
|
||||
{{ template "_internal/opengraph.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . -}}
|
||||
{{ if not $.Site.IsServer }}
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
{{ end }}
|
||||
@ -1,7 +1,7 @@
|
||||
<header
|
||||
class="flex flex-col relative border-black border-b-4 md:border-none pb-6 mx-4 md:mx-0 md:w-1/5 md:text-right md:pr-8 bg-white md:text-center">
|
||||
<div class="">
|
||||
<h1 class="text-3xl md:my-12 mt-4 md:mb-12"><a href="{{ .Site.BaseURL }}" style="font-family: AflB-FG_Virgil;">wrong.wang</a></h1>
|
||||
<div>
|
||||
<h1 id="header_logo" class="text-3xl md:my-12 mt-4 md:mb-12"><a href="{{ .Site.BaseURL }}">wrong.wang</a></h1>
|
||||
<p class="font-thin italic">前进</p>
|
||||
</div>
|
||||
<input id="menu-check" type="checkbox" class="hidden" />
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,14 +0,0 @@
|
||||
@font-face {
|
||||
font-family: "AflB-FG_Virgil";
|
||||
src: url("AflB-FG_Virgil.eot"); /* IE9 */
|
||||
src: url("AflB-FG_Virgil.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
|
||||
|
||||
url("AflB-FG_Virgil.woff") format("woff"), /* chrome、firefox */
|
||||
url("AflB-FG_Virgil.ttf") format("truetype"), /* chrome、firefox、opera、Safari, Android, iOS 4.2+ */
|
||||
|
||||
url("AflB-FG_Virgil.svg#AflB-FG_Virgil") format("svg"); /* iOS 4.1- */
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 18 KiB |
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user