From 1100562e29f6476448b656dbddd4cf22505523f6 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Sun, 10 Mar 2024 14:59:14 +0100 Subject: Move back to JBMAFP --- templates/.gitkeep | 0 templates/base.html | 165 ++++++++++++++++++++++++++++++++++++++++++++++++++ templates/feed.xml | 23 +++++++ templates/index.html | 35 +++++++++++ templates/note.html | 14 +++++ templates/page.html | 13 ++++ templates/post.html | 14 +++++ templates/robots.txt | 2 + templates/sitemap.xml | 12 ++++ 9 files changed, 278 insertions(+) create mode 100755 templates/.gitkeep create mode 100755 templates/base.html create mode 100755 templates/feed.xml create mode 100755 templates/index.html create mode 100755 templates/note.html create mode 100644 templates/page.html create mode 100755 templates/post.html create mode 100644 templates/robots.txt create mode 100644 templates/sitemap.xml (limited to 'templates') diff --git a/templates/.gitkeep b/templates/.gitkeep new file mode 100755 index 0000000..e69de29 diff --git a/templates/base.html b/templates/base.html new file mode 100755 index 0000000..b66174a --- /dev/null +++ b/templates/base.html @@ -0,0 +1,165 @@ + + + + + + {{ block "title" . }}{{ .Config.Title }}{{ end }} + + + + + + + +
+ +
+
{{ block "content" . }}{{ end }}
+ + + diff --git a/templates/feed.xml b/templates/feed.xml new file mode 100755 index 0000000..97507e2 --- /dev/null +++ b/templates/feed.xml @@ -0,0 +1,23 @@ + + + {{ .Config.Title }}'s posts + {{ .Config.BaseURL }} + {{ .Config.Description }} + {{ .Config.Language }} + + {{ range $idx, $page := .Pages }} + {{ if or (eq $page.Type "post") (eq $page.Type "note") }} + {{ if not .Draft }} + + {{ $page.Title }} + {{ $.Config.BaseURL }}{{ $page.RelPermalink }} + {{ $page.Created.Format "Mon, 02 Jan 2006 15:04:05 -0700" }} + {{ $.Config.BaseURL }}{{ $page.RelPermalink }} + {{ $page.Summary }} + {{ $page.Raw }} + + {{ end }} + {{ end }} + {{ end }} + + diff --git a/templates/index.html b/templates/index.html new file mode 100755 index 0000000..da06fd7 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,35 @@ +{{ template "base.html" . }} + +{{ define "content" }} +
+ You do not learn by relaxing. You learn by violently assaulting your problem until it surrenders its mysteries to you. +
+ + + Examine graphical representations of binary files using diagrams that + illustrate connections between pairs of bytes (digraphs) and triplets + of bytes (trigraphs). + + +
+

More long form, ramblings etc

+ +
+ +
+

Notes?! Maybe useful

+ +
+{{ end }} diff --git a/templates/note.html b/templates/note.html new file mode 100755 index 0000000..5289a5e --- /dev/null +++ b/templates/note.html @@ -0,0 +1,14 @@ +{{ template "base.html" . }} + +{{ define "title" }}{{ .Page.Title }}{{ end }} +{{ define "description" }}{{ .Page.Summary }}{{ end }} + +{{ define "content" }} +
+

{{ .Page.Title }}

+

{{ .Page.Type }}, {{ .Page.Created.Format "Jan 2, 2006" }}, on {{ .Config.Title }}'s blog

+
+ {{ .Page.HTML }} +
+
+{{ end }} diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..7ee5219 --- /dev/null +++ b/templates/page.html @@ -0,0 +1,13 @@ +{{ template "base.html" . }} + +{{ define "title" }}{{ .Page.Title }}{{ end }} +{{ define "description" }}{{ .Page.Summary }}{{ end }} + +{{ define "content" }} +
+

{{ .Page.Title }}

+
+ {{ .Page.HTML }} +
+
+{{ end }} diff --git a/templates/post.html b/templates/post.html new file mode 100755 index 0000000..1ed852c --- /dev/null +++ b/templates/post.html @@ -0,0 +1,14 @@ +{{ template "base.html" . }} + +{{ define "title" }}{{ .Page.Title }}{{ end }} +{{ define "description" }}{{ .Page.Summary }}{{ end }} + +{{ define "content" }} +
+

{{ .Page.Title }}

+

{{ .Page.Type }}, {{ .Page.Created.Format "Jan 2, 2006" }}, on {{ .Config.Title }}'s blog

+
+ {{ .Page.HTML }} +
+
+{{ end }} diff --git a/templates/robots.txt b/templates/robots.txt new file mode 100644 index 0000000..c2a49f4 --- /dev/null +++ b/templates/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Allow: / diff --git a/templates/sitemap.xml b/templates/sitemap.xml new file mode 100644 index 0000000..4d2617c --- /dev/null +++ b/templates/sitemap.xml @@ -0,0 +1,12 @@ + + {{ range $idx, $page := .Pages }} + {{ if or (eq $page.Type "post") (eq $page.Type "note") }} + {{ if not .Draft }} + + {{ $.Config.BaseURL }}{{ $page.RelPermalink }} + {{ $page.Created.Format "2006-01-02T15:04:05" }}+00:00 + + {{ end }} + {{ end }} + {{ end }} + -- cgit v1.2.3