summaryrefslogtreecommitdiff
path: root/markdown/markdown.go
diff options
context:
space:
mode:
authora73x <[email protected]>2024-08-27 20:29:39 +0100
committera73x <[email protected]>2024-08-27 20:29:39 +0100
commite4288632856f79952fc25b17ced4895a51f6aefd (patch)
tree44a00497ea561158a74eba62fba4c29ad91fb9e8 /markdown/markdown.go
parentd38fc83df3824b840f0b3930e4cb7236bdab84b2 (diff)
chore(embed): refactor embed fs
Diffstat (limited to 'markdown/markdown.go')
-rw-r--r--markdown/markdown.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/markdown/markdown.go b/markdown/markdown.go
index 0924208..92db876 100644
--- a/markdown/markdown.go
+++ b/markdown/markdown.go
@@ -7,7 +7,7 @@ import (
"path/filepath"
"strings"
- "git.sr.ht/~a73x/home"
+ "git.sr.ht/~a73x/home/content"
"github.com/adrg/frontmatter"
)
@@ -18,18 +18,18 @@ type Content struct {
}
func ParseContents() ([]Content, error) {
- contentFS, err := fs.Sub(home.Content, "content")
- if err != nil {
- return nil, fmt.Errorf("no content found: %v", err)
- }
- contentFiles, err := glob(contentFS, ".", ".md")
+ // contentFS, err := fs.Sub(content.FS, "content")
+ // if err != nil {
+ // return nil, fmt.Errorf("no content found: %v", err)
+ // }
+ contentFiles, err := glob(content.FS, ".", ".md")
if err != nil {
return nil, fmt.Errorf("failed to glob: %v", err)
}
res := make([]Content, 0, len(contentFiles))
for _, contentFile := range contentFiles {
- c, err := parseMarkdownFile(contentFS, contentFile)
+ c, err := parseMarkdownFile(content.FS, contentFile)
if err != nil {
return nil, fmt.Errorf("failed to read markdown file: %v", err)
}