forked from CCCHH/hacker.tours-website
Initial version
This commit is contained in:
commit
ed5653a7fc
61 changed files with 11043 additions and 0 deletions
0
themes/zen/layouts/404.html
Normal file
0
themes/zen/layouts/404.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{{ .Page.Store.Set "math" true -}}
|
||||
<p{{ with .Attributes.class }} class="{{ . }}"{{ end }}>
|
||||
$$
|
||||
{{ .Inner }}
|
||||
$$
|
||||
</p>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="icon-inline"{{ range $k, $v := .Attributes }}{{ printf " %s=%q" $k $v | safeHTMLAttr }}{{ end }}>
|
||||
{{- .Text | safeHTML -}}
|
||||
<a class="icon-link" href="#{{ .Anchor | safeURL }}" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" />
|
||||
<path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" />
|
||||
</svg></a></h{{ .Level }}>
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
{{/* Control how the image is rendered with these variables. */}}
|
||||
{{ $class := "" -}}
|
||||
{{ $size := "" -}}
|
||||
{{ $srcset := "" -}}
|
||||
{{ $width := "" -}}
|
||||
|
||||
{{/* Only change the below code if you know what you are doing. */}}
|
||||
{{ $height := "" -}}
|
||||
{{ $maxwidth := site.Params.imageMaxWidth -}}
|
||||
{{ $realwidth := 0 -}}
|
||||
{{ $realheight := 0 -}}
|
||||
{{ $resource := false -}}
|
||||
{{ $src := .Destination -}}
|
||||
{{ $srcsetw := (slice) -}}
|
||||
{{ $static := false -}}
|
||||
|
||||
{{ if and $src (fileExists (path.Join "/static" $src)) -}}
|
||||
{{ with (imageConfig (path.Join "/static" $src)) -}}
|
||||
{{ $realwidth = .Width -}}
|
||||
{{ $realheight = .Height -}}
|
||||
{{ end -}}
|
||||
{{ $static = true -}}
|
||||
{{ $src = relURL $src -}}
|
||||
{{ else if $src -}}
|
||||
{{ $src = strings.TrimLeft "/" $src -}}
|
||||
{{ with resources.Get $src -}}
|
||||
{{ $resource = . -}}
|
||||
{{ end -}}
|
||||
{{ with .Page.Resources.Get $src -}}
|
||||
{{ $resource = . -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ if $resource -}}
|
||||
{{ if $size -}}
|
||||
{{ $image := $resource.Resize $size -}}
|
||||
{{ $src = $image.RelPermalink -}}
|
||||
{{ $width = $image.Width -}}
|
||||
{{ $height = $image.Height -}}
|
||||
{{ if $srcset -}}
|
||||
{{ $srcsetw = $srcsetw | append (printf "%s %sw" $src (strings.TrimRight "x" $size)) -}}
|
||||
{{ end -}}
|
||||
{{ else -}}
|
||||
{{ $src = $resource.RelPermalink -}}
|
||||
{{ $realwidth = $resource.Width -}}
|
||||
{{ $realheight = $resource.Height -}}
|
||||
{{ end -}}
|
||||
{{ if $srcset -}}
|
||||
{{ range $set := split $srcset " " -}}
|
||||
{{ $image := $resource.Resize (printf "%sx" $set) -}}
|
||||
{{ $srcsetw = $srcsetw | append (printf "%s %sw" $image.RelPermalink $set) -}}
|
||||
{{ end -}}
|
||||
{{ $width = "" -}}
|
||||
{{ $height = "" -}}
|
||||
{{ end -}}
|
||||
{{ end -}}
|
||||
|
||||
{{ if and $width $height -}}
|
||||
{{ $width = int $width -}}
|
||||
{{ $height = int $height -}}
|
||||
{{ else if $width -}}
|
||||
{{ $width = int $width -}}
|
||||
{{ $height = $realheight -}}
|
||||
{{ if and ($realwidth) (lt ($width) ($realwidth)) -}}
|
||||
{{ $height = (mul ($realheight) (div (add ($width) 0.0) ($realwidth))) -}}
|
||||
{{ $height = (math.Round $height) -}}
|
||||
{{ end -}}
|
||||
{{ else if $height -}}
|
||||
{{ $width = $realwidth -}}
|
||||
{{ $height = int $height -}}
|
||||
{{ if and ($realheight) (lt ($height) ($realheight)) -}}
|
||||
{{ $width = (mul ($realwidth) (div (add ($height) 0.0) ($realheight))) -}}
|
||||
{{ $width = (math.Round $width) -}}
|
||||
{{ end -}}
|
||||
{{ else if and ($maxwidth) (lt ($maxwidth) ($realwidth)) -}}
|
||||
{{ $width = ($maxwidth) -}}
|
||||
{{ $height = (mul ($realheight) (div (add ($width) 0.0) ($realwidth))) -}}
|
||||
{{ $height = (math.Round $height) -}}
|
||||
{{ end -}}
|
||||
|
||||
<img class="image{{ with $class }} {{ . }}{{ end }}" src="{{ $src }}" alt="{{ .Text }}"{{ with $srcsetw }} srcset="{{ delimit . ", " }}"{{ end }}{{ with $width }} width="{{ . }}"{{ end }}{{ with $height }} height="{{ . }}"{{ end }}{{ with .Title}} title="{{ . }}"{{ end }}>
|
||||
|
|
@ -0,0 +1 @@
|
|||
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener noreferrer"{{ end }}>{{ .Text | safeHTML }}</a>
|
||||
57
themes/zen/layouts/_default/baseof.html
Normal file
57
themes/zen/layouts/_default/baseof.html
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
<!DOCTYPE html>
|
||||
<html class="nojs" lang="{{ site.LanguageCode | default site.Language.Lang }}" dir="{{ site.Language.LanguageDirection | default "ltr" }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>{{ block "title" . }}{{ .Title }} – {{ site.Title }}{{ end }}</title>
|
||||
{{ partial "meta.html" . }}
|
||||
{{ partialCached "styles.html" . }}
|
||||
{{ partial "meta_json_ld.html" . }}
|
||||
{{ partial "scripts.html" . }}
|
||||
{{ partial "math.html" . }}
|
||||
{{ partialCached "tracking.html" . }}
|
||||
{{ if templates.Exists "partials/head.html" -}}
|
||||
{{ partial "head.html" . }}
|
||||
{{ end -}}
|
||||
{{ block "head" . }}{{ end }}
|
||||
</head>
|
||||
|
||||
<body class="{{ if .IsPage }}single-page{{ else }}list-page{{ end }}{{ if .IsHome }} front{{ end }}{{ with $.Param "bodyclass" }} {{ . }}{{ end }}">
|
||||
<div class="page layout__page{{ if $.Param "sidebar" }} layout__sidebar-second{{ end }}">
|
||||
<header class="header layout__header">
|
||||
{{ if $.Param "logo" | default true -}}
|
||||
<a href="{{ site.Home.RelPermalink }}" title="Home" rel="home" class="header__logo">
|
||||
<img src="{{ with $.Param "logopath" }}{{ . | relURL }}{{ else }}{{ "images/logo.png" | relURL }}{{ end }}"{{ with $.Param "logowidth" }} width="{{ . }}"{{ end }}{{ with $.Param "logoheight" }} height="{{ . }}"{{ end }} alt="Home" class="header__logo-image">
|
||||
</a>
|
||||
{{ end -}}
|
||||
<h1 class="header__site-name{{ if not ($.Param "sitename" | default true) }} visually-hidden{{ end }}">
|
||||
<a href="{{ site.Home.RelPermalink }}" title="Home" class="header__site-link" rel="home"><span>{{ site.Title }}</span></a>
|
||||
</h1>
|
||||
<div class="region header__region">
|
||||
{{ if site.IsMultiLingual }}{{ partial "language-selector.html" . }}{{ end -}}
|
||||
{{ if $.Param "menuinheader" }}{{ partial "menu.html" . }}{{ end -}}
|
||||
</div>
|
||||
{{ if $.Param "mobilemenu" }}{{ partial "mobilemenu.html" . }}{{ end -}}
|
||||
</header>
|
||||
|
||||
{{ if not ($.Param "menuinheader") }}{{ partial "menu.html" . }}{{ end -}}
|
||||
|
||||
{{ block "main" . }}{{ end }}
|
||||
|
||||
{{ if $.Param "sidebar" }}{{ partial "sidebar.html" . }}{{ end -}}
|
||||
|
||||
<footer class="footer layout__footer mt--l">
|
||||
{{ if templates.Exists "partials/footer.html" -}}
|
||||
{{ partial "footer.html" . }}
|
||||
{{ else -}}
|
||||
{{ if $.Param "feedlinks" }}{{ partial "feedlinks.html" . }}{{ end -}}
|
||||
<p>{{ with $.Param "copyright" }}{{ . | markdownify }}{{ else }}<span>© {{ site.Title }}</span>{{ end }}</p>
|
||||
{{ with $.Param "footer" }}<p>{{ . | markdownify }}</p>{{ end }}
|
||||
{{ if $.Param "poweredby" }}<p>Powered by <a href="https://gohugo.io/">Hugo</a> and the <a href="https://github.com/frjo/hugo-theme-zen">Zen theme</a>.</p>{{ end }}
|
||||
{{ end -}}
|
||||
</footer>
|
||||
|
||||
{{ if $.Param "cookieconsent" }}{{ partialCached "cookieconsent.html" . }}{{ end -}}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
6
themes/zen/layouts/_default/card.html
Normal file
6
themes/zen/layouts/_default/card.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<article class="card{{ with .Section }} card--{{ . | urlize }}{{ end }}">
|
||||
<header>
|
||||
<h2 class="title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
|
||||
</header>
|
||||
<p>{{ .Summary }}</p>
|
||||
</article>
|
||||
8
themes/zen/layouts/_default/full.html
Normal file
8
themes/zen/layouts/_default/full.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<article class="full-view{{ with .Section }} full-view--{{ . | urlize }}{{ end }}">
|
||||
<header>
|
||||
<h1 class="title{{ if $.Param "submitted" | default false }} mb--xxs{{ end }}"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h1>
|
||||
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}}
|
||||
</header>
|
||||
|
||||
{{ .Content }}
|
||||
</article>
|
||||
1
themes/zen/layouts/_default/li.html
Normal file
1
themes/zen/layouts/_default/li.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a> – <time class="created-date" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format ($.Param "dateformat" | default "2 January, 2006") }}</time></li>
|
||||
16
themes/zen/layouts/_default/list.html
Normal file
16
themes/zen/layouts/_default/list.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{{ define "main" -}}
|
||||
<main class="main layout__main">
|
||||
<header>
|
||||
<h1 class="title">{{ .Title }}</h1>
|
||||
</header>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
{{ $paginator := .Paginate (.Pages) -}}
|
||||
{{ range $paginator.Pages -}}
|
||||
{{ .Render "summary" }}
|
||||
{{ end -}}
|
||||
|
||||
{{ partial "pagination.html" . }}
|
||||
</main>
|
||||
{{ end -}}
|
||||
54
themes/zen/layouts/_default/list.json.json
Normal file
54
themes/zen/layouts/_default/list.json.json
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{{- $pctx := . -}}
|
||||
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
|
||||
{{- $pages := $pctx.RegularPages -}}
|
||||
{{- $limit := site.Config.Services.RSS.Limit -}}
|
||||
{{- if ge $limit 1 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
{{- end -}}
|
||||
{{ $length := (len $pages) -}}
|
||||
{
|
||||
"version": "https://jsonfeed.org/version/1.1",
|
||||
"title": "{{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} {{ i18n "string_on" }} {{ end }}{{ site.Title }}{{ end }}",
|
||||
"description": "{{ i18n "string_recent_content" }} {{ if ne .Title site.Title }}{{ with .Title }}{{ i18n "string_in" }} {{ . }} {{ end }}{{ end }}{{ i18n "string_on" }} {{ site.Title }}",
|
||||
"home_page_url": "{{ site.BaseURL }}",
|
||||
{{ with .OutputFormats.Get "JSON" -}}
|
||||
"feed_url": "{{ .Permalink }}",
|
||||
{{ end -}}
|
||||
{{ with site.LanguageCode -}}
|
||||
"language": "{{ . }}",
|
||||
{{ end -}}
|
||||
{{ with $.Param "icon" -}}
|
||||
"icon": "{{ . | absURL }}",
|
||||
{{ end -}}
|
||||
{{ with $.Param "favicon" -}}
|
||||
"favicon": "{{ . | absURL }}",
|
||||
{{ end -}}
|
||||
{{ with site.Params.author.name -}}
|
||||
"authors": [
|
||||
{
|
||||
"name": "{{ . }}"{{ with site.Params.author.url }},
|
||||
"url": "{{ . }}"{{ end }}{{ with site.Params.author.avatar }},
|
||||
"avatar": "{{ . | absURL }}"{{ end }}
|
||||
}
|
||||
],
|
||||
{{ end -}}
|
||||
"items": [
|
||||
{{ range $index, $element := $pages -}}
|
||||
{
|
||||
"title": {{ .Title | jsonify }},
|
||||
"date_published": "{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}",
|
||||
"date_modified": "{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}",
|
||||
"id": "{{ .Permalink }}",
|
||||
"url": "{{ .Permalink }}",
|
||||
{{ with .Params.author -}}
|
||||
"authors": [
|
||||
{
|
||||
"name": "{{ . }}"
|
||||
}
|
||||
],
|
||||
{{ end -}}
|
||||
"content_html": {{ .Content | jsonify }}
|
||||
}{{ if ne (add $index 1) $length }},{{ end }}
|
||||
{{ end -}}
|
||||
]
|
||||
}
|
||||
46
themes/zen/layouts/_default/rss.xml
Normal file
46
themes/zen/layouts/_default/rss.xml
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{{- $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 }}{{ . }} {{ i18n "string_on" }} {{ end }}{{ site.Title }}{{ end }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>{{ i18n "string_recent_content" }} {{ if ne .Title site.Title }}{{ with .Title }}{{ i18n "string_in" }} {{ . }} {{ end }}{{ end }}{{ i18n "string_on" }} {{ site.Title }}</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
{{ with site.LanguageCode -}}
|
||||
<language>{{ . }}</language>
|
||||
{{ end -}}
|
||||
{{ with site.Params.author.email -}}
|
||||
<managingEditor>{{ . }}{{ with site.Params.author.name }} ({{ . }}){{ end }}</managingEditor>
|
||||
{{ end -}}
|
||||
{{ with site.Params.author.email -}}
|
||||
<webMaster>{{ . }}{{ with site.Params.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.Params.author.email -}}
|
||||
<author>{{ . }}{{ with site.Params.author.name }} ({{ . }}){{ end }}</author>
|
||||
{{ end -}}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Content | html }}</description>
|
||||
</item>
|
||||
{{ end -}}
|
||||
</channel>
|
||||
</rss>
|
||||
17
themes/zen/layouts/_default/single.html
Normal file
17
themes/zen/layouts/_default/single.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{{ define "main" -}}
|
||||
<main class="main layout__main">
|
||||
<article class="single-view{{ with .Section }} single-view--{{ . | urlize }}{{ end }}">
|
||||
<header>
|
||||
<h1 class="title{{ if $.Param "submitted" | default false }} mb--xxs{{ end }}">{{ .Title }}</h1>
|
||||
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . }}{{ end -}}
|
||||
{{ if .Params.tags }}{{ partial "tags.html" . }}{{ end -}}
|
||||
</header>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
{{ if $.Param "relatedposts" | default false }}{{ partial "related.html" . }}{{ end -}}
|
||||
|
||||
{{ if ne .Lastmod .Date }}{{ partial "dates.html" . }}{{ end -}}
|
||||
</article>
|
||||
</main>
|
||||
{{ end -}}
|
||||
7
themes/zen/layouts/_default/summary.html
Normal file
7
themes/zen/layouts/_default/summary.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<article class="list-view{{ with .Section }} list-view--{{ . | urlize }}{{ end }}">
|
||||
<header>
|
||||
<h2 class="title mt--s{{ if $.Param "submitted" | default false }} mb--xxs{{ end }}"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
|
||||
{{ if $.Param "submitted" | default false }}{{ partial "submitted.html" . -}}{{ end }}
|
||||
</header>
|
||||
<p>{{ .Summary }}</p>
|
||||
</article>
|
||||
5
themes/zen/layouts/home.searchindex.json
Normal file
5
themes/zen/layouts/home.searchindex.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{{- $.Scratch.Add "searchindex" slice -}}
|
||||
{{- range $index, $element := where site.RegularPages "Params.exclude_search" nil -}}
|
||||
{{- $.Scratch.Add "searchindex" (dict "id" $index "title" $element.Title "permalink" $element.RelPermalink "tags" (delimit ($element.Params.tags | default "") " ") "content" $element.Plain "summary" $element.Summary "date" ($element.Date.Format ($.Param "dateformat" | default "2 January, 2006"))) -}}
|
||||
{{- end -}}
|
||||
{{- $.Scratch.Get "searchindex" | jsonify -}}
|
||||
15
themes/zen/layouts/index.html
Normal file
15
themes/zen/layouts/index.html
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{{ define "title" }}{{ site.Title }}{{ end }}
|
||||
|
||||
{{ define "main" -}}
|
||||
<main class="main layout__main">
|
||||
{{ .Content }}
|
||||
|
||||
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections -}}
|
||||
{{ $paginator := .Paginate $pages -}}
|
||||
{{ range $paginator.Pages -}}
|
||||
{{ .Render "summary" }}
|
||||
{{ end -}}
|
||||
|
||||
{{ partial "pagination.html" . }}
|
||||
</main>
|
||||
{{ end -}}
|
||||
15
themes/zen/layouts/micro/list.html
Normal file
15
themes/zen/layouts/micro/list.html
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{{ define "main" -}}
|
||||
<main class="main layout__main">
|
||||
<h1 class="title">Micro posts</h1>
|
||||
<p class="micro__follow"><a href="https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ end }}">{{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }}</a></p>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
{{ $paginator := .Paginate (.Pages) -}}
|
||||
{{ range $paginator.Pages -}}
|
||||
{{ .Render "summary" }}
|
||||
{{ end -}}
|
||||
|
||||
{{ partial "pagination.html" . }}
|
||||
</main>
|
||||
{{ end -}}
|
||||
35
themes/zen/layouts/micro/list.json.json
Normal file
35
themes/zen/layouts/micro/list.json.json
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{{ $list := .Pages -}}
|
||||
{{ $length := (len $list) -}}
|
||||
{
|
||||
"version" : "https://jsonfeed.org/version/1",
|
||||
"title" : "Micro posts {{ i18n "string_on" }} {{ site.Title }}",
|
||||
"description": "Micro blog {{ i18n "string_by" }} {{ with site.Author.name }}{{ . }}{{ end }}, {{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }} {{ i18n "string_at" }} https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ end }}",
|
||||
"home_page_url" : "{{ site.BaseURL }}",
|
||||
{{ with .OutputFormats.Get "JSON" -}}
|
||||
"feed_url" : "{{ .Permalink }}",
|
||||
{{ end -}}
|
||||
{{ with $.Param "icon" -}}
|
||||
"icon" : "{{ . | absURL }}",
|
||||
{{ end -}}
|
||||
{{ with $.Param "favicon" -}}
|
||||
"favicon" : "{{ . | absURL }}",
|
||||
{{ end -}}
|
||||
{{ with site.Author.name -}}
|
||||
"author" : {
|
||||
"name" : "{{ . }}"{{ with site.Author.url }},
|
||||
"url": "{{ . }}"{{ end }}{{ with site.Author.avatar }},
|
||||
"avatar": "{{ . | absURL }}"{{ end }}
|
||||
},
|
||||
{{ end -}}
|
||||
"items" : [
|
||||
{{ range $index, $element := $list -}}
|
||||
{
|
||||
"date_published" : "{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}",
|
||||
"date_modified" : "{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}",
|
||||
"id" : "{{ .Permalink }}",
|
||||
"url" : "{{ .Permalink }}",
|
||||
"content_html" : {{ .Content | jsonify }}
|
||||
}{{ if ne (add $index 1) $length }},{{ end }}
|
||||
{{ end -}}
|
||||
]
|
||||
}
|
||||
34
themes/zen/layouts/micro/rss.xml
Normal file
34
themes/zen/layouts/micro/rss.xml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Micro posts {{ i18n "string_on" }} {{ site.Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>Micro blog {{ i18n "string_by" }} {{ with site.Author.name }}{{ . }}{{ end }}, {{ i18n "string_follow" }} @{{ with $.Param "microusername" }}{{ . }}{{ end }} {{ i18n "string_at" }} https://micro.blog/{{ with $.Param "microusername" }}{{ . }}{{ 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>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Content | html }}</description>
|
||||
</item>
|
||||
{{ end -}}
|
||||
</channel>
|
||||
</rss>
|
||||
12
themes/zen/layouts/micro/single.html
Normal file
12
themes/zen/layouts/micro/single.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{{ define "main" -}}
|
||||
<main class="main layout__main">
|
||||
<article class="single-view{{ with .Section }} single-view--{{ . | urlize }}{{ end }}">
|
||||
<header>
|
||||
<h1 class="hidden">{{ .Title }}</h1>
|
||||
<p>{{ partial "author-date" . }}</p>
|
||||
</header>
|
||||
|
||||
{{ .Content }}
|
||||
</article>
|
||||
</main>
|
||||
{{ end -}}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue