Skip to content
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

Fix generated docs to keep them consistent #83

Merged
merged 24 commits into from
Sep 13, 2023
Merged

Fix generated docs to keep them consistent #83

merged 24 commits into from
Sep 13, 2023

Conversation

shoddyguard
Copy link
Contributor

Previously when generating our Markdown docs using PlatyPS the formatting would flip-flop between runs due to PowerShell/platyPS#593 (or some variation of it).

The generated documentation also breaks several markdownlint rules which made reading these docs quite painful and working with them very tedious.

Now we forcefully lint them and also set the line endings as part of the Build-ModuleDocumentation cmdlet.
We also set line endings on the Add-BrownserveChangelogEntry cmdlet to which has allowed us to streamline our builds considerably (and reduced build times! 🎉)

Most of the changes here are linting of the docs

shoddyguard and others added 24 commits September 11, 2023 00:30
Make them private and only handled via the init/update repo cmdlets.
It's the only time we ever really want to set these ourselves.
Not quite finished yet but it does the basics ok.
We were getting some false positives.
Try to conform with https://common-changelog.org/ a bit more.
We're not 100% complient as we do our features a little diffrently at the moment.
Formats Markdown on our PlatyPS content.
Also breaks down the builds into smaller chunks as it was tedious having to generate the docs everytime.
Instead of being too rigerous with our regex matching be a bit more relaxed and instead have test cases for things so we don't get greedy with our matches.

Also documents our thought process (and a cry for help lol)
When we've formatted the markdown we return a string. If the markdown hasn't been formatted then we were returning an array.
Convert it to a string first
It wasn't doing the right things
Previously the docs had many linting issues.
This makes the docs complient with markdownlint
Explain why this exists and link to the GitHub issue
Previously we formatted the documentation and changelog in the builds.
Instead lets format them as part of the cmdlets that create them.
This is cleaner and more consistent across workflows.
@shoddyguard shoddyguard merged commit 640c21e into main Sep 13, 2023
@shoddyguard shoddyguard deleted the repo_cmdlets branch September 13, 2023 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant