change to hugo-blog-awesome theme
This commit is contained in:
parent
113e3650f1
commit
15b6142a8e
131 changed files with 5895 additions and 124 deletions
11
themes/hugo-blog-awesome/layouts/_default/baseof.html
Normal file
11
themes/hugo-blog-awesome/layouts/_default/baseof.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
{{- partial "head.html" . -}}
|
||||
<body data-theme = "{{ .Site.Params.defaultColor }}" class="notransition">
|
||||
{{- partial "scriptsBodyStart.html" . -}}
|
||||
{{- partial "header.html" . -}}
|
||||
{{- block "main" . }}{{- end }}
|
||||
{{- partial "footer.html" . -}}
|
||||
{{- partial "scriptsBodyEnd.html" . -}}
|
||||
</body>
|
||||
</html>
|
23
themes/hugo-blog-awesome/layouts/_default/list.html
Normal file
23
themes/hugo-blog-awesome/layouts/_default/list.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{{- define "main" -}}
|
||||
<div class="wrapper list-page">
|
||||
<header class="header">
|
||||
<h1 class="header-title center">{{ .Title }}</h1>
|
||||
</header>
|
||||
<main class="page-content" aria-label="Content">
|
||||
{{ range .Pages.GroupByDate "2006" }}
|
||||
{{ $year := .Key }}
|
||||
<h2 class="post-year">{{ $year }}</h2>
|
||||
|
||||
{{/* create a list of posts for each month, with month as heading */}}
|
||||
|
||||
{{ range .Pages }}
|
||||
|
||||
{{ partial "postCard" . }}
|
||||
|
||||
{{ end }} {{/* end range .Pages */}}
|
||||
|
||||
{{ end }} {{/* end range .Pages.GroupByDate "2006" */}}
|
||||
|
||||
</main>
|
||||
</div>
|
||||
{{- end -}}
|
46
themes/hugo-blog-awesome/layouts/_default/rss.xml
Normal file
46
themes/hugo-blog-awesome/layouts/_default/rss.xml
Normal file
|
@ -0,0 +1,46 @@
|
|||
<!-- Taken from Hugo default RSS template: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml -->
|
||||
{{- $pctx := . -}}
|
||||
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
||||
{{- $pages := slice -}}
|
||||
{{- if or $.IsHome $.IsSection -}}
|
||||
{{- $pages = $pctx.RegularPages -}}
|
||||
{{- else -}}
|
||||
{{- $pages = $pctx.Pages -}}
|
||||
{{- end -}}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||
{{- if ge $limit 1 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
{{- end -}}
|
||||
{{- $rssFeedDescription := .Site.Params.rssFeedDescription | default "summary" -}}
|
||||
{{- 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>
|
||||
<language>{{ site.Language.LanguageCode }}</language>{{ 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 }}
|
||||
<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>
|
||||
{{ if eq $rssFeedDescription "summary"}}
|
||||
<description>{{ .Summary | html }}</description>
|
||||
{{ else if (eq $rssFeedDescription "full")}}
|
||||
<description>{{ .Content | html }}</description>
|
||||
{{ else }} {{ errorf "Error in RSS feed generation %q" .Path }}
|
||||
{{ end }}
|
||||
</item>
|
||||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
23
themes/hugo-blog-awesome/layouts/_default/single.html
Normal file
23
themes/hugo-blog-awesome/layouts/_default/single.html
Normal file
|
@ -0,0 +1,23 @@
|
|||
{{ define "main" }}
|
||||
<div class="wrapper post">
|
||||
<main class="page-content" aria-label="Content">
|
||||
<article>
|
||||
<header class="header">
|
||||
<h1 class="header-title">{{ .Title }}</h1>
|
||||
{{ $configDateFormat := .Site.Params.dateFormat | default ":date_medium" }}
|
||||
{{ with .Date }}
|
||||
{{ $ISO_time := dateFormat "2006-01-02T15:04:05-07:00" . }}
|
||||
<div class="post-meta">
|
||||
<time datetime="{{ $ISO_time }}" itemprop="datePublished"> {{ . | time.Format $configDateFormat }} </time>
|
||||
</div>
|
||||
{{ end }}
|
||||
</header>
|
||||
{{ partial "toc.html" .}}
|
||||
<div class="page-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
{{- partial "comments.html" . -}}
|
||||
</main>
|
||||
</div>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue