command: hugo gen jsonschemas#13805
Conversation
bdc3d74 to
cd719ab
Compare
|
@bep this is ready for you to review. |
cd719ab to
e7ba801
Compare
|
@bmackinney thanks for this. We have been doing a fair bit of work lately to get rid of/clean up some legacy APIs -- so this has not been a priority. After the next minor Hugo version I think we're more or less in a "stable API" situation, and I will have a closer look at this. And yes, I do agree that, especially for config, the VS code situation is less than optimal. |
e7ba801 to
46b7c9a
Compare
46b7c9a to
7be7c37
Compare
7be7c37 to
43e78b5
Compare
|
I will test this myself, but one quick question: The lower casing of the first char in |
|
It works and is correct for json schemas, but I'm going to improve the camel function to handle acronyms better (ID → id instead of iD, JS → js instead of jS). |
From gohugoio/hugo#13805 To have public URL to test out these with.
|
@bmackinney I have tried to test this in a Netlify docs branch, but I have 2 issues:
|
|
@bep it's ready to re-test. |
|
@jmooring I will do a more thorough test/review of this setup., but I would appreciated your input on structure/naming. I'm pretty convinced that this is worth adding, especially considering the poor state of the existing "Hugo schemas" out there. The structure of this PR is currently:
I would think that we at least would want to have an option in the future to add JSON schemas for Hugo's template APIs, e.g. I'm not an JSON schema expert, but I suspect that it would be great if the structure somehow followed the documentation about the same topics. |
Reflects Hugo config and page frontmatter structs into json schemas.
Fixes #10984