-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
docs: Create JSON helper for template funcs #3418
Comments
I could see something like this making doc maintenance much easier, so thank you. To further my understanding, please: I know your example is pseudocode, but I'm not sure I follow what When you talk about creating a shortcode, are you thinking similar to the table shortcode you created with custom outputs? If we are keeping a 1-md-file-per-func model (better for SEO), maybe even a smart partial would work. Then an editor doesn't have to worry about including the shortcode within |
Partial would also of course work fine -- the examples will be clear once finished. |
@rdwatters look at https://github.com/bep/hugo/blob/e0a2b8a8ac05eed2e853e8ad2b6b1e3ba049c705/docs/data/docs.json Scroll to bottom. I notice I have to do a job with the JSON to make it more "lookup friendly". |
And fix some other minor related issues. Updates gohugoio#3418
And fix some other minor related issues. Updates #3418
Ah, got it. Thanks for the clarification. For context, here is the new Seems like a lot of tedious work has already been undertaken by you and @moorereason, but do you think there are maintenance benefits to adding properties such as Just a thought. I'm not suggesting we automate all of it. 😄 |
The info in that JSON (description coming soon) is what we know. Nothing else CAN be generated. (I could generate the signature, but it is all What I do suggest, however:
But, we should do this in some documentation related issue. |
Works for me.
I'm assuming my thoughts were related to versioning of docs, deprecations, etc. I'm not wedded to it if it can be automated 😄 Cheers. |
Yes, I see the value in "does this work in my Hugo?", but let us discuss that somewhere else -- that can not be "auto generated" (in an easy way). |
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. |
See #3417
The data is (almost) complete and ready to dump to JSON.
Pseudo-data:
Most of the stuff above is straight forward; to get the
description
we would have to run the code through the GoDoc parser, which is doable and a nice-to-have.The big motivations for the above is:
Since we can not create content pages from data, I assume a shortcode could include this in the content pages.
/cc @moorereason @rdwatters
The text was updated successfully, but these errors were encountered: