diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..d773fdd --- /dev/null +++ b/.editorconfig @@ -0,0 +1,43 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true + +# 4 space indentation (no tabs) +[*.{js,jsx,ts,tsx,html,css,scss,md}] +indent_style = space +indent_size = 4 + +# Set charset +[*.{js,jsx,ts,tsx,html,css,scss,md}] +charset = utf-8 + +# For Go files +[*.go] +indent_style = space +indent_size = 4 + +# For Python files +[*.py] +indent_style = space +indent_size = 4 + +# For JSON files +[*.json] +indent_style = space +indent_size = 2 + +# For YAML files +[*.{yaml,yml}] +indent_style = space +indent_size = 2 + +# For TOML files +[*.toml] +indent_style = space +indent_size = 2 diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 49040ab..5a5abd9 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -6,14 +6,14 @@

{{ .Title }}

@@ -126,4 +126,4 @@ {{ end }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/author/index.html.old b/layouts/author/index.html.old new file mode 100644 index 0000000..3507637 --- /dev/null +++ b/layouts/author/index.html.old @@ -0,0 +1,161 @@ +{{ define "main" }} + +
+
+

Authors

+

Discover all our talented authors and their contributions

+
+
+ + +
+
+
+ {{ $authors := slice }} + {{ $authorMap := dict }} + + + {{ range .Site.RegularPages }} + {{ if .Params.author }} + {{ $authorName := .Params.author }} + {{ $authorSlug := .Params.author_slug | default ($authorName | urlize) }} + + + {{ $existing := false }} + {{ range $authors }} + {{ if eq .name $authorName }} + {{ $existing = true }} + {{ end }} + {{ end }} + + + {{ if not $existing }} + {{ $author := dict + "name" $authorName + "slug" $authorSlug + "bio" .Params.author_bio + "photo" .Params.author_photo + "website" .Params.author_website + "twitter" .Params.author_twitter + "linkedin" .Params.author_linkedin + "posts" (slice) + }} + {{ $authors = $authors | append $author }} + {{ $authorMap = merge $authorMap (dict $authorName $author) }} + {{ end }} + + + {{ if $author := index $authorMap $authorName }} + {{ $post := dict + "title" .Title + "permalink" .Permalink + }} + {{ $author := merge $author (dict "posts" ($author.posts | append $post)) }} + {{ $authorMap = merge $authorMap (dict $authorName $author) }} + {{ end }} + {{ end }} + {{ end }} + + + {{ if gt (len $authors) 0 }} + {{ range $authors }} +
+
+
+ {{ if .photo }} + {{ .name }} + {{ else }} + {{ .name }} + {{ end }} +
+
{{ .name }}
+ {{ if .bio }} +

{{ .bio | truncate 120 }}

+ {{ end }} + +
+ {{ if .website }} + + + + {{ end }} + {{ if .twitter }} + + + + {{ end }} +
+ {{ if .linkedin }} + + + + {{ end }} +
+ + +
+
+
+ {{ end }} + {{ else }} +
+

No authors found

+

No authors have been added yet. Check back soon!

+
+ {{ end }} +
+
+
+ + +{{ if gt (len $authors) 0 }} +
+
+
+
+

Our Authors

+

+ Meet the talented writers and contributors who bring you insightful content across various topics. + Each author brings their unique perspective and expertise to create valuable content for our readers. +

+
+
+ +
+
+
+ {{ range $authors }} +
+
+
+ {{ if .photo }} + {{ .name }} + {{ else }} +
+ +
+ {{ end }} +
+
+
{{ .name }}
+ {{ len .posts }} {{ if eq (len .posts) 1 }}publication{{ else }}publications{{ end }} +
+
+ + + +
+
+
+ {{ end }} +
+
+
+
+
+{{ end }} +{{ end }} diff --git a/layouts/authors/list.html b/layouts/author/list.html similarity index 100% rename from layouts/authors/list.html rename to layouts/author/list.html