Adding schema file for zola config file

I want to add a schema file for the Zola configuration so that my editor can provide suggestions and validation when editing the config file. I’ve already finished this part — here’s an example:

I’ve completed most of the work, but I still have a few questions:

I’d like to include this schema file in the Zola repository so that whenever the configuration definition changes, the schema can be updated in sync.

I also plan to submit the schema to www.schemastore.org so that TOML language tools can automatically detect and use it, making it easier to edit Zola configurations.

However, there’s one issue: for tools to automatically associate this schema with Zola config files, we need to make some adjustments — either:

  1. Add a line like #:schema ... to the config file (as shown in the picture), or

  2. Rename the default config file from config.toml to zola.toml.

I personally prefer the second option (zola.toml), but for compatibility, both filenames (config.toml and zola.toml) should be supported, with zola.toml being preferred.

So I’d like to ask whether it’s feasible to rename the default config file to zola.toml.
If not, I’ll just submit a PR that adds the schema file without changing the default config filename.

schema file: zola/zola.schema.json at feat/schema · cscnk52/zola · GitHub

waiting for @keats reply.

1 Like