mirror of
https://github.com/gohugoio/hugo.git
synced 2025-02-17 04:51:07 +00:00
commands: Improve jekyll import date format
Allow both yyyy-mm-dd and yyyy-m-d formats in jekyll markdown file names.
This commit is contained in:
parent
4b9493cb03
commit
62efcdfed4
1 changed files with 1 additions and 1 deletions
|
@ -372,7 +372,7 @@ func parseJekyllFilename(filename string) (time.Time, string, error) {
|
||||||
return time.Now(), "", errors.New("filename not match")
|
return time.Now(), "", errors.New("filename not match")
|
||||||
}
|
}
|
||||||
|
|
||||||
postDate, err := time.Parse("2006-01-02", r[0][1])
|
postDate, err := time.Parse("2006-1-2", r[0][1])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return time.Now(), "", err
|
return time.Now(), "", err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue