From 1013f0a5a21d596eefea860c4129d9cad34cb219 Mon Sep 17 00:00:00 2001 From: Balakrishnan Balasubramanian Date: Sat, 15 Jul 2023 20:10:41 -0400 Subject: [PATCH] basic blog --- hugo/content/{index.md => _index.md} | 4 +++- hugo/content/posts/firstpost.md | 5 +++++ hugo/layouts/_default/baseof.html | 20 +++++++++++--------- hugo/layouts/_default/list.html | 11 ++++------- hugo/layouts/_default/single.html | 9 +++++---- hugo/layouts/index.html | 10 ++++++++++ hugo/layouts/partials/postcard.html | 6 ++++++ 7 files changed, 44 insertions(+), 21 deletions(-) rename hugo/content/{index.md => _index.md} (50%) create mode 100644 hugo/layouts/index.html create mode 100644 hugo/layouts/partials/postcard.html diff --git a/hugo/content/index.md b/hugo/content/_index.md similarity index 50% rename from hugo/content/index.md rename to hugo/content/_index.md index 0e88572..1e98f71 100644 --- a/hugo/content/index.md +++ b/hugo/content/_index.md @@ -8,4 +8,6 @@ Welcome to Balki's Blog ----------------------- -I am Balakrishnan Balasubramanian (a) balki. Nothing much here. Checkout the nav bar above for interesting stuff. +I am Balakrishnan Balasubramanian (a) balki. + +Nothing much here. Checkout the nav bar above for interesting stuff. diff --git a/hugo/content/posts/firstpost.md b/hugo/content/posts/firstpost.md index c32be7a..ba5c328 100644 --- a/hugo/content/posts/firstpost.md +++ b/hugo/content/posts/firstpost.md @@ -10,3 +10,8 @@ Hello world So far good! :) + + +```vim +:call term_list()[0]->term_sendkeys(getline('.') .. "\") +``` diff --git a/hugo/layouts/_default/baseof.html b/hugo/layouts/_default/baseof.html index e37e02e..c705aba 100644 --- a/hugo/layouts/_default/baseof.html +++ b/hugo/layouts/_default/baseof.html @@ -19,16 +19,18 @@ - -
+ +
{{ block "main" . }} {{ end }} diff --git a/hugo/layouts/_default/list.html b/hugo/layouts/_default/list.html index 5defdd6..192c2e5 100644 --- a/hugo/layouts/_default/list.html +++ b/hugo/layouts/_default/list.html @@ -1,9 +1,6 @@ {{ define "main" }} -

Posts

- {{ range .Pages }} -
-

{{ .Title }}

- {{ .Content }} -
- {{ end }} +

Posts

+ {{ range .Pages }} + {{ partial "postcard" . }} + {{ end }} {{ end }} diff --git a/hugo/layouts/_default/single.html b/hugo/layouts/_default/single.html index 9122029..6124b1b 100644 --- a/hugo/layouts/_default/single.html +++ b/hugo/layouts/_default/single.html @@ -1,9 +1,10 @@ {{ define "title" }} - {{ .Title }} – {{ .Site.Title }} + {{ .Title }} – {{ .Site.Title }} {{ end }} {{ define "main" }} -

{{ .Title }}

- {{ .Content }} +
+

{{ .Title }}

+ {{ .Content }} +
{{ end }} - diff --git a/hugo/layouts/index.html b/hugo/layouts/index.html new file mode 100644 index 0000000..4967d5c --- /dev/null +++ b/hugo/layouts/index.html @@ -0,0 +1,10 @@ +{{ define "main" }} +
+ {{ .Content }} + {{ range .Pages }} + {{ range .Pages }} + {{ partial "postcard" . }} + {{ end }} + {{ end }} +
+{{ end }} diff --git a/hugo/layouts/partials/postcard.html b/hugo/layouts/partials/postcard.html new file mode 100644 index 0000000..371ee99 --- /dev/null +++ b/hugo/layouts/partials/postcard.html @@ -0,0 +1,6 @@ +
+
+

{{ .Title }}

+

{{ .Summary }}

+
+