merged with origin
This commit is contained in:
commit
9fcce788fa
137 changed files with 709 additions and 238 deletions
|
@ -9,16 +9,9 @@
|
|||
<!------ ADD PAGE SPECIFIC HEADERS ------->
|
||||
{{ block "header" . }} {{ end }}
|
||||
|
||||
<!-- ADD GOOGLE ANALYTICS IF ENABLED -->
|
||||
{{ if site.GoogleAnalytics }}
|
||||
<!-- Google Analytics v3 ID -->
|
||||
{{ if hasPrefix site.GoogleAnalytics "UA-"}}
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
{{ else }}
|
||||
<!-- Google Analytics v4 ID -->
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<!--================= add analytics if enabled =========================-->
|
||||
{{- partial "analytics.html" . -}}
|
||||
|
||||
</head>
|
||||
|
||||
<body data-spy="scroll" data-target="#TableOfContents" data-offset="80">
|
||||
|
@ -51,5 +44,9 @@
|
|||
|
||||
<!------- ADD PAGE SPECIFIC SCRIPTS ------>
|
||||
{{ block "scripts" . }} {{ end }}
|
||||
|
||||
<!------ IF WANTED, ADD SUPPORT LINKS -------->
|
||||
{{- partial "misc/support.html" . -}}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<div class="sidebar-holder">
|
||||
<div class="sidebar" id="sidebar">
|
||||
<form class="mx-auto" method="get" action="{{ "search" | relLangURL }}">
|
||||
<input type="text" name="keyword" value="" placeholder="Search" data-search="" id="search-box" />
|
||||
<input type="text" name="keyword" value="" placeholder="{{ i18n "search" }}" data-search="" id="search-box" />
|
||||
</form>
|
||||
<div class="sidebar-tree">
|
||||
<ul class="tree" id="tree">
|
||||
|
|
43
layouts/_default/rss.xml
Normal file
43
layouts/_default/rss.xml
Normal file
|
@ -0,0 +1,43 @@
|
|||
{{- $pctx := . -}}
|
||||
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
||||
{{- $pages := slice -}}
|
||||
{{- if $.IsHome -}}
|
||||
{{- $pages = sort $pctx.RegularPages "Date" "desc" -}}
|
||||
{{- else if $.IsSection -}}
|
||||
{{- $pages = sort $pctx.RegularPagesRecursive "Date" "desc" -}}
|
||||
{{- else -}}
|
||||
{{- $pages = sort $pctx.RegularPagesRecursive "Date" "desc" -}}
|
||||
{{- end -}}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||
{{- if ge $limit 1 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
{{- end -}}
|
||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
||||
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
|
||||
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
|
||||
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
|
||||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
{{- with .OutputFormats.Get "RSS" -}}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{- end -}}
|
||||
{{ range $pages }}
|
||||
{{- if ne .RelPermalink "/search/" -}}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Summary | html }}</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
|
@ -20,7 +20,7 @@
|
|||
<div class="sidebar-holder">
|
||||
<div class="sidebar" id="sidebar">
|
||||
<form class="mx-auto" method="get" action="{{ "search" | relLangURL }}">
|
||||
<input type="text" name="keyword" value="" placeholder="Search" data-search="" id="search-box" />
|
||||
<input type="text" name="keyword" value="" placeholder="{{ i18n "search" }}" data-search="" id="search-box" />
|
||||
</form>
|
||||
<div class="sidebar-tree">
|
||||
<ul class="tree" id="tree">
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<div class="sidebar-holder">
|
||||
<div class="sidebar" id="sidebar">
|
||||
<form class="mx-auto" method="get" action="{{ "search" | relLangURL }}">
|
||||
<input type="text" name="keyword" value="" placeholder="Search" data-search="" id="search-box" />
|
||||
<input type="text" name="keyword" value="" placeholder="{{ i18n "search" }}" data-search="" id="search-box" />
|
||||
</form>
|
||||
<div class="sidebar-tree">
|
||||
<ul class="tree" id="tree">
|
||||
|
@ -136,7 +136,7 @@
|
|||
{{ end }}
|
||||
<div class="col-md-6 btn-improve-page">
|
||||
{{ if ( eq site.Params.GitForge "gitlab" ) }}
|
||||
<a href="{{ site.Params.GitRepo }}/-/edit/{{ .Scratch.Get "GitBranch" }}/{{ .File.Path }}" title="{{ i18n "improve_this_page" }}" target="_blank" rel="noopener">
|
||||
<a href="{{ site.Params.GitRepo }}/-/edit/{{ .Scratch.Get "GitBranch" }}/content/{{ .File.Path }}" title="{{ i18n "improve_this_page" }}" target="_blank" rel="noopener">
|
||||
{{ else if ( eq site.Params.GitForge "gitea" ) }}
|
||||
<a href="{{ site.Params.GitRepo }}/_edit/{{ .Scratch.Get "GitBranch" }}/content/{{ .File.Path }}" title="{{ i18n "improve_this_page" }}" target="_blank" rel="noopener">
|
||||
{{ else }} <!--- Make Github-style the default -->
|
||||
|
@ -157,23 +157,13 @@
|
|||
<hr />
|
||||
|
||||
<!----- Add comment support ----->
|
||||
{{ with site.Params.features.comment }}
|
||||
{{ if .enable }}
|
||||
<!-- Add Disqus forum -->
|
||||
{{ if .disqus.shortName }}
|
||||
{{ partial "disqus.html" . }}
|
||||
<!-- Add valine -->
|
||||
{{ else if .valine }}
|
||||
{{ partial "valine.html" . }}
|
||||
<!-- Add utteranc -->
|
||||
{{ else if .utteranc }}
|
||||
{{ partial "utteranc.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if site.Params.features.comment.enable }}
|
||||
{{ partial "comments.html" site.Params.features.comment }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Keep backward compatibility with old config.yaml -->
|
||||
{{ if site.DisqusShortname }}
|
||||
{{ partial "disqus.html" . }}
|
||||
{{ partial "comments/disqus.html" (dict (slice "disqus" "shortName") site.DisqusShortname) }}
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
|
@ -189,7 +179,7 @@
|
|||
|
||||
{{ define "toc" }}
|
||||
<section class="toc-section" id="toc-section">
|
||||
{{ if site.Params.enableTOC }}
|
||||
{{ if and site.Params.enableTOC ( .Params.enableTOC | default true ) }}
|
||||
<div class="toc-holder">
|
||||
<h5 class="text-center pl-3">{{ i18n "toc_heading" }}</h5>
|
||||
<hr>
|
||||
|
@ -207,7 +197,15 @@
|
|||
<script>
|
||||
hljs.initHighlightingOnLoad();
|
||||
</script>
|
||||
|
||||
<!-------------- Enable Math support for this page ---------------->
|
||||
{{ if .Params.math }}
|
||||
{{ partial "math.html" . }}
|
||||
{{ end }}
|
||||
|
||||
<!-------------- Enable mermaid support for this page ---------------->
|
||||
{{ if .Params.mermaid }}
|
||||
{{ partial "mermaid.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue