| 1 |
# Test the import + import jekyll command. |
| 2 |
|
| 3 |
hugo import -h |
| 4 |
stdout 'Import a project from another system' |
| 5 |
|
| 6 |
hugo import jekyll -h |
| 7 |
stdout 'hugo import from Jekyll\.' |
| 8 |
|
| 9 |
# No config file |
| 10 |
hugo import jekyll jekyll-no-config hugo-no-config |
| 11 |
checkfilecount 1 hugo-no-config/content/post |
| 12 |
grep 'example\.org' hugo-no-config/hugo.yaml |
| 13 |
|
| 14 |
# Has _config.yml file |
| 15 |
hugo import jekyll jekyll-yml hugo-yml |
| 16 |
checkfilecount 1 hugo-yml/content/post |
| 17 |
grep 'https://yml\.example\.org/' hugo-yml/hugo.yaml |
| 18 |
|
| 19 |
# Has _config.yaml file |
| 20 |
hugo import jekyll jekyll-yaml hugo-yaml |
| 21 |
checkfilecount 1 hugo-yaml/content/post |
| 22 |
grep 'https://yaml\.example\.org/' hugo-yaml/hugo.yaml |
| 23 |
|
| 24 |
# Has _config.toml file |
| 25 |
hugo import jekyll jekyll-toml hugo-toml |
| 26 |
checkfilecount 1 hugo-toml/content/post |
| 27 |
grep 'https://toml\.example\.org/' hugo-toml/hugo.yaml |
| 28 |
|
| 29 |
# Jekyll projects used by the tests above. |
| 30 |
-- jekyll-no-config/_posts/2012-01-18-hello-world.markdown -- |
| 31 |
--- |
| 32 |
layout: post |
| 33 |
title: "Hello World" |
| 34 |
--- |
| 35 |
Hello world! |
| 36 |
-- jekyll-yml/_config.yml -- |
| 37 |
title: "Jekyll YML Site" |
| 38 |
url: "https://yml.example.org/" |
| 39 |
-- jekyll-yml/_posts/2012-01-18-hello-world.markdown -- |
| 40 |
--- |
| 41 |
layout: post |
| 42 |
title: "Hello World" |
| 43 |
--- |
| 44 |
Hello world! |
| 45 |
-- jekyll-yaml/_config.yaml -- |
| 46 |
title: "Jekyll YAML Site" |
| 47 |
url: "https://yaml.example.org/" |
| 48 |
-- jekyll-yaml/_posts/2012-01-18-hello-world.markdown -- |
| 49 |
--- |
| 50 |
layout: post |
| 51 |
title: "Hello World" |
| 52 |
--- |
| 53 |
Hello world! |
| 54 |
-- jekyll-toml/_config.toml -- |
| 55 |
title = "Jekyll TOML Site" |
| 56 |
url = "https://toml.example.org/" |
| 57 |
-- jekyll-toml/_posts/2012-01-18-hello-world.markdown -- |
| 58 |
--- |
| 59 |
layout: post |
| 60 |
title: "Hello World" |
| 61 |
--- |
| 62 |
Hello world! |