mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02: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:
committed by
Bjørn Erik Pedersen
parent
4b9493cb03
commit
62efcdfed4
@@ -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
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user