mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-27 05:01:51 +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")
|
||||
}
|
||||
|
||||
postDate, err := time.Parse("2006-01-02", r[0][1])
|
||||
postDate, err := time.Parse("2006-1-2", r[0][1])
|
||||
if err != nil {
|
||||
return time.Now(), "", err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue