diff --git a/README.md b/README.md index aac4863..0780856 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,8 @@ theme = "BlogAMore" # Beschreibung das Webseitenbesitzers, für die Seitenleiste avatar = "/img/author.jpg" description = "Eine Beschreibung des Autors, als kurze Zusammenfassung" + # Name der Datendatei mit einer Auflistung von Link, Aufbau der Datei ist im Shortcode Link zu finden + linkdata = "links" [author.social] # Links zur erreichbarkeit des Autors (Email ist leider 2 mal anzugeben) @@ -224,6 +226,10 @@ date: {{ now.Format "2006-01-02" }} > comming soon... +### link + +> cooming soon... + ## Weiteres Haben Sie einen Fehler gefunden oder eine Idee für ein neues Feature? Schicken Sie mir bitte eine Mail an ... Oder erstellen Sie direkt einen [Pull Request](https://gitea.marcodn.de/mdn/blogamore/pulls) diff --git a/layouts/index.html b/layouts/index.html index 641aa9a..2e5d380 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -19,4 +19,15 @@ {{ end }} +{{ end }} + +{{ define "sidebar" }} + {{ if isset .Site.Author "linkdata" }} + {{ with (index .Site.Data .Site.Author.linkdata) }} +
+ {{- partial "widget/header.html" (dict "title" "Links") -}} + {{- partial "widget/links.html" . -}} +
+ {{ end }} + {{ end }} {{ end }} \ No newline at end of file diff --git a/layouts/partials/widget/links.html b/layouts/partials/widget/links.html new file mode 100644 index 0000000..31df44b --- /dev/null +++ b/layouts/partials/widget/links.html @@ -0,0 +1,16 @@ + diff --git a/layouts/shortcodes/link.html b/layouts/shortcodes/link.html index fbfdea1..88a1173 100644 --- a/layouts/shortcodes/link.html +++ b/layouts/shortcodes/link.html @@ -1,18 +1,5 @@ {{ $dataName := .Get "data" }} - +{{ with (index .Site.Data (split $dataName "/")) }} + {{- partial "widget/links.html" . -}} +{{ end }}