🖥️ wip: Feed work

This commit is contained in:
Keith Solomon
2025-04-22 07:15:22 -05:00
parent 6dd7e8874e
commit 97526cf71f
2 changed files with 11 additions and 15 deletions

19
main.go
View File

@@ -25,14 +25,15 @@ type NavItem struct {
} }
type PageMeta struct { type PageMeta struct {
Title string `yaml:"title"` Title string `yaml:"title"`
NavTitle string `yaml:"navTitle"` NavTitle string `yaml:"navTitle"`
ShowInNav *bool `yaml:"showInNav"` ShowInNav *bool `yaml:"showInNav"`
NavPosition *int `yaml:"navPosition"` NavPosition *int `yaml:"navPosition"`
Description string `yaml:"description"` Description string `yaml:"description"`
Date string `yaml:"date"` Date string `yaml:"date"`
Categories []string `yaml:"categories"` FormattedDate string `yaml:"-"`
Slug string Categories []string `yaml:"categories"`
Slug string
} }
var slugRegex = regexp.MustCompile(`[^a-z0-9]+`) var slugRegex = regexp.MustCompile(`[^a-z0-9]+`)
@@ -310,6 +311,8 @@ func processBlogPost(file os.FileInfo, blogDir, outputDir string, tpl *template.
"PageTemplate": "blog_post", "PageTemplate": "blog_post",
}) })
meta.FormattedDate = meta.Date.Format(time.RFC1123Z)
*blogPosts = append(*blogPosts, meta) *blogPosts = append(*blogPosts, meta)
} }

View File

@@ -231,9 +231,6 @@
.mb-4 { .mb-4 {
margin-bottom: calc(var(--spacing) * 4); margin-bottom: calc(var(--spacing) * 4);
} }
.block {
display: block;
}
.hidden { .hidden {
display: none; display: none;
} }
@@ -308,10 +305,6 @@
--tw-font-weight: var(--font-weight-bold); --tw-font-weight: var(--font-weight-bold);
font-weight: var(--font-weight-bold); font-weight: var(--font-weight-bold);
} }
.font-medium {
--tw-font-weight: var(--font-weight-medium);
font-weight: var(--font-weight-medium);
}
.text-green-700 { .text-green-700 {
color: var(--color-green-700); color: var(--color-green-700);
} }