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

Automatically create default Archetype based on config file format #9365

Closed
ktprograms opened this issue Jan 7, 2022 · 4 comments
Closed

Comments

@ktprograms
Copy link

(follow up to #9363)

With hugo new site -f toml name-of-site (or -f json or -f yaml), the format of the configuration file can be changed. Currently, this does not change the format used for frontmatter in new content.

I think it might be a good idea to generate different archetypes/default.md files based on the format selected when creating a new Hugo site.

If you want to make it really customisable, maybe add a --frontmatter-format option to hugo new site so that the frontmatter format can be set independently of the config file format. This would also allow the frontmatter in the default archetype to be in Org Mode format.

@ktprograms
Copy link
Author

I'm quite busy this weekend, but if after that a fix hasn't been submitted I'll look into submitting a PR myself.

@jmooring
Copy link
Member

jmooring commented Jan 7, 2022

I wouldn't spend any time on this:

  1. The majority of sites that I have seen use TOML for config and YAML for front matter.
  2. Creating a new site is an infrequent task.
  3. The effort required to manually change the archetype format after site creation is minimal.
  4. The selection of formats is opinionated. For example, I would never use YAML for front matter, but I might use YAML for a complex site configuration. To some extent this is a tabs/spaces discussion, which is fruitless, because everyone knows spaces are the correct choice.

@bep
Copy link
Member

bep commented Jan 7, 2022

We're not doing this.

@bep bep closed this as completed Jan 7, 2022
@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 Jan 15, 2022
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