aboutsummaryrefslogtreecommitdiffhomepage
path: root/commands
diff options
context:
space:
mode:
authorsatotake <[email protected]>2022-05-22 03:41:28 +0900
committerBjørn Erik Pedersen <[email protected]>2022-05-21 23:44:40 +0200
commit2fc2e9c8718db2fe60f03bcf3661f449851cfe5f (patch)
tree52de73bc39f260a3800c415fffa0f9cc0c44f6a7 /commands
parente164834f0aaaf1c58489fab41f5835b66f16b87c (diff)
downloadhugo-2fc2e9c8718db2fe60f03bcf3661f449851cfe5f.tar.gz
hugo-2fc2e9c8718db2fe60f03bcf3661f449851cfe5f.zip
import: Fix importing jekyll site
Just use `afero.OsFs` without building site. Close #9817
Diffstat (limited to 'commands')
-rw-r--r--commands/import_jekyll.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/commands/import_jekyll.go b/commands/import_jekyll.go
index 232df519c..91d5c69fe 100644
--- a/commands/import_jekyll.go
+++ b/commands/import_jekyll.go
@@ -36,7 +36,6 @@ import (
"github.com/gohugoio/hugo/common/maps"
"github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/hugofs"
- "github.com/gohugoio/hugo/hugolib"
"github.com/gohugoio/hugo/parser"
"github.com/spf13/afero"
"github.com/spf13/cobra"
@@ -202,12 +201,7 @@ func (i *importCmd) retrieveJekyllPostDir(fs afero.Fs, dir string) (bool, bool)
}
func (i *importCmd) createSiteFromJekyll(jekyllRoot, targetDir string, jekyllPostDirs map[string]bool, force bool) error {
- s, err := hugolib.NewSiteDefaultLang()
- if err != nil {
- return err
- }
-
- fs := s.Fs.Source
+ fs := &afero.OsFs{}
if exists, _ := helpers.Exists(targetDir, fs); exists {
if isDir, _ := helpers.IsDir(targetDir, fs); !isDir {
return errors.New("target path \"" + targetDir + "\" exists but is not a directory")