gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
76.11k stars 7.54k forks source link

Specific name file for theme config: `theme.toml` #11412

Open ngdangtu-vn opened 1 year ago

ngdangtu-vn commented 1 year ago

I would like to purpose a new name for the theme.toml file:

- theme.toml
+ hugo-theme.toml

This proposal coming from the fact that the name is to generic to look for in SchemaStore project. Which wouldn't be good for app use this database to enhance UX. For example, Even Better TOML would need this to automatically apply schema on hugo.toml and theme.toml. For hugo.toml, it is great. But for theme.toml, which schema if we have more than 1 application use it?

I understand that theme.toml is a small file and may not worth to do schema validation/suggesting. But it is still safer than letting ppl input whatever they don't know in the file and later on get on forum to ask for debug right?

ngdangtu-vn commented 1 year ago

Also, if possible, please don't hesitate to suggest for improve in this PR https://github.com/SchemaStore/schemastore/pull/3174 :D

bep commented 1 year ago

Yea, we could/should probably do that. Any caveats, @jmooring ?

jmooring commented 1 year ago

I don't really care one way or the other. My only thought is, do we even want a published schema for this? The first thing I did after switching to Even Better TOML was... disable schema validation.

bep commented 1 year ago

My only thought is, do we even want a published schema for this?

A big maybe, I guess; it's a very small "schema".

I see value in having a schema for hugo.toml, but only if it's up to date and complete, and to do that, I guess the source of truth needs to come from Hugo, e.g. https://gohugo.io/schemas/latest/config.json or something.

ngdangtu-vn commented 1 year ago

https://gohugo.io/schemas/latest/config.json

And here I was excited for nothing when I thought you guy have real schema...

Actually, the SchemaStore project also support to host your own schema and index it on their page. Which is good imo if users search for Hugo schema on schemastore.org.

I think it is best to host your own schema so you can update it easily (like when we want to fixed the Hugo number version for every updates in min_version)