JSON schema is being created for Hugo

Hello! I am creating a JSON schema for Hugo. Please view this PR. :smile:

1 Like

Nice. I started doing this and gave up a while back. There are so many variables that are so hidden…

Two notes:

I am pretty sure, that you will go much happier with a additionalproperties: true in the last line, as long as you are not 100% sure that all variables are there. Because, also, you basically invalidate my config if there is a params section. Which is definitely there and can be freely defined in whats in there.

Secondly: there is a method where you can save your config in config/_default/sectionname.json. One file per section. You should separate these sections into sub-schemes and then have one big scheme to unite them all.

What do we TOML-fans do?

1 Like

i have something like this, i write it in YAML, but it’s incomplete, as my usage it’s not really validation, just documentation reference, so i only includes properties that i need.

a tip, you can grab some default configurations for:

  • markup
  • minify
  • security
  • mediaTypes
  • outputFormats
  • _merge (Merge Strategy Key)

from here:

Good luck :+1:

2 Likes

There is a taplo framework. But it is not stable now… I think after a while I suggest to move this schema to Hugo repo to just refer to it from taplo and schemastore.

@EmilySeville7cfg do you have a sample I can use for my blog?

No, I don’t have any example on Hugo. But I have the site on Jekyll (you can take design/content ideas from it).

  1. It is not clear what keys can be specified for each language under languages.<language> key. How can I understand what keys to suggest for each language?
  2. I don’t understand what lineNoStart default value is: 1 or 199.

Issue was closed. It seems further discussion on its adoption is required.