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/config.toml b/config.toml new file mode 100644 index 0000000..fa31db9 --- /dev/null +++ b/config.toml @@ -0,0 +1,17 @@ +baseURL = 'https://siinus.net/' +languageCode = 'en-us' +title = 'siinus' +theme = 'lugo' + +copyright = 'and copyleft' + +defaultContentLanguage = 'et' +[languages] + [languages.en] + contentDir = 'content/en/' + weight = 2 + title = 'Home of siinus' + [languages.et] + contentDir = 'content/et/' + weight = 1 + title = 'siinuse urgas' diff --git a/content/et/_index.md b/content/et/_index.md new file mode 100644 index 0000000..aea3980 --- /dev/null +++ b/content/et/_index.md @@ -0,0 +1,18 @@ +--- +title: 'Johhaidii' +--- + +Tere! Sa jõudsid just ühele tumedale lehele. Selle renderdamiseks ei raisatud eriti oluliselt arvutusvõimsust, niiet suuremat kahju siin külastusest ei teki. Lase hea maitsta, niipalju kui on. + +Ma ei kujuta ette, kas siia saidile kunagi ka mingit sisulist lisaväärtust tekib. + +--- + +## Kontakt + +- kast (at) siinus (dot) net +- helistajaid ma kardan, aga tungival soovil numbri leiad ise kuskilt +- https://git.kahtlane.info/siinus +- irc ja matrix on kah + +--- diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..c0ea4b4 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,6 @@ +{{ partial "header.html" . -}} +

{{ .Title }}

+
+{{ .Content -}} +
+{{ partial "footer.html" . }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..6e34100 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,10 @@ +
+{{ partial "nextprev.html" . -}} +{{ partial "taglist.html" . -}} + + + + diff --git a/static/style.css b/static/style.css new file mode 100644 index 0000000..d3b2088 --- /dev/null +++ b/static/style.css @@ -0,0 +1,45 @@ +body { + font-family: sans-serif ; + background: #110000 ; + color: #ccc ; +} + +main { + max-width: 800px ; + margin: auto ; +} + +img { + max-width: 100% ; +} + +header h1 { + text-align: center ; +} + +footer { + text-align: center ; + clear: both ; +} + +/* For TAGLIST.HTML */ +.taglist { + text-align: center ; + clear: both ; +} + +/* For NEXTPREV.HTML */ +#nextprev { + /* The container for both the previous and next articles. */ +} +#prevart { + float: left ; + text-align: left ; +} +#nextart { + float: right ; + text-align: right ; +} +#nextart,#prevart { + max-width: 33% ; +} diff --git a/themes/lugo/README.md b/themes/lugo/README.md new file mode 100644 index 0000000..a39a9e8 --- /dev/null +++ b/themes/lugo/README.md @@ -0,0 +1,21 @@ +# Luke's Hugo Theme + +A simple Hugo theme I plan on using for my personal website, [Based.Cooking](https://based.cooking) and [LandChad.net](https://landchad.net). + +## get started + +```sh +hugo new site new-site +cd new-site +git clone https://github.com/lukesmithxyz/lugo themes/lugo +echo "theme = 'lugo'" >> config.toml +cp themes/lugo/static/style.css static/ +``` + +## stuff + +- Makes one RSS feed for the entire site at `/index.xml` +- Stylesheet is in `/style.css` and includes some important stuff for partials. +- If a post is tagged, links to the tags are placed at the bottom of the post. +- `nextprev.html` adds links to the Next and Previous articles to the bottom of a page. +- `taglist.html` links all tags an article is tagged to for related content. diff --git a/themes/lugo/archetypes/default.md b/themes/lugo/archetypes/default.md new file mode 100644 index 0000000..00e77bd --- /dev/null +++ b/themes/lugo/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/themes/lugo/config.toml b/themes/lugo/config.toml new file mode 100644 index 0000000..8d4a4f5 --- /dev/null +++ b/themes/lugo/config.toml @@ -0,0 +1,8 @@ +title = "Website Name" +baseURL = 'https://example.org' +languageCode = 'en-us' + +[params] + # "relatedtext" is the text that appears above the tag list at the bottom of pages. + #relatedtext = "Related:" + favicon = "/favicon.ico" diff --git a/themes/lugo/layouts/_default/list.html b/themes/lugo/layouts/_default/list.html new file mode 100644 index 0000000..b6a63be --- /dev/null +++ b/themes/lugo/layouts/_default/list.html @@ -0,0 +1,11 @@ +{{ partial "header.html" . -}} +

{{ .Title | title }}

+
+{{ .Content -}} + +
+{{- partial "footer.html" . }} diff --git a/themes/lugo/layouts/_default/rss.xml b/themes/lugo/layouts/_default/rss.xml new file mode 100644 index 0000000..9269333 --- /dev/null +++ b/themes/lugo/layouts/_default/rss.xml @@ -0,0 +1,26 @@ + + + {{ .Site.Title }} + {{ .Permalink }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} + Hugo -- gohugo.io{{ with .Site.LanguageCode }} + {{.}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{ with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{ end }} + {{ range .Pages }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + {{- .Content | html -}} + + {{ end }} + + diff --git a/themes/lugo/layouts/_default/single.html b/themes/lugo/layouts/_default/single.html new file mode 100644 index 0000000..43e8c2a --- /dev/null +++ b/themes/lugo/layouts/_default/single.html @@ -0,0 +1,5 @@ +{{ partial "header.html" . -}} +

{{ .Title }}

+
+{{ .Content -}} +{{ partial "footer.html" . }} diff --git a/themes/lugo/layouts/partials/footer.html b/themes/lugo/layouts/partials/footer.html new file mode 100644 index 0000000..4e942f2 --- /dev/null +++ b/themes/lugo/layouts/partials/footer.html @@ -0,0 +1,10 @@ +{{ partial "nextprev.html" . -}} +{{ partial "taglist.html" . -}} +
+ + + + diff --git a/themes/lugo/layouts/partials/header.html b/themes/lugo/layouts/partials/header.html new file mode 100644 index 0000000..f304fde --- /dev/null +++ b/themes/lugo/layouts/partials/header.html @@ -0,0 +1,21 @@ + + + + {{ if not .IsHome }}{{ .Title | title }} | {{ end }}{{ .Site.Title }} + + + + {{ with .Site.Params.favicon }} + {{ end -}} + + {{ if isset .Params "tags" }} + {{ end -}} + + + + + +{{- if .Site.Menus.main }} +{{ partial "nav.html" . }} +{{ end }} +
diff --git a/themes/lugo/layouts/partials/nav.html b/themes/lugo/layouts/partials/nav.html new file mode 100644 index 0000000..a7318fe --- /dev/null +++ b/themes/lugo/layouts/partials/nav.html @@ -0,0 +1,8 @@ + diff --git a/themes/lugo/layouts/partials/nextprev.html b/themes/lugo/layouts/partials/nextprev.html new file mode 100644 index 0000000..099f16d --- /dev/null +++ b/themes/lugo/layouts/partials/nextprev.html @@ -0,0 +1,10 @@ +{{ if or .Next .Prev -}} +
+{{- with .Prev }} +
Previous:
{{.Title}}
+{{ end -}} +{{- with .Next -}} +
Next:
{{.Title}}
+{{ end -}} +
+{{ end -}} diff --git a/themes/lugo/layouts/partials/taglist.html b/themes/lugo/layouts/partials/taglist.html new file mode 100644 index 0000000..757db6f --- /dev/null +++ b/themes/lugo/layouts/partials/taglist.html @@ -0,0 +1,13 @@ + {{- if isset .Params "tags" -}} + {{- $tagsLen := len .Params.tags -}} + {{- if gt $tagsLen 0 -}} +
+ {{- with .Site.Params.relatedtext }}{{ . }}
{{ end -}} + {{- range $k, $v := .Params.tags -}} + {{- $url := printf "tags/%s" (. | urlize | lower) -}} + {{ . | title }} + {{- if lt $k (sub $tagsLen 1) }} · {{ end -}} + {{- end -}} +
+ {{- end -}} + {{- end }} diff --git a/themes/lugo/layouts/shortcodes/hidvid.html b/themes/lugo/layouts/shortcodes/hidvid.html new file mode 100644 index 0000000..14f592d --- /dev/null +++ b/themes/lugo/layouts/shortcodes/hidvid.html @@ -0,0 +1,10 @@ +
+ Click to reveal video. + +
diff --git a/themes/lugo/layouts/shortcodes/img.html b/themes/lugo/layouts/shortcodes/img.html new file mode 100644 index 0000000..ff7959b --- /dev/null +++ b/themes/lugo/layouts/shortcodes/img.html @@ -0,0 +1,20 @@ + +
+ {{- with .Get "link"}}{{ end -}} + {{.}} + {{- if .Get "link"}}{{ end -}} + {{- with .Get "caption" -}} +
+ {{- . -}} +
+ {{- end -}} +
diff --git a/themes/lugo/layouts/shortcodes/tagcloud.html b/themes/lugo/layouts/shortcodes/tagcloud.html new file mode 100644 index 0000000..0cf0118 --- /dev/null +++ b/themes/lugo/layouts/shortcodes/tagcloud.html @@ -0,0 +1,3 @@ +{{ if isset .Site.Taxonomies "tags" }}{{ if not (eq (len .Site.Taxonomies.tags) 0) }} {{ end }}{{ end }} diff --git a/themes/lugo/layouts/shortcodes/vid.html b/themes/lugo/layouts/shortcodes/vid.html new file mode 100644 index 0000000..4c612fe --- /dev/null +++ b/themes/lugo/layouts/shortcodes/vid.html @@ -0,0 +1,6 @@ + diff --git a/themes/lugo/static/rss.svg b/themes/lugo/static/rss.svg new file mode 100644 index 0000000..c68fc24 --- /dev/null +++ b/themes/lugo/static/rss.svg @@ -0,0 +1 @@ + diff --git a/themes/lugo/static/style.css b/themes/lugo/static/style.css new file mode 100644 index 0000000..d3b2088 --- /dev/null +++ b/themes/lugo/static/style.css @@ -0,0 +1,45 @@ +body { + font-family: sans-serif ; + background: #110000 ; + color: #ccc ; +} + +main { + max-width: 800px ; + margin: auto ; +} + +img { + max-width: 100% ; +} + +header h1 { + text-align: center ; +} + +footer { + text-align: center ; + clear: both ; +} + +/* For TAGLIST.HTML */ +.taglist { + text-align: center ; + clear: both ; +} + +/* For NEXTPREV.HTML */ +#nextprev { + /* The container for both the previous and next articles. */ +} +#prevart { + float: left ; + text-align: left ; +} +#nextart { + float: right ; + text-align: right ; +} +#nextart,#prevart { + max-width: 33% ; +}