From e4288632856f79952fc25b17ced4895a51f6aefd Mon Sep 17 00:00:00 2001 From: a73x Date: Tue, 27 Aug 2024 20:29:39 +0100 Subject: chore(embed): refactor embed fs --- markdown/markdown.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'markdown') 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) } -- cgit v1.2.3