initial commit
This commit is contained in:
commit
8ae4ae106c
17 changed files with 623 additions and 0 deletions
25
layouts/_default/baseof.html
Normal file
25
layouts/_default/baseof.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{{ block "head" . }}
|
||||
{{ partial "head.html" . }}
|
||||
{{ end }}
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<header>
|
||||
{{ block "header" . }}
|
||||
{{ partial "header.html" . }}
|
||||
{{ end }}
|
||||
</header>
|
||||
<main>
|
||||
{{ block "main" . }}{{ end }}
|
||||
</main>
|
||||
<footer>
|
||||
{{ block "footer" . }}
|
||||
{{ partial "footer.html" . }}
|
||||
{{ end }}
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
29
layouts/_default/list.html
Normal file
29
layouts/_default/list.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
{{ define "main" }}
|
||||
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ range (.Site.RegularPages.GroupByPublishDate "2006") }}
|
||||
{{ range .Pages }}
|
||||
<div class="post-short-list">
|
||||
<header>
|
||||
<h2>
|
||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
||||
</h2>
|
||||
</header>
|
||||
|
||||
<div class="article-info">
|
||||
{{ if .Params.date }}
|
||||
<div class="article-date">{{ .Params.date.Format "2006-01-02" }}</div>
|
||||
{{ end }}
|
||||
{{ if .Params.tags }}
|
||||
<ul class="article-tags">
|
||||
{{ range .Params.tags }}
|
||||
<li><a href="/tags/{{ . }}">{{ . }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
34
layouts/_default/rss.xml
Normal file
34
layouts/_default/rss.xml
Normal file
|
@ -0,0 +1,34 @@
|
|||
{{- $pctx := . -}}
|
||||
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
||||
{{- $pages := $pctx.RegularPages -}}
|
||||
{{- $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>{{ .Site.Title }}{{ if ne .Title .Site.Title }}{{ with .Title }} ({{.}}){{ end }}{{ end }}</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 }}
|
||||
<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>{{ .Content | html }}</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
24
layouts/_default/single.html
Normal file
24
layouts/_default/single.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
{{ define "main" }}
|
||||
|
||||
<article class="post">
|
||||
<header>
|
||||
<h1>{{ .Title }}</h1>
|
||||
</header>
|
||||
|
||||
<div class="article-info">
|
||||
{{ if .Params.date }}
|
||||
<div class="article-date">{{ .Params.date.Format "2006-01-02" }}</div>
|
||||
{{ end }}
|
||||
{{ if .Params.tags }}
|
||||
<ul class="article-tags">
|
||||
{{ range .Params.tags }}
|
||||
<li><a href="/tags/{{ . }}">{{ . }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
{{ .Content }}
|
||||
</article>
|
||||
|
||||
{{ end }}
|
16
layouts/_default/terms.html
Normal file
16
layouts/_default/terms.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{{ define "main" }}
|
||||
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
<ul class="terms">
|
||||
{{ range $key, $value := .Data.Terms }}
|
||||
<li>
|
||||
<a href="{{ (print "/" $.Data.Plural "/" (lower $key)) | relURL }}">
|
||||
{{ $key }}
|
||||
</a>
|
||||
({{ len $value }})
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue