From 4979bdb8a1e250f3675b50f1045e2d48c926b589 Mon Sep 17 00:00:00 2001 From: orta Date: Wed, 13 Dec 2023 17:49:35 +0000 Subject: [PATCH] Adds authors --- content/authors/orta/_index.md | 5 ++ content/posts/2023/12/13/first.md | 3 +- hugo.toml | 26 ++------ layouts/_default/author.html | 3 + layouts/_default/author.terms.html | 10 +++ layouts/_default/single.html | 100 +++++++++++++++++++++++++++++ 6 files changed, 126 insertions(+), 21 deletions(-) create mode 100644 content/authors/orta/_index.md create mode 100644 layouts/_default/author.html create mode 100644 layouts/_default/author.terms.html create mode 100644 layouts/_default/single.html diff --git a/content/authors/orta/_index.md b/content/authors/orta/_index.md new file mode 100644 index 0000000..69828d0 --- /dev/null +++ b/content/authors/orta/_index.md @@ -0,0 +1,5 @@ +--- +name: "Orta Therox" +bio: "Programmer of sorts" +twitter: "orta" +--- diff --git a/content/posts/2023/12/13/first.md b/content/posts/2023/12/13/first.md index 95ae721..8702ec2 100644 --- a/content/posts/2023/12/13/first.md +++ b/content/posts/2023/12/13/first.md @@ -1,7 +1,8 @@ +++ title = 'First Post' date = 2023-12-13T12:56:32Z -comments = false +authors = ["orta"] +tags = ["meta"] +++ ### Hello world! diff --git a/hugo.toml b/hugo.toml index c62cf0e..55d3b3a 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,31 +1,17 @@ -baseURL = 'https://puzzmo-com.github.io/blog.puzzmo.com/' +baseURL = 'https://blog.puzzmo.com/' languageCode = 'en-us' title = 'Puzzmo Blog' theme = 'paper' [params] # color style - color = 'linen' # linen, wheat, gray, light + color = 'gray' # linen, wheat, gray, light - # header social icons - twitter = 'puzzmotoday' # twitter.com/YOUR_TWITTER_ID - github = 'puzzmo-com' # github.com/YOUR_GITHUB_ID - instagram = 'puzzmo' # instagram.com/YOUR_INSTAGRAM_ID -# linkedin = 'company/puzzmo' # linkedin.com/in/YOUR_LINKEDIN_ID -# mastodon = 'YOUR_MASTODON_LINK' # e.g. 'https://mastodon.instance/@xxx' - rss = true # show rss icon + twitter = 'puzzmotoday' + github = 'puzzmo-com' + instagram = 'puzzmo' + rss = true - - - # misc -# disableHLJS = true # disable highlight.js -# disablePostNavigation = true # disable post navigation -# monoDarkIcon = true # show monochrome dark mode icon -# gravatarCdn = 'GRAVATAR_CDN_LINK' # e.g. 'https://cdn.v2ex.com/gravatar/' -# graphCommentId = "YOUR_GRAPH_COMMENT_ID" # use graph comment (disqus alternative) -# math = true # enable KaTeX math typesetting globally - - # giscus [params.giscus] repo = 'puzzmo-com/blog.puzzmo.com' # see https://giscus.app for more details repoId = 'R_kgDOK5Q10A' diff --git a/layouts/_default/author.html b/layouts/_default/author.html new file mode 100644 index 0000000..be19198 --- /dev/null +++ b/layouts/_default/author.html @@ -0,0 +1,3 @@ +{{ define "main" }} + +{{ end }} \ No newline at end of file diff --git a/layouts/_default/author.terms.html b/layouts/_default/author.terms.html new file mode 100644 index 0000000..890b835 --- /dev/null +++ b/layouts/_default/author.terms.html @@ -0,0 +1,10 @@ +{{ define "main" }} + +

Authors

+ +{{ range .Data.Pages }} +

{{ .Params.name }}

+

{{ .Params.bio }}

+{{end}} + +{{ end }} \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..33e4ac7 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,100 @@ +{{ define "main" }} + + +
+
+

{{ .Title }}

+ + {{ if ne .Type "page" }} +
+ {{ if .Date }} + + {{ end }} + - + + {{ range .Param "authors" }} + {{ $name := . }} + {{ $path := printf "/%s/%s" "authors" ($name | urlize) }} + {{ with $.Site.GetPage $path }} + {{ .Params.name }} + {{ end }} + {{ end }} + +
+ {{ end }} +
+ +
{{ .Content }}
+ + + {{ if .Params.tags }} +
+ {{ range .Params.tags }} {{ $href := print (absURL "tags/") (urlize .) }} + {{ . }} + {{ end }} +
+ {{ end }} + + + {{ if not site.Params.disablePostNavigation }} + {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} + {{ if and (gt (len $pages) 1) (in $pages . ) }} + + {{ end }} + {{ end }} + + + {{ if and site.DisqusShortname (not (eq .Params.comments false)) }} +
+ + {{ end }} + + + + {{ if and site.Params.giscus.repo (eq .Params.comments true) }} +
+ + {{ end }} +
+ +{{ end }}