1
0
mirror of https://github.com/danog/gojekyll.git synced 2024-11-30 06:19:00 +01:00

-d can contain a dot

This commit is contained in:
Oliver Steele 2017-08-09 09:08:32 -04:00
parent 9a4759b0a5
commit f773473860

View File

@ -43,10 +43,11 @@ func (s *Site) WriteFiles() (count int, err error) {
// It attends to options.dry_run.
func (s *Site) WriteDoc(d pages.Document) error {
from := d.SourcePath()
to := filepath.Join(s.DestDir(), d.Permalink())
if !d.Static() && filepath.Ext(to) == "" {
to = filepath.Join(to, "index.html")
rel := d.Permalink()
if !d.Static() && filepath.Ext(rel) == "" {
rel = filepath.Join(rel, "index.html")
}
to := filepath.Join(s.DestDir(), rel)
if s.config.Verbose {
fmt.Println("create", to, "from", d.SourcePath())
}