-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add reference section #78
Comments
For the content generated from annotations, it would be nice if it was written to say one file per annotated thing. We then need a way of including those files in the main human editable content, e.g. so you can have all the generated name/description/args stuff next to some human produced content, e.g. more detailed description, examples, etc. This means we don't have to mix auto-generated and human-generated content in the same files, which would be a lot cleaner, clearer for the editor and easier to manage with git and the generator. The potential way to do this is to get the generator to convert the annotations to one json file per annotated thing. We then write a custom short code for each type of thing (e.g. one for xslt funcs, one for pipe elements, etc.), which reads the json and renders it to html. The human edited content can then include a short code call for each item. This keeps the generated content away from the editor and means the java code doesn't have to generate markdown. We could still allow the description in the annotation to be markdown for richer descriptions. The shortcode would just need to convert this description markdown into html. Examples of how to read from json here https://gohugo.io/templates/data-templates/ and https://www.youtube.com/watch?v=zJjJuS7LgS8 |
We could potentially walk the config object tree and produce a json object containing a flat list of props, each with full path, type and description. We can then have a short code that will render this into a nice table of properties. As we have more classes in stroom to generate json for the docs, it might be worth having a single entry point class in stroom that can be called by a shell script in stroom-docs to update everything in one go. |
Add a section called Reference as a sibling to User Guide. This can then contain the following children
To make things easier to maintain, all the XSLT funcs need a java annotation that provides all the documentation for the function, including all the args (with types). This would follow a similar pattern to the
stroom.dashboard.expression.v1.FunctionDef
annotation and means the content can be largely/fully auto generated from code.We could then have a short codes like
pipe-elm
(already got this),document
,xslt-func
andexpr-func
that would give you a link to the right place in the reference and some visual thing like the icon for the document or the pipe element lozenge. This means the content write doesn't have to worry about where the reference page is, just add something simple like{{< xslt-func "lookup >}}
.The text was updated successfully, but these errors were encountered: