Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cef9fe2549 | ||
|
|
21b42f0b6c | ||
|
|
79412144d9 | ||
|
|
79d8c1db38 |
@@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
title: "{{ replace .Name "-" " " | title }}"
|
||||||
|
image:
|
||||||
|
style:
|
||||||
|
background: "#2a9d8f"
|
||||||
|
color: "#fff"
|
||||||
|
---
|
||||||
+11
-2
@@ -1,2 +1,11 @@
|
|||||||
+++
|
---
|
||||||
+++
|
title: "{{ replace .Name "-" " " | title }}"
|
||||||
|
description:
|
||||||
|
date: {{ .Date }}
|
||||||
|
image:
|
||||||
|
math:
|
||||||
|
license:
|
||||||
|
hidden: false
|
||||||
|
comments: true
|
||||||
|
draft: true
|
||||||
|
---
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
title: "{{ replace .Name "-" " " | title }}"
|
||||||
|
description:
|
||||||
|
image:
|
||||||
|
---
|
||||||
@@ -49,11 +49,17 @@ params:
|
|||||||
comments:
|
comments:
|
||||||
enabled: true
|
enabled: true
|
||||||
provider: disqus
|
provider: disqus
|
||||||
|
|
||||||
utterances:
|
utterances:
|
||||||
repo:
|
repo:
|
||||||
issueTerm: pathname
|
issueTerm: pathname
|
||||||
label:
|
label:
|
||||||
|
|
||||||
|
remark42:
|
||||||
|
host:
|
||||||
|
site:
|
||||||
|
locale:
|
||||||
|
|
||||||
widgets:
|
widgets:
|
||||||
enabled:
|
enabled:
|
||||||
- search
|
- search
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{{- $image := .Page.Resources.GetMatch (printf "%s" (.Destination | safeURL)) -}}
|
{{- $image := .Page.Resources.GetMatch (printf "%s" (.Destination | safeURL)) -}}
|
||||||
{{- if $image -}}
|
{{- if and $image (ne (path.Ext .Destination) ".svg") -}}
|
||||||
{{- $alt := .PlainText | safeHTML -}}
|
{{- $alt := .PlainText | safeHTML -}}
|
||||||
<figure style="flex-grow: {{ div (mul $image.Width 100) $image.Height }}; flex-basis: {{ div (mul $image.Width 240) $image.Height }}px">
|
<figure style="flex-grow: {{ div (mul $image.Width 100) $image.Height }}; flex-basis: {{ div (mul $image.Width 240) $image.Height }}px">
|
||||||
<a href="{{ $image.RelPermalink }}" data-size="{{ $image.Width }}x{{ $image.Height }}">
|
<a href="{{ $image.RelPermalink }}" data-size="{{ $image.Width }}x{{ $image.Height }}">
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
{{- with .Site.Params.comments.remark42 -}}
|
||||||
|
<div id="remark42"></div>
|
||||||
|
<script>
|
||||||
|
var remark_config = {
|
||||||
|
host: "{{ .host }}",
|
||||||
|
site_id: '{{ .site }}',
|
||||||
|
components: ['embed'],
|
||||||
|
url: "{{ $.Permalink }}",
|
||||||
|
max_shown_comments: {{ default 15 .max_shown_comments }},
|
||||||
|
theme: document.body.dataset.scheme,
|
||||||
|
page_title: '{{ $.Title }}',
|
||||||
|
locale: '{{ default "en" .locale }}',
|
||||||
|
show_email_subscription: {{ default true .show_email_subscription }}
|
||||||
|
};
|
||||||
|
|
||||||
|
(function (c) {
|
||||||
|
for (var i = 0; i < c.length; i++) {
|
||||||
|
var d = document, s = d.createElement('script');
|
||||||
|
s.src = remark_config.host + '/web/' + c[i] + '.js';
|
||||||
|
s.defer = true;
|
||||||
|
(d.head || d.body).appendChild(s);
|
||||||
|
}
|
||||||
|
})(remark_config.components || ['embed']);
|
||||||
|
|
||||||
|
window.addEventListener('onColorSchemeChange', (e) => {
|
||||||
|
window.REMARK42.changeTheme(e.detail);
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
{{- end -}}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{{- $ThemeVersion := "2.1.0" -}}
|
{{- $ThemeVersion := "2.2.0" -}}
|
||||||
<footer class="site-footer">
|
<footer class="site-footer">
|
||||||
<section class="copyright">
|
<section class="copyright">
|
||||||
©
|
©
|
||||||
|
|||||||
@@ -16,7 +16,11 @@
|
|||||||
{{ if $pageResourceImage }}
|
{{ if $pageResourceImage }}
|
||||||
<!-- If image is found under page bundle -->
|
<!-- If image is found under page bundle -->
|
||||||
{{ $result = merge $result (dict "permalink" $pageResourceImage.RelPermalink) }}
|
{{ $result = merge $result (dict "permalink" $pageResourceImage.RelPermalink) }}
|
||||||
{{ $result = merge $result (dict "resource" $pageResourceImage) }}
|
|
||||||
|
<!-- Disable SVG image processing, not supported by Hugo -->
|
||||||
|
{{ if ne (path.Ext $imageValue) ".svg" }}
|
||||||
|
{{ $result = merge $result (dict "resource" $pageResourceImage) }}
|
||||||
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<!-- Can not find the image under page bundle. Could be a relative linked image -->
|
<!-- Can not find the image under page bundle. Could be a relative linked image -->
|
||||||
{{ $result = merge $result (dict "permalink" $imageValue) }}
|
{{ $result = merge $result (dict "permalink" $imageValue) }}
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{{ $vid := .Get 0 }}
|
||||||
|
<div style="position: relative; width: 100%; height: 0; padding-bottom: 56.25%;">
|
||||||
|
<iframe src="http://v.qq.com/txp/iframe/player.html?vid={{ $vid }}&auto=0"
|
||||||
|
scrolling="no"
|
||||||
|
frameborder="no"
|
||||||
|
framespacing="0"
|
||||||
|
allowfullscreen="true"
|
||||||
|
style="position: absolute; width: 100%; height: 100%;">
|
||||||
|
</iframe>
|
||||||
|
</div>
|
||||||
Reference in New Issue
Block a user