]> git.dujemihanovic.xyz Git - dujemihanovic.xyz.git/commitdiff
Decouple theme from content
authorDuje Mihanović <duje.mihanovic@skole.hr>
Sat, 24 Aug 2024 14:44:26 +0000 (16:44 +0200)
committerDuje Mihanović <duje.mihanovic@skole.hr>
Sat, 24 Aug 2024 14:44:30 +0000 (16:44 +0200)
Probably still some work to do in this direction (including fully
adapting the theme for reuse by others), but I believe this does the
bulk of it.

15 files changed:
.gitmodules
archetypes/default.md [deleted file]
content/posts/_index.md [deleted file]
hugo.toml
layouts/_default/list.html [deleted file]
layouts/_default/single.html [deleted file]
layouts/index.html [deleted file]
layouts/partials/head.html [deleted file]
layouts/partials/nav.html [deleted file]
layouts/posts/list.html [deleted file]
layouts/posts/single.html [deleted file]
layouts/projects/list.html [deleted file]
layouts/projects/single.html [deleted file]
layouts/rss.xml [deleted file]
themes/duje

index f9597baa0685783471f03885630a5d5644d5cbd9..ba466982660e2e9af3fc560bcde1421ea7b63e28 100644 (file)
@@ -1,3 +1,3 @@
 [submodule "themes/duje"]
        path = themes/duje
-       url = ./
+       url = git://git.dujemihanovic.xyz/hugo-skeleton.git
diff --git a/archetypes/default.md b/archetypes/default.md
deleted file mode 100644 (file)
index 00e77bd..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
----
-title: "{{ replace .Name "-" " " | title }}"
-date: {{ .Date }}
-draft: true
----
-
diff --git a/content/posts/_index.md b/content/posts/_index.md
deleted file mode 100644 (file)
index a7721e4..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
----
-title: Blog
----
-# Posts
index 9fe38444c5a7aad5eea2779a39a8e81f39f10401..7359a244c89e93a7373138e81ade280633a89bbe 100644 (file)
--- a/hugo.toml
+++ b/hugo.toml
@@ -4,6 +4,7 @@ title = "Duje Mihanović's Site"
 enableGitInfo = true
 disableKinds = ['taxonomy', 'term']
 rssLimit = 20
+theme = ['duje']
 [author]
   name = 'Duje Mihanović'
   email = 'duje.mihanovic@skole.hr'
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
deleted file mode 100644 (file)
index ec936f4..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-{{ define "main" }}
-{{ .Content }}
-{{ end }}
-
-{{ define "footer" }}
-<footer>
-       <p>If you appreciate my work and would like to donate, you can donate XMR to this address or use the QR code below.</p>
-       <p>85qXBHh99bJ62p7s8upmoqYsvHrJvZWLTD7riHFo3E2jRvdQRoiNuXKRaDMAQiJ34Kfix3KHouNCW6bbD4zniWB5QxZR9Xx</p>
-       {{ $image := resources.Get "img/donate.png" }}
-       {{ with $image }}
-       <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="QR code for XMR donation">
-       {{ end }}
-</footer>
-{{ end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
deleted file mode 100644 (file)
index 8e99f87..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{{ define "main" }}
- {{ .Content }}
-{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
deleted file mode 100644 (file)
index 9cfa2d0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-{{ define "main" }}
-{{ .Content }}
-<h2>Recent Posts</h2>
-<ul>
-       {{ range first 5 ($.Site.GetPage "/posts").Pages }}
-       <li><a href="{{ .RelPermalink }}">{{ .Title }}</a> - {{ .Date.Format "January 2, 2006" }}</li>
-       {{ end }}
-</ul>
-<ul style="list-style: none;"><li><a href="/posts">Read all the posts</a></li></ul>
-<h2>Recently Updated Projects</h2>
-<ul>
-       {{ range first 3 ($.Site.GetPage "/projects").Pages }}
-       <li><a href="{{ .RelPermalink }}">{{ .Title }}</a>
-       {{ end }}
-</ul>
-<ul style="list-style: none;"><li><a href="/projects">See all the projects</a></li></ul>
-{{ end }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
deleted file mode 100644 (file)
index 15dd634..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<meta name="description" content="Duje Mihanović's personal website">
-<title>{{ print .Page.Title }} | {{ print .Site.Title }}</title>
-{{ $style := resources.Get "css/style.css" | resources.Minify }}
-<link rel="stylesheet" href="{{ $style.RelPermalink }}?v=1.1.3">
-{{ $index := $.Site.GetPage "/" }}
-{{ range $index.AlternativeOutputFormats }}
-{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
-{{ end }}
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
deleted file mode 100644 (file)
index cf8baab..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<nav>
-       <ul>
-               <li><a href="/">Home</a></li>
-               <li><a href="/posts/">Blog</a></li>
-               <li><a href="/contact/">Contact</a></li>
-               <li><a href="/donate/">Donate</a></li>
-       </ul>
-</nav>
diff --git a/layouts/posts/list.html b/layouts/posts/list.html
deleted file mode 100644 (file)
index 2536415..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-{{ define "main" }}
-{{ .Content }}
-<ul>
-{{ range .Pages }}
-       <li>
-               <a href="{{ .RelPermalink }}">{{ .Title }}</a> - {{ .Date.Format "January 2, 2006" }} - {{ .ReadingTime }} minute read<br>
-               {{ .Summary }}
-               {{ if .Truncated }}
-               <br>
-               <a href="{{ .RelPermalink }}">Read full article...</a>
-               {{ end }}
-       </li>
-{{ end }}
-</ul>
-{{ end }}
diff --git a/layouts/posts/single.html b/layouts/posts/single.html
deleted file mode 100644 (file)
index e49cbb0..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-{{ define "main" }}
- <h1>{{ .Title }}</h1>
- <p><i>{{ .WordCount }} words, estimated reading time: {{ .ReadingTime }}
-        minute(s)</i>
- <br>
- <i>Originally published on {{ .PublishDate.Format "January 2, 2006"
-        }}</i>
- <br>
- <i>Last modified on {{ .Lastmod.Format "January 2, 2006" }}</i></p>
- <p></p>
- {{ .Content }}
-{{ end }}
diff --git a/layouts/projects/list.html b/layouts/projects/list.html
deleted file mode 100644 (file)
index 9e32e3f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-{{ define "main" }}
-{{ .Content }}
-<ul>
-{{ range .Pages }}
-       <li>
-               <a href="{{ .RelPermalink }}">{{ .Title }}</a>
-       </li>
-{{ end }}
-</ul>
-{{ end }}
diff --git a/layouts/projects/single.html b/layouts/projects/single.html
deleted file mode 100644 (file)
index 17b274b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-{{ define "main" }}
-<h1>{{ .Title }}</h1>
-{{ .Content }}
-{{ end }}
diff --git a/layouts/rss.xml b/layouts/rss.xml
deleted file mode 100644 (file)
index 4c0def8..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\"?>" | safeHTML }}
-<feed xmlns="http://www.w3.org/2005/Atom">
-       <title>{{ .Site.Title }}</title>
-       <id>{{ .Permalink }}</id>
-       {{ $lastmod := 0 }}
-       {{ range (.Site.GetPage "/posts").Pages }}
-               {{ if gt .Lastmod $lastmod }}
-                       {{ $lastmod = .Lastmod }}
-               {{ end }}
-       {{ end }}
-       <updated>{{ $lastmod.Format "2006-01-02T15:04:05Z" }}</updated>
-       <link href="{{ .Permalink }}"/>
-       <link rel="self" href="{{ (.OutputFormats.Get "RSS").Permalink }}"/>
-       <author>
-               <name>Duje Mihanović</name>
-               <email>duje.mihanovic@skole.hr</email>
-               <uri>{{ .Permalink }}</uri>
-       </author>
-       <generator uri="https://gohugo.io/">Hugo</generator>
-
-       {{ with $.Site.GetPage "posts/" }}
-       {{ range first .Site.Config.Services.RSS.Limit .Pages }}
-       <entry>
-               <id>{{ .Permalink }}</id>
-               <link rel="alternate" href="{{ .RelPermalink }}"/>
-               <title>{{ .Title }}</title>
-               <updated>{{ .Lastmod.Format "2006-01-02T15:04:05Z" }}</updated>
-               <published>{{ .PublishDate.Format "2006-01-02T15:04:05Z" }}</published>
-               <content type="html">{{ .Content | html }}</content>
-               <summary type="html">{{ .Summary | html }}</summary>
-       </entry>
-       {{ end }}
-       {{ end }}
-</feed>
index 558981b134086fe06af090c147bac1a5f981dab9..f0f84ba4f81b753ed494af4e950cd546c17b426a 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 558981b134086fe06af090c147bac1a5f981dab9
+Subproject commit f0f84ba4f81b753ed494af4e950cd546c17b426a