diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -31,6 +31,9 @@ type Page struct { TOC []TOCItem } +type Post struct { + Title string +} type Frontmatter struct { Title string `yaml:"title"` } @@ -39,6 +42,8 @@ func main() { contentDir := "./content" outputDir := "./output" + posts := make([]Post, 0) + themeName := "modern-light" args := os.Args @@ -72,6 +77,8 @@ func main() { fmt.Println("Processing:", path) title, htmlContent, toc := convertToHtml(path) + posts = append(posts, Post{Title: title}) + // fmt.Println("Appended post", posts) newPage := Page{ Title: title, Content: template.HTML(htmlContent), @@ -115,6 +122,8 @@ func main() { } fmt.Println("All files processed!") + + fmt.Println(posts) } func convertToHtml(path string) (string, []byte, []TOCItem) { |
