Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The -t / --theme flags were removed from hugo new #11018

Closed
yihui opened this issue May 24, 2023 · 4 comments
Closed

The -t / --theme flags were removed from hugo new #11018

yihui opened this issue May 24, 2023 · 4 comments
Assignees
Milestone

Comments

@yihui
Copy link
Contributor

yihui commented May 24, 2023

The -t / --theme flags were removed from hugo new (also absent in hugo new content): gohugoio/hugoDocs@fb3027d#diff-9b75f7a964edc681f1e213d44f1ec7a3d4f5f1678c25f45c78cb238cb2ca052cL62 Was that intentional? If yes, how to create new content using an archetype (--kind) in a specific theme? Thanks!

Originally posted by @yihui in #11015 (comment)

$ hugo version
hugo v0.112.3-ba6f74e40420d76f15fc8c2358be90f7aca98e0e+extended darwin/amd64 BuildDate=2023-05-24T14:42:50Z VendorInfo=gohugoio
$ hugo new post/foo.md --theme hugo-xmin
Error: command error: unknown flag: --theme
@bep
Copy link
Member

bep commented May 25, 2023

This is a bug, and I apologise. This was a massive Hugo upgrade on the technical side that we needed to do sooner rather than later, and I guess we (or at least I) was a little tired of it at the end and just wanted to get it out.

@bep bep added this to the v0.112.4 milestone May 25, 2023
@yihui
Copy link
Contributor Author

yihui commented May 25, 2023

Okay, no worries! It's good to know that this change was not intentional. Thank you very much!

@bep bep added the Bug label May 25, 2023
@bep bep self-assigned this May 27, 2023
bep added a commit that referenced this issue May 28, 2023
@bep bep closed this as completed in 43f1282 May 28, 2023
bep added a commit that referenced this issue May 28, 2023
Which allows to see the config with `--theme` applied.

Updates #11018
@jmooring
Copy link
Member

@yihui

how to create new content using an archetype

hugo new content --theme mytheme posts/post-1.md
hugo new content -t mytheme posts/post-1.md

The --theme / -t flag has no effect if you have an archetype in your project folder (as expected, same behavior as < v0.112.0).

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants