Command line new with theme

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!

For #1 see

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

I have well :slight_smile: 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

1 Like

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

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      = []
+++