mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 22:16:07 +01:00
Importer to a good spot?
This commit is contained in:
parent
b97582edf9
commit
260e3697f6
1 changed files with 2 additions and 4 deletions
|
@ -96,7 +96,7 @@ func outputArticle(article Article, outputDir string) error {
|
||||||
articlePath = dirArticlePath
|
articlePath = dirArticlePath
|
||||||
}
|
}
|
||||||
|
|
||||||
fm, body, _ := loadFrontmatter(articlePath)
|
fm, _, _ := loadFrontmatter(articlePath)
|
||||||
|
|
||||||
hugoPost, err := os.Create(articlePath)
|
hugoPost, err := os.Create(articlePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -107,9 +107,7 @@ func outputArticle(article Article, outputDir string) error {
|
||||||
fm.Date = article.BookmarkDate.Format(time.RFC3339)
|
fm.Date = article.BookmarkDate.Format(time.RFC3339)
|
||||||
}
|
}
|
||||||
|
|
||||||
if body == "" {
|
body := strings.TrimSpace(article.Annotation)
|
||||||
body = strings.TrimSpace(article.Annotation)
|
|
||||||
}
|
|
||||||
|
|
||||||
if fm.Summary == "" {
|
if fm.Summary == "" {
|
||||||
var summary string
|
var summary string
|
||||||
|
|
Loading…
Reference in a new issue