# Command line new with theme

**URL:** <https://discourse.gohugo.io/t/command-line-new-with-theme/14874>\
**Category:** feature\
**Created:** [October 24, 2018, 11:46am UTC](https://discourse.gohugo.io/t/command-line-new-with-theme/14874 "2018-10-24T11:46:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ju52](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ju52/32/6749_2.png) [@ju52](https://discourse.gohugo.io/u/ju52)\
**Post date:** [October 24, 2018, 11:46am UTC](https://discourse.gohugo.io/t/command-line-new-with-theme/14874/1 "2018-10-24T11:46:23Z")

</div>

I transfer my current site to a new theme, have both under themes.

1. Command line "hugo server -t " should overwrite the theme of the config file.  
I have to comment the theme line to work around.

2. with a config file without the theme line the command “hugo new” does not work.  
"hugo new " does not support the --theme option

Please active this option for “hugo new”

Thanks!

---

<div class="post-metadata">

**Author:** ![zwbetz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/zwbetz/32/16088_2.png) [@zwbetz](https://discourse.gohugo.io/u/zwbetz)\
**Post date:** [October 24, 2018, 12:35pm UTC](https://discourse.gohugo.io/t/command-line-new-with-theme/14874/2 "2018-10-24T12:35:23Z")

</div>

For #1 see

> [@Hugo server preferring configured theme over command line](https://discourse.gohugo.io/t/hugo-server-preferring-configured-theme-over-command-line/14782/4):
>
> Running HUGO\_THEME="mytheme" hugo server, while having theme: myothertheme in the config, does something weird. The home page is rendered from myothertheme, but when I click on any of the posts, I get 404 page not found – because mytheme is just a stub now with no templates.

For #2, what `hugo new` are you doing? Like a page or something else?

---

<div class="post-metadata">

**Author:** ![ju52](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ju52/32/6749_2.png) [@ju52](https://discourse.gohugo.io/u/ju52)\
**Post date:** [October 24, 2018, 8:24pm UTC](https://discourse.gohugo.io/t/command-line-new-with-theme/14874/3 "2018-10-24T20:24:46Z")

</div>

I have well 🙂 constructed archetypes to fill new pages.  
without a theme-value i will get a page file only with date, title and draft.

Would be nice to get the --theme option for hugo new page …

with a copy from the theme archetypes to layout/archetypes does not the trick! Why NOT?  
With the HUGO\_THEME env I have a workaround now.

Thanks

---

<div class="post-metadata">

**Author:** ![zwbetz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/zwbetz/32/16088_2.png) [@zwbetz](https://discourse.gohugo.io/u/zwbetz)\
**Post date:** [October 24, 2018, 8:43pm UTC](https://discourse.gohugo.io/t/command-line-new-with-theme/14874/4 "2018-10-24T20:43:08Z")

</div>

I don’t think I am understanding. So with an archetype, you’re setting a `theme` variable in front matter for a new page?

---

<div class="post-metadata">

**Author:** ![ju52](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ju52/32/6749_2.png) [@ju52](https://discourse.gohugo.io/u/ju52)\
**Post date:** [October 25, 2018, 7:13am UTC](https://discourse.gohugo.io/t/command-line-new-with-theme/14874/5 "2018-10-25T07:13:20Z")

</div>

Yes,

here my archetype for photo pages

```
+++
categories = ["Photo"]
tags = ["{{ now.Format "2006"}}"]
description = "{{ replace .TranslationBaseName "-" " " | title }}"
title = "{{ replace .TranslationBaseName "-" " " | title }}"
date = "{{ .Date }}"
layout = "gallery"
series = []
+++
```
