mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-26 21:51:02 +03:00
commands: Reinstate some of the removed build flags (e.g. --theme) to new and mod
Fixes #11018
This commit is contained in:
parent
e96cdfe966
commit
43f1282e73
13 changed files with 84 additions and 33 deletions
7
testscripts/commands/mod__themesdir.txt
Normal file
7
testscripts/commands/mod__themesdir.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
hugo --theme mytheme mod graph
|
||||
stdout 'project mytheme'
|
||||
|
||||
-- hugo.toml --
|
||||
title = "Hugo Module"
|
||||
-- themes/mytheme/hugo.toml --
|
||||
title = "My Theme"
|
|
@ -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.
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue