summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/default.html5
-rw-r--r--templates/index.html54
-rw-r--r--templates/layouts/_default.html (renamed from templates/layouts/default.html)2
-rw-r--r--templates/post.html6
-rw-r--r--templates/posts.html9
5 files changed, 6 insertions, 70 deletions
diff --git a/templates/default.html b/templates/default.html
new file mode 100644
index 0000000..3d68d2c
--- /dev/null
+++ b/templates/default.html
@@ -0,0 +1,5 @@
+{{template "base" .}}
+{{define "content"}}
+<h1>{{.Meta.title}}</h1>
+{{ .Body }}
+{{end}} \ No newline at end of file
diff --git a/templates/index.html b/templates/index.html
deleted file mode 100644
index e84a09e..0000000
--- a/templates/index.html
+++ /dev/null
@@ -1,54 +0,0 @@
-{{template "base" .}}
-{{define "content"}}
- <ul>
- <li>backend cloud software engineer</li>
- <li>lang: go</li>
- <li>infra: kubernetes</li>
- </ul>
- <h2>tidbits</h2>
- <h3>#go</h3>
- <ul>
- <li>layout packages by what they do, not by their abstract type</li>
- <li>use channels sparingly. write synchronous methods and allow the caller to make it async</li>
- <li><code>append</code> modifies the underlying slice, you'll only make this mistake once</li>
- <li>define interfaces where you use them</li>
- <li><code>make([]int, 5)</code> has a length and capacity of 5. <code>([]int, 0,5)</code> has a length
- of 0 and capacity of 5.
- <br />
- <code>append()</code> will only do what you want with the latter
- </li>
- <li>don't use <code>init()</code></li>
- <li>TFBO (test, fix, benchmark, optimise)</li>
- <li>more CPU != more performance
- <br/>
- more CPU == more Contention
- </li>
- </ul>
- <h3>#git</h3>
- <ul>
- <li><code>git reflog</code></li>
- <li><code>git commit --fixup=&lt;COMMITISH&gt;</code>
- <br />
- <code>git rebase origin/main --autosquash</code>
- </li>
- </ul>
-
- <h2>resources</h2>
- <ul>
- <li><a href=https://cs.opensource.google/go/go/+/refs/tags/go1.23.0:src/runtime/proc.go><code>proc.go</code></a></li>
- <li><a href=https://github.com/golang/go/issues/67120>proposal: runtime/metrics: define a recommended set of metrics</a></li>
- </ul>
- <h2>books</h2>
- <ul>
- <li><a href=https://www.oreilly.com/library/view/designing-data-intensive-applications/9781491903063 />Designing
- Data Intensive Applications</a></li>
- <li><a href=https://www.oreilly.com/library/view/database-internals/9781492040330 />Database Internals
- </a>
- </li>
- <li>
- <a href=https://www.oreilly.com/library/view/efficient-go/9781098105709 /> Efficient Go</a>
-
- </li>
-
- </ul>
-{{end}}
diff --git a/templates/layouts/default.html b/templates/layouts/_default.html
index 14868cf..beab01e 100644
--- a/templates/layouts/default.html
+++ b/templates/layouts/_default.html
@@ -61,7 +61,7 @@
<nav>
<ul>
<li><a href="/">home</a></li>
- <li><a href="/posts.html">posts</a></li>
+ <li><a href="/posts">posts</a></li>
</ul>
</nav>
{{ template "content" . }}
diff --git a/templates/post.html b/templates/post.html
deleted file mode 100644
index 0a6cc6e..0000000
--- a/templates/post.html
+++ /dev/null
@@ -1,6 +0,0 @@
-{{template "base" .}}
-{{define "content"}}
-<h1>{{.Title}}</h1>
-{{ .Post }}
-{{end}}
-
diff --git a/templates/posts.html b/templates/posts.html
deleted file mode 100644
index c68fb73..0000000
--- a/templates/posts.html
+++ /dev/null
@@ -1,9 +0,0 @@
-{{template "base" .}}
-{{define "content"}}
-<h1>posts</h1>
-<ul>
- {{range .Posts}}
- <li><a href="{{.Path}}">{{.Title}}</a></li>
-{{end}}
-</ul>
-{{end}}