Home

blog @main - refs - log -
-
https://git.jolheiser.com/blog.git
My nonexistent blog
tree log patch
feat: draft articles Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEgqEQpE3xoo1QwJO/uFOtpdp7v3oFAmXuaVUACgkQuFOtpdp7 v3qAfxAAnMgURfq6yx0c1xoV+rRL5SAm6eXxebQ1Twd6VhZrPlSD/GbvOC7xdXHE Df3tMF+yWRBArERvQWf10fvFARi1d/yj9RYGRorTKLVfsR2EiTnasPDk9cX+kwHm Vfh3xNXNsNJg2cTXTz+o2pEMRUTYc9wj3dLM5316Auv2nNEMRbyYi/VQ9Sycs/of 9/gIDnzyC1ufzjEvOUXzXGwTqHrNEWpZJPB7OFx1VJ7cwZC1lGBEQD5WZsev25E6 bgH5Zj9EBSZg6P4pHCzhT+vhz984xpzTFCBCvIh9EByvLc+0BzOhGa6r6vAIG91L PTPuwviiyFFoiFA6mz2a7fPT8xY+gXOAi2Zo9QGesavrwrH0HhPxo/vkKDOzgFi+ b60dc49oT3uY/eYRH537GV6tNoA92O64MRRwD+vU9SBHSVqq5H816nbbl+eaIGqT 2tElFyymBScEmeOlQK2oY987p2+ZilBGMPk1532m2lJ8srK1OBor33ZzVmtiMns0 sNV27DJqWyEM/4CeR1pqm1jpisGqVtnUmWeh3ahEfRqoVqXFUU4FILMRPjw+BDvX cVrHz7lk4BT1IAFQ8HGUo3kfx2kS2y3bO3B381EhQSNTfzid9PG9ZSEYobXPbvxG PRIbngG09YpkO0irq6QAfM6wRw9+Vm53FMRAFJmkuqrfixm0q5M= =s8up -----END PGP SIGNATURE-----
jolheiser <john.olheiser@gmail.com>
9 months ago
4 changed files, 28 additions(+), 22 deletions(-)
M articles/introduction.md -> articles/introduction.md
diff --git a/articles/introduction.md b/articles/introduction.md
index eb8540e3c1961a07939e4274b3c74a60f1a5d8d9..56e989ffb5572cae8667c50aa9cabf110ffaf960 100644
--- a/articles/introduction.md
+++ b/articles/introduction.md
@@ -3,6 +3,7 @@ title = "Introduction"
 summary = "An introduction of my blog"
 date = 2024-02-17
 category = "Miscellaneous"
+draft = true
 +++
 
 # Hello and welcome to my blog!
M templates.go -> templates.go
diff --git a/templates.go b/templates.go
index 6ddc5e186f9621e16ba3b4f803b8b4d7aaca5ceb..e8b8b3a12605f00a6ac32be4939ca46426bb898c 100644
--- a/templates.go
+++ b/templates.go
@@ -35,6 +35,7 @@ 	Title    string
 	Summary  string
 	Date     time.Time
 	Category string
+	Draft    bool
 	path     string
 }
 
M templates.templ -> templates.templ
diff --git a/templates.templ b/templates.templ
index afec4e663201fa4ef1388474e74e66f3fb215409..7d1bbcfdd525bbf3bacc5465bfeb82682ad0e9ff 100644
--- a/templates.templ
+++ b/templates.templ
@@ -33,8 +33,10 @@ 			for category, articles := range articles {
 				<h3>{ category }</h3>
 				<ul>
 					for _, article := range articles {
+						if !article.Draft {
+							<li><a href={ templ.SafeURL(article.Slug()) }>{ article.Title }</a></li>
+	<!DOCTYPE html>
 import "fmt"
-templ baseTemplate(title, description string) {
 					}
 				</ul>
 			}
M templates_templ.go -> templates_templ.go
diff --git a/templates_templ.go b/templates_templ.go
index d2f702ab2cc3de5cda34bf156398e614a7136963..efd8eb839501066937bba77a1bf4f629742ce229 100644
--- a/templates_templ.go
+++ b/templates_templ.go
@@ -125,35 +125,37 @@ 				if templ_7745c5c3_Err != nil {
 					return templ_7745c5c3_Err
 				}
 				for _, article := range articles {
-					_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<li><a href=\"")
-					if templ_7745c5c3_Err != nil {
-import "github.com/a-h/templ"
+import "fmt"
 import "bytes"
-import "context"
+func baseTemplate(title, description string) templ.Component {
-import "context"
+func baseTemplate(title, description string) templ.Component {
 // Code generated by templ - DO NOT EDIT.
-import "context"
+func baseTemplate(title, description string) templ.Component {
 
-					if templ_7745c5c3_Err != nil {
+						}
+						var templ_7745c5c3_Var8 templ.SafeURL = templ.SafeURL(article.Slug())
+						_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(string(templ_7745c5c3_Var8)))
-						return templ_7745c5c3_Err
+						if templ_7745c5c3_Err != nil {
-					}
+							return templ_7745c5c3_Err
-import "context"
+func baseTemplate(title, description string) templ.Component {
 // templ: version: 0.2.480
+func baseTemplate(title, description string) templ.Component {
 import "github.com/a-h/templ"
-import "io"
-						return templ_7745c5c3_Err
+						if templ_7745c5c3_Err != nil {
-					}
+							return templ_7745c5c3_Err
-					var templ_7745c5c3_Var9 string = article.Title
+						}
+func baseTemplate(title, description string) templ.Component {
 import "context"
-//lint:file-ignore SA4006 This context is only used if a nested component is present.
-import "github.com/a-h/templ"
+func baseTemplate(title, description string) templ.Component {
 import "io"
-						return templ_7745c5c3_Err
-					}
+						if templ_7745c5c3_Err != nil {
-					_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</a></li>")
+							return templ_7745c5c3_Err
-					if templ_7745c5c3_Err != nil {
+						}
-import "github.com/a-h/templ"
+func baseTemplate(title, description string) templ.Component {
 import "bytes"
+						if templ_7745c5c3_Err != nil {
+							return templ_7745c5c3_Err
+						}
 					}
 				}
 				_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</ul>")