]> Untitled Git - afilini.com/commitdiff
Add baseURL back, fix templates to use relative URLs
authorAlekos Filini <alekos.filini@gmail.com>
Sat, 5 Jun 2021 19:21:26 +0000 (21:21 +0200)
committerAlekos Filini <alekos.filini@gmail.com>
Sat, 5 Jun 2021 19:21:26 +0000 (21:21 +0200)
config.toml
layouts/_default/list.html [new file with mode: 0644]
layouts/_default/single.html [new file with mode: 0644]

index 5ad73653f39a48abb9528707bc4b54091190171a..83e47160909d49b9a8ff8a12c2d3fb1b8f19b7cb 100644 (file)
@@ -1,4 +1,4 @@
-baseURL = ""
+baseURL = "https://afilini.com"
 
 # The name of this wonderful theme ;-).
 theme = 'hugo-bearblog'
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
new file mode 100644 (file)
index 0000000..c381481
--- /dev/null
@@ -0,0 +1,38 @@
+{{ define "main" }}
+<content>
+  {{ if .Data.Singular }}
+  <h3 style="margin-bottom:0">Filtering for "{{ .Title }}"</h3>
+  <small>
+    <a href="{{ "/blog" | relURL }}">Remove filter</a>
+  </small>
+  {{ end }}
+  <ul class="blog-posts">
+    {{ range .Pages }}
+    <li>
+      <span>
+        <i>
+          <time datetime='{{ .Date.Format "2006-01-02" }}' pubdate>
+            {{ .Date.Format (default "02 Jan, 2006" .Site.Params.dateFormat) }}
+          </time>
+        </i>
+      </span>
+      <a href="{{ .RelPermalink }}">{{ .Title }}</a>
+    </li>
+    {{ else }}
+    <li>
+      No posts yet
+    </li>
+    {{ end }}
+  </ul>
+  {{ if .Data.Singular }}
+  {{else}}
+    <small>
+      <div>
+        {{ range .Site.Taxonomies.tags }}
+        <a href="{{ .Page.RelPermalink }}">#{{ .Page.Title }}</a>&nbsp;
+        {{ end }}
+      </div>
+    </small>
+    {{ end }}
+</content>
+{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
new file mode 100644 (file)
index 0000000..fa5e909
--- /dev/null
@@ -0,0 +1,20 @@
+{{ define "main" }}
+{{ if eq .Type "blog" }}{{ if not .Params.menu }}
+<h1>{{ .Title }}</h1>
+<p>
+  <i>
+    <time datetime='{{ .Date.Format "2006-01-02" }}' pubdate>
+      {{ .Date.Format (default "02 Jan, 2006" .Site.Params.dateFormat) }}
+    </time>
+  </i>
+</p>
+{{ end }}{{ end }}
+<content>
+  {{ .Content }}
+</content>
+<p>
+  {{ range (.GetTerms "tags") }}
+  <a href="{{ .RelPermalink }}">#{{ .LinkTitle }}</a>
+  {{ end }}
+</p>
+{{ end }}