mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
81d77620c6
- Look for _config.yml, _config.yaml, or _config.toml - Fix theme submodule URL - Fix config filename in the instructions - Add tests Closes #14795 Closes #14906
63 lines
1.5 KiB
Plaintext
63 lines
1.5 KiB
Plaintext
# Test the import + import jekyll command.
|
|
|
|
hugo import -h
|
|
stdout 'Import a project from another system'
|
|
|
|
hugo import jekyll -h
|
|
stdout 'hugo import from Jekyll\.'
|
|
|
|
# No config file
|
|
hugo import jekyll jekyll-no-config hugo-no-config
|
|
checkfilecount 1 hugo-no-config/content/post
|
|
grep 'example\.org' hugo-no-config/hugo.yaml
|
|
|
|
# Has _config.yml file
|
|
hugo import jekyll jekyll-yml hugo-yml
|
|
checkfilecount 1 hugo-yml/content/post
|
|
grep 'https://yml\.example\.org/' hugo-yml/hugo.yaml
|
|
|
|
# Has _config.yaml file
|
|
hugo import jekyll jekyll-yaml hugo-yaml
|
|
checkfilecount 1 hugo-yaml/content/post
|
|
grep 'https://yaml\.example\.org/' hugo-yaml/hugo.yaml
|
|
|
|
# Has _config.toml file
|
|
hugo import jekyll jekyll-toml hugo-toml
|
|
checkfilecount 1 hugo-toml/content/post
|
|
grep 'https://toml\.example\.org/' hugo-toml/hugo.yaml
|
|
|
|
# Jekyll projects used by the tests above.
|
|
-- jekyll-no-config/_posts/2012-01-18-hello-world.markdown --
|
|
---
|
|
layout: post
|
|
title: "Hello World"
|
|
---
|
|
Hello world!
|
|
-- jekyll-yml/_config.yml --
|
|
title: "Jekyll YML Site"
|
|
url: "https://yml.example.org/"
|
|
-- jekyll-yml/_posts/2012-01-18-hello-world.markdown --
|
|
---
|
|
layout: post
|
|
title: "Hello World"
|
|
---
|
|
Hello world!
|
|
-- jekyll-yaml/_config.yaml --
|
|
title: "Jekyll YAML Site"
|
|
url: "https://yaml.example.org/"
|
|
-- jekyll-yaml/_posts/2012-01-18-hello-world.markdown --
|
|
---
|
|
layout: post
|
|
title: "Hello World"
|
|
---
|
|
Hello world!
|
|
-- jekyll-toml/_config.toml --
|
|
title = "Jekyll TOML Site"
|
|
url = "https://toml.example.org/"
|
|
-- jekyll-toml/_posts/2012-01-18-hello-world.markdown --
|
|
---
|
|
layout: post
|
|
title: "Hello World"
|
|
---
|
|
Hello world!
|