summaryrefslogtreecommitdiffstats
path: root/testscripts/commands/new.txt
diff options
context:
space:
mode:
Diffstat (limited to 'testscripts/commands/new.txt')
-rw-r--r--testscripts/commands/new.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/testscripts/commands/new.txt b/testscripts/commands/new.txt
index aeebba66d..aad0d80f6 100644
--- a/testscripts/commands/new.txt
+++ b/testscripts/commands/new.txt
@@ -25,3 +25,26 @@ stdout 'Create a new content file.'
hugo new posts/my-first-post.md
checkfile content/posts/my-first-post.md
+cd ..
+cd myexistingsite
+hugo new post/foo.md -t mytheme
+grep 'Dummy content' content/post/foo.md
+
+-- myexistingsite/hugo.toml --
+theme = "mytheme"
+-- myexistingsite/content/p1.md --
+---
+title: "P1"
+---
+-- myexistingsite/themes/mytheme/hugo.toml --
+-- myexistingsite/themes/mytheme/archetypes/post.md --
+---
+title: "{{ replace .Name "-" " " | title }}"
+date: {{ .Date }}
+draft: true
+---
+
+Dummy content.
+
+
+