basic blog

This commit is contained in:
Balakrishnan Balasubramanian 2023-07-15 20:10:41 -04:00
parent 603d1d05e3
commit 1013f0a5a2
7 changed files with 44 additions and 21 deletions

View File

@ -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.

View File

@ -10,3 +10,8 @@ Hello world
So far good! :)
<!--more-->
```vim
:call term_list()[0]->term_sendkeys(getline('.') .. "\<CR>")
```

View File

@ -19,6 +19,8 @@
<body>
<div class="container" >
<aside>
<nav>
<ul class="nav">
<li class="nav-item"><a class="nav-link" href="/"> Home </a></li>
@ -27,8 +29,8 @@
<li class="nav-item"><a class="nav-link" href="https://gitea.balki.me/balki/blog"> Source </a></li>
</ul>
</nav>
</aside>
<div class="container" >
<main>
{{ block "main" . }}
{{ end }}

View File

@ -1,9 +1,6 @@
{{ define "main" }}
<h1>Posts</h1>
{{ range .Pages }}
<article>
<h2>{{ .Title }}</h2>
{{ .Content }}
</article>
{{ partial "postcard" . }}
{{ end }}
{{ end }}

View File

@ -2,8 +2,9 @@
{{ .Title }} &ndash; {{ .Site.Title }}
{{ end }}
{{ define "main" }}
<h1>{{ .Title }}</h1>
<article>
<h1 class="display-3 text-center">{{ .Title }}</h1>
{{ .Content }}
</article>
{{ end }}

10
hugo/layouts/index.html Normal file
View File

@ -0,0 +1,10 @@
{{ define "main" }}
<article>
{{ .Content }}
{{ range .Pages }}
{{ range .Pages }}
{{ partial "postcard" . }}
{{ end }}
{{ end }}
</article>
{{ end }}

View File

@ -0,0 +1,6 @@
<div class="card">
<div class="card-body">
<a href="{{ .RelPermalink }}" ><h2 class="card-title">{{ .Title }}</h2></a>
<p class="card-text"> {{ .Summary }} </p>
</div>
</div>