From bd7902f127ea04aca9243d4a7aaf2f24460c5b9d Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sat, 15 Oct 2022 18:20:48 -0700 Subject: [PATCH] Update config, menu and sidebar --- archetypes/post.md | 3 + config/_default/config.toml | 17 ++-- config/_default/configTaxo.toml | 5 -- config/_default/languages.toml | 2 +- config/_default/menus/menu.en.toml | 16 ++-- config/_default/params.toml | 14 ++-- data/.keep | 0 data/menu.yaml | 9 --- data/social.yaml | 15 ---- layouts/_default/.keep | 0 layouts/_default/rss.xml | 39 --------- layouts/_default/single.html | 28 ------- layouts/index.jsonfeed.json | 21 ----- layouts/partials/analytics.html | 24 ------ layouts/partials/icons.html | 9 +++ layouts/partials/newsletter.html | 6 ++ layouts/partials/sidebar.html | 125 +++++++++++++++++++++++++++++ 17 files changed, 166 insertions(+), 167 deletions(-) create mode 100644 data/.keep delete mode 100644 data/menu.yaml delete mode 100644 data/social.yaml create mode 100644 layouts/_default/.keep delete mode 100644 layouts/_default/rss.xml delete mode 100644 layouts/_default/single.html delete mode 100644 layouts/index.jsonfeed.json delete mode 100644 layouts/partials/analytics.html create mode 100644 layouts/partials/newsletter.html create mode 100644 layouts/partials/sidebar.html diff --git a/archetypes/post.md b/archetypes/post.md index 848ccb8..21bf734 100644 --- a/archetypes/post.md +++ b/archetypes/post.md @@ -14,5 +14,8 @@ figurePositionShow = false keywords = [] tags = [] categories = [] +showReadTime = true +showShare = true +showRelatedInArticle = false +++ diff --git a/config/_default/config.toml b/config/_default/config.toml index 03f7fbc..35b085e 100644 --- a/config/_default/config.toml +++ b/config/_default/config.toml @@ -18,19 +18,14 @@ DefaultContentLanguage = "en" # [menus] # config/_default/menus/menu.xx.toml -# [outputs] -# home = ["HTML", "RSS", "JSON"] -# page = ["html"] +[taxonomies] +category = "categories" +tag = "tags" +series = "series" [outputs] - home = ["html", "jsonfeed","rss"] - page = ["html"] - -[outputFormats] - [outputFormats.jsonfeed] - mediaType = "application/json" - baseName = "feed" - isPlainText = true +home = ["HTML", "RSS", "JSON"] +page = ["html"] [sitemap] changefreq = "weekly" diff --git a/config/_default/configTaxo.toml b/config/_default/configTaxo.toml index cf46504..beb5961 100644 --- a/config/_default/configTaxo.toml +++ b/config/_default/configTaxo.toml @@ -2,11 +2,6 @@ timeout = 30000 enableInlineShortcodes = true footnoteReturnLinkContents = "^" -[taxonomies] -category = "categories" -tag = "tags" -series = "series" - [privacy] [privacy.vimeo] diff --git a/config/_default/languages.toml b/config/_default/languages.toml index 59de6ae..b3ff308 100644 --- a/config/_default/languages.toml +++ b/config/_default/languages.toml @@ -1,6 +1,6 @@ [en] - title = "Clarity" + title = "Salar Rahmanian" LanguageName = "English" weight = 1 diff --git a/config/_default/menus/menu.en.toml b/config/_default/menus/menu.en.toml index 49bf7bc..160e20f 100644 --- a/config/_default/menus/menu.en.toml +++ b/config/_default/menus/menu.en.toml @@ -1,7 +1,7 @@ -[[main]] - name = "Salar Rahmanian" - url = "" - weight = -110 +# [[main]] +# name = "Home" +# url = "" +# weight = -110 [[main]] name = "About" @@ -66,12 +66,16 @@ weight = 5 url = "https://softin.io/youtube" [[social]] - name = "mastedon" + name = "matrix" weight = 6 + url = "https://matrix.to/#/@softinio:matrix.org" +[[social]] + name = "mastedon" + weight = 7 url = "https://fosstodon.org/@softinio" [[social]] name = "rss" - weight = 7 + weight = 8 url = "index.xml" # other supported social links diff --git a/config/_default/params.toml b/config/_default/params.toml index 041ac3b..53a7d35 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -13,9 +13,6 @@ keywords = ["Salar", "Rahmanian", "Salar Rahmanian", "Blog", "python", "scala", # Google analytics Id ga_analytics = "G-XZR9K3MDHX" -# Matomo ID -matomo_site_id = "2" - # limit the number of taxonomies links shown on the sidebar of each page by default. numberOfTagsShown = 14 # Applies for all other default & custom taxonomies. e.g categories, brands see https://gohugo.io/content-management/taxonomies#what-is-a-taxonomy @@ -37,7 +34,7 @@ usePageBundles = false # the originals to get the files included with Hugo Clarity. # # Images: -imagesDir = "img/" # without a leading forward slash +imagesDir = "images/" # without a leading forward slash # Icons: iconsDir = "icons/" # without a leading forward slash # Fonts: @@ -140,10 +137,11 @@ websiteDomain = "example.com" # domain name of your website, most cases same as # scritpName = "plausible" # default is set to plausible, only required if using a custome name for script [matomo_analytics] -enable = false # To enable matomo analytics change to `true`. -websiteDomain = "example.com" # Set the domain name of your website, in most cases same as your base URL this is required. -matomoDomain = "matomo.example.com" # Set to Matomo domain -matomoSiteID = "1" # Default is set to 1, change this to the siteid being tracked +enable = true # To enable matomo analytics change to `true`. +websiteDomain = "www.softinio.com" # Set the domain name of your website, in most cases same as your base URL this is required. +matomoDomain = "softinio.dev/matomo/" # Set to Matomo domain + +matomoSiteID = "2" # Default is set to 1, change this to the siteid being tracked [giscus] enable = true diff --git a/data/.keep b/data/.keep new file mode 100644 index 0000000..e69de29 diff --git a/data/menu.yaml b/data/menu.yaml deleted file mode 100644 index 4077b6e..0000000 --- a/data/menu.yaml +++ /dev/null @@ -1,9 +0,0 @@ -- name: About - link: about -- name: Resumé - link: resume -- name: Newsletter - link: http://newsletter.softinio.com -- name: Watch - link: https://watch.softinio.com/c/softinio/videos - diff --git a/data/social.yaml b/data/social.yaml deleted file mode 100644 index 28979ec..0000000 --- a/data/social.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- item: "gitea" - url: "https://git.softinio.com/softinio" -- item: "github" - url: "https://github.com/softinio" -- item: "twitter" - url: "https://twitter.com/SalarRahmanian" -- item: "linkedin" - url: "https://www.linkedin.com/in/salarrahmanian/" -- item: "youtube" - url: "https://softin.io/youtube" -- item: "mastedon" - url: "https://fosstodon.org/@softinio" -- item: "rss" - url: "index.xml" - internal: true diff --git a/layouts/_default/.keep b/layouts/_default/.keep new file mode 100644 index 0000000..e69de29 diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml deleted file mode 100644 index e49c966..0000000 --- a/layouts/_default/rss.xml +++ /dev/null @@ -1,39 +0,0 @@ -{{- $pctx := . -}} -{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} -{{- $pages := slice -}} -{{- if or $.IsHome $.IsSection -}} -{{- $pages = $pctx.RegularPages -}} -{{- else -}} -{{- $pages = $pctx.Pages -}} -{{- end -}} -{{- $limit := .Site.Config.Services.RSS.Limit -}} -{{- if ge $limit 1 -}} -{{- $pages = $pages | first $limit -}} -{{- end -}} -{{- printf "" | safeHTML }} - - - {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} - {{ .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/layouts/_default/single.html b/layouts/_default/single.html deleted file mode 100644 index c802773..0000000 --- a/layouts/_default/single.html +++ /dev/null @@ -1,28 +0,0 @@ -{{- define "main" }} -{{- $scratch := newScratch }} -{{- if isset .Params "image" }} - {{- $scratch.Set "image" .Params.image }} -{{- else }} - {{ $scratch.Set "image" .Site.Params.fallBackOgImage }} -{{- end }} -{{- $image := $scratch.Get "image" }} -{{- $bg := (path.Join "images" $image | absLangURL) }} -
-
-

{{ .Title }}

- {{- partial "post-meta" . }} - {{ partial "share" . }} - {{ with .Params.featureImage }} - - {{ end }} - {{ if .Params.toc }} -

Overview

- {{ .TableOfContents }} - {{ end }} - {{- .Content }} -
- {{- partial "sidebar" . }} - -{{ partial "comments.html" . }} -
-{{- end }} diff --git a/layouts/index.jsonfeed.json b/layouts/index.jsonfeed.json deleted file mode 100644 index 1e0d890..0000000 --- a/layouts/index.jsonfeed.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": "https://jsonfeed.org/version/1", - "title": "{{ .Site.Title }}", - "home_page_url": {{ .Permalink | jsonify }}, - "feed_url": {{ with .OutputFormats.Get "jsonfeed" -}} - {{- .Permalink | jsonify -}} - {{- end }}, - "items": [ - {{ range $index, $entry := first 10 .Data.Pages }} - {{- if $index }}, {{ end }} - { - "id": {{ .Permalink | jsonify }}, - "url": {{ .Permalink | jsonify }}, - "title": {{ .Title | jsonify }}, - "date_published": {{ .Date.Format "2006-01-02T15:04:05Z07:00" | jsonify }}, - "content_html": {{ .Content | jsonify }} - } - {{- end }} - ] -} - diff --git a/layouts/partials/analytics.html b/layouts/partials/analytics.html deleted file mode 100644 index f8673f4..0000000 --- a/layouts/partials/analytics.html +++ /dev/null @@ -1,24 +0,0 @@ -{{- with .Site.Params.ga_analytics }} - - -{{- end -}} -{{- with .Site.Params.matomo_site_id }} - -{{- end -}} - diff --git a/layouts/partials/icons.html b/layouts/partials/icons.html index 8650aab..897ea7b 100644 --- a/layouts/partials/icons.html +++ b/layouts/partials/icons.html @@ -54,5 +54,14 @@ + + + + + + + + + diff --git a/layouts/partials/newsletter.html b/layouts/partials/newsletter.html new file mode 100644 index 0000000..5827cb8 --- /dev/null +++ b/layouts/partials/newsletter.html @@ -0,0 +1,6 @@ +

Subscribe

+
+Subscribe to my newsletter +
+subscribe + diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html new file mode 100644 index 0000000..ee89e91 --- /dev/null +++ b/layouts/partials/sidebar.html @@ -0,0 +1,125 @@ +{{ $s := site.Params }} + +