From: Duje Mihanović Date: Sat, 24 Aug 2024 14:44:26 +0000 (+0200) Subject: Decouple theme from content X-Git-Url: https://git.dujemihanovic.xyz/donate?a=commitdiff_plain;h=9f594273c05fcb73d06ff92607a8bddb5d0173fb;p=dujemihanovic.xyz.git Decouple theme from content 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. --- diff --git a/.gitmodules b/.gitmodules index f9597ba..ba46698 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 index 00e77bd..0000000 --- a/archetypes/default.md +++ /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 index a7721e4..0000000 --- a/content/posts/_index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Blog ---- -# Posts diff --git a/hugo.toml b/hugo.toml index 9fe3844..7359a24 100644 --- 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 index ec936f4..0000000 --- a/layouts/_default/list.html +++ /dev/null @@ -1,14 +0,0 @@ -{{ define "main" }} -{{ .Content }} -{{ end }} - -{{ define "footer" }} - -{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html deleted file mode 100644 index 8e99f87..0000000 --- a/layouts/_default/single.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ define "main" }} - {{ .Content }} -{{ end }} diff --git a/layouts/index.html b/layouts/index.html deleted file mode 100644 index 9cfa2d0..0000000 --- a/layouts/index.html +++ /dev/null @@ -1,17 +0,0 @@ -{{ define "main" }} -{{ .Content }} -

Recent Posts

- - -

Recently Updated Projects

- - -{{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html deleted file mode 100644 index 15dd634..0000000 --- a/layouts/partials/head.html +++ /dev/null @@ -1,10 +0,0 @@ - - - -{{ print .Page.Title }} | {{ print .Site.Title }} -{{ $style := resources.Get "css/style.css" | resources.Minify }} - -{{ $index := $.Site.GetPage "/" }} -{{ range $index.AlternativeOutputFormats }} -{{ printf `` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} -{{ end }} diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html deleted file mode 100644 index cf8baab..0000000 --- a/layouts/partials/nav.html +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/layouts/posts/list.html b/layouts/posts/list.html deleted file mode 100644 index 2536415..0000000 --- a/layouts/posts/list.html +++ /dev/null @@ -1,15 +0,0 @@ -{{ define "main" }} -{{ .Content }} - -{{ end }} diff --git a/layouts/posts/single.html b/layouts/posts/single.html deleted file mode 100644 index e49cbb0..0000000 --- a/layouts/posts/single.html +++ /dev/null @@ -1,12 +0,0 @@ -{{ define "main" }} -

{{ .Title }}

-

{{ .WordCount }} words, estimated reading time: {{ .ReadingTime }} - minute(s) -
- Originally published on {{ .PublishDate.Format "January 2, 2006" - }} -
- Last modified on {{ .Lastmod.Format "January 2, 2006" }}

-

- {{ .Content }} -{{ end }} diff --git a/layouts/projects/list.html b/layouts/projects/list.html deleted file mode 100644 index 9e32e3f..0000000 --- a/layouts/projects/list.html +++ /dev/null @@ -1,10 +0,0 @@ -{{ define "main" }} -{{ .Content }} - -{{ end }} diff --git a/layouts/projects/single.html b/layouts/projects/single.html deleted file mode 100644 index 17b274b..0000000 --- a/layouts/projects/single.html +++ /dev/null @@ -1,4 +0,0 @@ -{{ define "main" }} -

{{ .Title }}

-{{ .Content }} -{{ end }} diff --git a/layouts/rss.xml b/layouts/rss.xml deleted file mode 100644 index 4c0def8..0000000 --- a/layouts/rss.xml +++ /dev/null @@ -1,34 +0,0 @@ -{{- printf "" | safeHTML }} - - {{ .Site.Title }} - {{ .Permalink }} - {{ $lastmod := 0 }} - {{ range (.Site.GetPage "/posts").Pages }} - {{ if gt .Lastmod $lastmod }} - {{ $lastmod = .Lastmod }} - {{ end }} - {{ end }} - {{ $lastmod.Format "2006-01-02T15:04:05Z" }} - - - - Duje Mihanović - duje.mihanovic@skole.hr - {{ .Permalink }} - - Hugo - - {{ with $.Site.GetPage "posts/" }} - {{ range first .Site.Config.Services.RSS.Limit .Pages }} - - {{ .Permalink }} - - {{ .Title }} - {{ .Lastmod.Format "2006-01-02T15:04:05Z" }} - {{ .PublishDate.Format "2006-01-02T15:04:05Z" }} - {{ .Content | html }} - {{ .Summary | html }} - - {{ end }} - {{ end }} - diff --git a/themes/duje b/themes/duje index 558981b..f0f84ba 160000 --- a/themes/duje +++ b/themes/duje @@ -1 +1 @@ -Subproject commit 558981b134086fe06af090c147bac1a5f981dab9 +Subproject commit f0f84ba4f81b753ed494af4e950cd546c17b426a