diff --git a/layouts/writeups/rss.xml b/layouts/writeups/rss.xml new file mode 100644 index 0000000..94d028f --- /dev/null +++ b/layouts/writeups/rss.xml @@ -0,0 +1,26 @@ + + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + Latest posts from {{ .Site.Title }}{{ with .Site.LanguageCode }} + {{.}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{ with .OutputFormats.Get "RSS" -}} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{ end -}} + {{ range .Pages }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + {{ .Summary | html }} + {{ printf `` .Content | safeHTML }} + + {{ end }} + + diff --git a/layouts/writeups/single.html b/layouts/writeups/single.html new file mode 100644 index 0000000..d48d910 --- /dev/null +++ b/layouts/writeups/single.html @@ -0,0 +1,77 @@ +{{ define "head" }} + {{ if .Params.featuredImg -}} + + {{- else if .Params.images -}} + {{- range first 1 .Params.images -}} + + {{- end -}} + {{- end -}} +{{ end }} + +{{ define "header" }} +{{ partial "header.html" . }} +{{ end }} + +{{ define "main" }} + {{- if (or .Params.images .Params.featuredImg) }} +
+ {{- end }} +
+
+
+ +

{{ .Title }}

+
+
+ {{ .Content | replaceRE "()" `${1}${3}` | safeHTML }} +
+ {{- if .Site.Params.relatedPosts }} + {{- partial "related-posts.html" . -}} + {{- end }} +
+
+ {{- with $.Param "author" }} +

{{ . }}

+ {{- end }} + {{- with .Params.tags }} +

+ + {{- range . -}} + {{.}} + {{- end }} +

+ {{- end }} +

{{ i18n "wordCount" . }}

+

{{ dateFormat .Site.Params.dateformNumTime .Date.Local }}

+ {{- if and .GitInfo .Site.Params.gitUrl }} +

{{ .GitInfo.AbbreviatedHash }} @ {{ dateFormat .Site.Params.dateformNum .GitInfo.AuthorDate.Local }}

+ {{- end }} +
+
+ {{- if .Params.toc }} + + {{- end }} +
+ {{- with .NextInSection }} + + {{- end }} + {{- with .PrevInSection }} + + {{- end }} +
+
+ {{- partial "comments.html" . -}} +
+
+{{ end }} + +{{ define "footer" }} +{{ partialCached "footer.html" . }} +{{ end }}