mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 01:35:56 +01:00
Allow importing to folders
This commit is contained in:
parent
440985937b
commit
63ba395f5b
1 changed files with 5 additions and 0 deletions
|
@ -89,6 +89,11 @@ func outputArticle(article Article, outputDir string) error {
|
|||
|
||||
slug := kebab(artTitle)
|
||||
articlePath := path.Join(outputDir, fmt.Sprintf("%s.md", slug))
|
||||
dirArticlePath := path.Join(outputDir, slug, "index.md")
|
||||
|
||||
if _, err := os.Stat(dirArticlePath); os.IsNotExist(err) {
|
||||
articlePath = dirArticlePath
|
||||
}
|
||||
|
||||
fm, _ := loadFrontmatter(articlePath)
|
||||
|
||||
|
|
Loading…
Reference in a new issue