Umstellung der Author-Informationen vom Params nach Author

This commit is contained in:
mdn 2023-01-08 14:52:50 +01:00
parent f8c72825f0
commit 80ae54fa36
4 changed files with 40 additions and 20 deletions

View file

@ -41,6 +41,25 @@ title = 'Blogging and more'
paginate = 12
theme = "BlogAMore"
[author]
name = 'Max Mustsermann'
email = 'email@example.com'
homepage = 'http://example.com'
# Beschreibung das Webseitenbesitzers, für die Seitenleiste
avatar = "/img/author.jpg"
description = "Eine Beschreibung des Autors, als kurze Zusammenfassung"
[author.social]
# Links zur erreichbarkeit des Autors (Email ist leider 2 mal anzugeben)
Email = "email@example.com"
Phone = "+49 (0) 1234 56789"
VoIP = "main_kontakt@main_voip_anbieter.de"
Github = "username"
Twitter = "username"
LinkedIn = "username"
matrix = "@mdn:synapse.marcodn.de"
RSS = "/blog/index.xml"
[taxonomies]
tag = "tags"
category = "categories"
@ -57,10 +76,8 @@ theme = "BlogAMore"
blog = "/blog/:year/:slug"
[Params]
# Beschreibung das Webseitenbesitzers, für die Seitenleiste
avatar = "/img/author.jpg"
author = "Beispiel Autor"
description = "Eine Beschreibung des Autors, als kurze Zusammenfassung"
# Beschreibung der Seite selbst
description = "Die Beschreibung der Seite"
# Dateiname der den aktuellen Commit-Hash entält, sowie die Basis-url des Repo, damit im Footer der aktuelle Hash angezeigt wird, die Datei muss dann am besten über das Published-Script erzeugt werden
gitHashFile = "commit_id.txt"
@ -78,17 +95,6 @@ theme = "BlogAMore"
[Params.KnowHow]
skills = "skills"
[Params.Social]
# Links zur erreichbarkeit des Autors
Email = "email@example.com"
Phone = "+49 (0) 1234 56789"
VoIP = "main_kontakt@main_voip_anbieter.de"
Github = "username"
Twitter = "username"
LinkedIn = "username"
matrix = "@mdn:synapse.marcodn.de"
RSS = "/blog/index.xml"
[menu]
# Definition des Hauptmenüs (Die Icons sind via Pre definiert, hierbei wird [FeatherIcons](https://feathericons.com) verwendet)
[[menu.main]]

View file

@ -12,9 +12,9 @@
{{ define "sidebar" }}
<div class="position-sticky">
{{- partial "widget/header.html" (dict "title" "About Me") -}}
{{- partial "widget/aboutme.html" (dict "avatar" .Site.Params.Avatar "description" .Site.Params.Description) -}}
{{- partial "widget/aboutme.html" (dict "avatar" .Site.Author.avatar "description" .Site.Author.description) -}}
{{ with .Site.Params.Social }}
{{ with .Site.Author.social }}
{{- partial "widget/header.html" (dict "title" "Contact Me") -}}
{{- partial "widget/socials.html" . -}}
{{ end }}

View file

@ -6,9 +6,9 @@
{{ define "sidebar" }}
<div class="position-sticky">
{{- partial "widget/header.html" (dict "title" "About Me") -}}
{{- partial "widget/aboutme.html" (dict "avatar" .Site.Params.Avatar "description" .Site.Params.Description) -}}
{{- partial "widget/aboutme.html" (dict "avatar" .Site.Author.avatar "description" .Site.Author.description) -}}
{{ with .Site.Params.Social }}
{{ with .Site.Author.social }}
{{- partial "widget/header.html" (dict "title" "Contact Me") -}}
{{- partial "widget/socials.html" . -}}
{{ end }}

View file

@ -1,8 +1,22 @@
{{ define "main" }}
<div id="home-jumbotron" class="jumbotron text-center bg-light">
<div id="home-jumbotron" class="jumbotron text-center bg-light p-5">
<h1 class="title">{{ .Site.Title }}</h1>
<div>
{{ .Site.Params.Description }}
</div>
</div>
<div class="row">
<div class="col-lg-6">
{{- partial "widget/header.html" (dict "title" "About Me") -}}
{{- partial "widget/aboutme.html" (dict "avatar" .Site.Author.avatar "description" .Site.Author.description) -}}
</div>
<div class="col-lg-6">
{{- partial "widget/header.html" (dict "title" "Contact Me") -}}
{{ with .Site.Author.social }}
{{- partial "widget/socials.html" . -}}
{{ end }}
</div>
</div>
{{ end }}