-
Notifications
You must be signed in to change notification settings - Fork 124
Update new package README template #2707
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
base: main
Are you sure you want to change the base?
Conversation
Update the README templates and generator used in new package creation to match the new standardized README structure. The updated template should be better at helping users write the readme, by explaining what is needed in each section of the template. This also makes a few other small changes which will make it easier for new users to create integration packages. It moves the generated readme to `_dev/build/docs`, adds a "Do not modify" message to the README generated during `build`, and adds a default sample-event (which is needed to build the update readme template).
Rewrite the readme for the test apache package to use the new docs format. NOTE: This format isn't used in the published apache integration.
@@ -204,6 +209,9 @@ func renderReadme(fileName, packageRoot, templatePath string, linksMap linkMap) | |||
} | |||
return linksMap.RenderLink(args[0], options) | |||
}, | |||
"header": func(args ...string) (string, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This depends on the user leaving ``{{header}}` in the readme in order to add the "Do not modify" string to the generated files.
I could also inject the string into all generated READMEs, regardless of if this {{header}} is in it, but I don't know if this would cause problems with other package types, so I didn't do that. If it won't cause problems, I could change to add to all generated files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I definitely have no idea if there are any negative consequences, but I'd vote for the string being generated into all generated files without having to worry about including the header placeholder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you modify one of the packages under test/packages
to see the expected usage and result?
The I can also modify one of the test packages in elastic-package, so there's an example of new template here. |
💔 Build Failed
Failed CI StepsHistory
|
I've changed the readme in the |
Update the README templates and generator used in new package creation to match the new standardized README structure. The updated template should be better at helping users write the readme for new packages, by explaining what is needed in each section of the template.
This also makes a few other small changes which will make it easier for new users to create and use integration packages. It moves the generated readme to
_dev/build/docs
, adds a "Do not modify" message to the README generated duringbuild
, and adds a default sample-event (which is needed to build the update readme template, since it now includes{{event}}
).