summaryrefslogtreecommitdiff
path: root/layouts/_default
diff options
context:
space:
mode:
author2026-02-10 17:11:24 +0300
committer2026-02-10 20:08:10 +0300
commit2ecb959c5b9c2b0750212af0349fd6d4a5c25258 (patch)
tree16b3268b7dd825a13d4d8c0eb00007cc7f9a8ac1 /layouts/_default
downloadbase-2ecb959c5b9c2b0750212af0349fd6d4a5c25258.tar.gz
base-2ecb959c5b9c2b0750212af0349fd6d4a5c25258.tar.bz2
base-2ecb959c5b9c2b0750212af0349fd6d4a5c25258.tar.xz
base-2ecb959c5b9c2b0750212af0349fd6d4a5c25258.zip
Первый коммитHEADmaster
Diffstat (limited to '')
-rw-r--r--layouts/_default/section.atom.xml23
-rw-r--r--layouts/_default/section.feed.json31
-rw-r--r--layouts/_default/taxonomy.html20
-rw-r--r--layouts/_default/terms.html17
4 files changed, 91 insertions, 0 deletions
diff --git a/layouts/_default/section.atom.xml b/layouts/_default/section.atom.xml
new file mode 100644
index 0000000..9ddb7d2
--- /dev/null
+++ b/layouts/_default/section.atom.xml
@@ -0,0 +1,23 @@
+{{ print "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>"| safeHTML }}
+{{ print "<?xml-stylesheet type=\"text/css\" href=\"/css/atom.css\" ?>"| safeHTML }}
+<feed xmlns="http://www.w3.org/2005/Atom">
+ <title>{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}</title>
+ <link rel="self" href="{{ .Permalink }}"/>
+ <updated>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
+ <author>
+ <name>Alexander NeonXP Kiryukhin</name>
+ <email>i@neonxp.ru</email>
+ <uri>https://neonxp.ru/</uri>
+ </author>
+ <id>{{ .Permalink }}</id>
+ {{ range first 15 .Data.Pages }}
+ <entry>
+ <title>{{ .Title }}</title>
+ <link rel="alternate" href="{{ .Permalink }}"/>
+ <id>{{ .Permalink }}</id>
+ <published>{{ .Date.Format "2006-01-02T15:04:05-0700" | safeHTML }}</published>
+ <updated>{{ .Lastmod.Format "2006-01-02T15:04:05-0700" | safeHTML }}</updated>
+ <summary>{{ .Content | html }}</summary>
+ </entry>
+ {{ end }}
+</feed>
diff --git a/layouts/_default/section.feed.json b/layouts/_default/section.feed.json
new file mode 100644
index 0000000..d7d70d0
--- /dev/null
+++ b/layouts/_default/section.feed.json
@@ -0,0 +1,31 @@
+{
+ "version": "https://jsonfeed.org/version/1",
+ "title": {{ .Site.Title | jsonify }},
+ "home_page_url": {{ .Permalink | jsonify }},
+ {{ with .OutputFormats.Get "json" -}}
+ "feed_url": {{ .Permalink | jsonify }},
+ {{- end }}
+ {{- if .Site.Params.author -}}
+ "author": {
+ "name": {{ .Site.Params.author | jsonify }}
+ },
+ {{ end -}}
+ {{- if .Data.Pages -}}
+ "items": [
+ {{ range $index, $element := first 10 .Data.Pages -}}
+ {{ if $index }},{{end}} {
+ "title": {{ $element.Title | jsonify }},
+ "id": {{ $element.Permalink | jsonify }},
+ "url": {{ $element.Permalink | jsonify }},
+ "summary": {{ $element.Summary | jsonify }},
+ {{- if eq $element.Type "link" -}}
+ "external_url": {{ $element.Params.link | jsonify }},
+ {{- end -}}
+ "content_html": {{ $element.Content | jsonify }},
+ "content_text": {{ $element.Plain | jsonify }},
+ "date_published": {{ $element.Date.Format "2006-02-01T15:04:05-0700" | jsonify }}
+ }
+ {{- end }}
+ ]
+ {{ end -}}
+} \ No newline at end of file
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html
new file mode 100644
index 0000000..ac5fc7d
--- /dev/null
+++ b/layouts/_default/taxonomy.html
@@ -0,0 +1,20 @@
+{{ define "main" }}
+<article>
+ <h1>{{ .Title }}</h1>
+ {{ .Content }}
+</article>
+{{ range .Data.Pages }}
+<article class="h-entry">
+ <h2 class="p-name"><a class="u-url" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
+ {{if .Date }}
+ {{ $dateMachine := .Date | time.Format "2006-01-02 15:04:05-07:00" }}
+ {{ $dateHuman := .Date | time.Format ":date_long" }}
+ <time class="dt-published" datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
+ {{end}}
+ <div class="p-summary">
+ {{ .Summary }}
+ </div>
+ <a class="btn-primary" href="{{ .RelPermalink }}">Читать дальше...</a>
+</article>
+{{ end }}
+{{ end }} \ No newline at end of file
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
new file mode 100644
index 0000000..49d993f
--- /dev/null
+++ b/layouts/_default/terms.html
@@ -0,0 +1,17 @@
+{{ define "main" }}
+<article>
+ <h1>{{ i18n .Title }}</h1>
+ {{ .Content }}
+</article>
+<article>
+ <ul class="terms">
+ {{ range $key, $value := .Data.Terms }}
+ {{ $postCount := len $value.Pages -}}
+
+ <li><a href="
+ /{{ $.Data.Plural | urlize }}/{{ $key | urlize }}">{{ $key
+ }}</a>&nbsp;({{$postCount}})</li>
+ {{ end }}
+ </ul>
+</article>
+{{ end }} \ No newline at end of file