From: Duje Mihanović Date: Sat, 24 Aug 2024 14:22:23 +0000 (+0200) Subject: Initial commit X-Git-Url: https://git.dujemihanovic.xyz/%7B%7B%20%24style.RelPermalink%20%7D%7D?a=commitdiff_plain;h=f0f84ba4f81b753ed494af4e950cd546c17b426a;p=hugo-skeleton.git Initial commit --- f0f84ba4f81b753ed494af4e950cd546c17b426a diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8aa2645 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) [year] [fullname] + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..00e77bd --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/assets/css/style.css b/assets/css/style.css new file mode 100644 index 0000000..4bc5ab6 --- /dev/null +++ b/assets/css/style.css @@ -0,0 +1,52 @@ +body { + max-width: 1000px; + margin: 0 auto; + padding: 0 10px; +} + +main { + line-height: 1.5; +} + +nav { + text-align: center; +} + +nav ul { + list-style: none; + padding: 0 5px; +} + +nav a { + text-decoration: none; + color: #000; +} + +nav a:hover { + text-decoration: underline; +} + +nav li { + display: inline; + padding: 0 10px; +} + +p { + margin: 1em 0; +} + +ul { + padding: 0 2em; +} + +code { + overflow-wrap: anywhere; +} + +pre, nav { + overflow-x: scroll; +} + +img { + max-width: 100%; +} diff --git a/content/posts/_index.md b/content/posts/_index.md new file mode 100644 index 0000000..a7721e4 --- /dev/null +++ b/content/posts/_index.md @@ -0,0 +1,4 @@ +--- +title: Blog +--- +# Posts diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..f34c8e4 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,14 @@ + + + + {{ partial "head.html" . }} + + + + {{ partial "nav.html" }} +
+ {{ block "main" . }} + {{ end }} +
+ + diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..ec936f4 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,14 @@ +{{ define "main" }} +{{ .Content }} +{{ end }} + +{{ define "footer" }} + +{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..8e99f87 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,3 @@ +{{ define "main" }} + {{ .Content }} +{{ end }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..9cfa2d0 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,17 @@ +{{ define "main" }} +{{ .Content }} +

Recent Posts

+ + +

Recently Updated Projects

+ + +{{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..15dd634 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,10 @@ + + + +{{ 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 new file mode 100644 index 0000000..cf8baab --- /dev/null +++ b/layouts/partials/nav.html @@ -0,0 +1,8 @@ + diff --git a/layouts/posts/list.html b/layouts/posts/list.html new file mode 100644 index 0000000..2536415 --- /dev/null +++ b/layouts/posts/list.html @@ -0,0 +1,15 @@ +{{ define "main" }} +{{ .Content }} + +{{ end }} diff --git a/layouts/posts/single.html b/layouts/posts/single.html new file mode 100644 index 0000000..e49cbb0 --- /dev/null +++ b/layouts/posts/single.html @@ -0,0 +1,12 @@ +{{ 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 new file mode 100644 index 0000000..9e32e3f --- /dev/null +++ b/layouts/projects/list.html @@ -0,0 +1,10 @@ +{{ define "main" }} +{{ .Content }} + +{{ end }} diff --git a/layouts/projects/single.html b/layouts/projects/single.html new file mode 100644 index 0000000..17b274b --- /dev/null +++ b/layouts/projects/single.html @@ -0,0 +1,4 @@ +{{ define "main" }} +

{{ .Title }}

+{{ .Content }} +{{ end }} diff --git a/layouts/rss.xml b/layouts/rss.xml new file mode 100644 index 0000000..65a962d --- /dev/null +++ b/layouts/rss.xml @@ -0,0 +1,35 @@ +{{- 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" }} + + + + 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/theme.toml b/theme.toml new file mode 100644 index 0000000..1fe25e5 --- /dev/null +++ b/theme.toml @@ -0,0 +1,14 @@ +name = 'Skeleton' +license = 'MIT' +licenselink = 'https://git.dujemihanovic.xyz/?p=hugo-skeleton.git;a=blob;f=LICENSE' +description = 'A very barebones theme' + +# The home page of the theme, where the source can be found +homepage = 'https://git.dujemihanovic.xyz/?p=hugo-skeleton.git' + +# If you have a running demo of the theme +demosite = 'https://dujemihanovic.xyz' + +[author] + name = 'Duje Mihanović' + homepage = 'http://dujemihanovic.xyz'