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

Multiple changes/adaptions #504

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

echalone
Copy link

@echalone echalone commented Jan 25, 2021

  • Sections, like for example Description, without data (and without example data due to new switch -SkipEmptyFields) will no longer be rendered
  • Added switch -SinglePage to cmdlet New-MarkdownHelp so all functions will be written into the same module markdown file (same name as module landing page would normally have), instead of writing every cmdlet into its own markdown file
  • Added switch -NoInputOutputFormatting to cmdlets New-MarkdownHelp, Update-MarkdownHelp and Merge-MarkdownHelp so Input/Output comments won't be formatted. This is because microsoft gives us no way to actually set the values in Input/Output correct (type, description) in a PS function header, but will put everything written there into the "type" property, so all text will be formatted bold. So for this to work correctly (not as intended) this switch needs to be provided so everything in the Input/Output section will just be written as is, without any bold formatting.
  • Added switch -SkipEmptyFields to cmdlets New-MarkdownHelp, Update-MarkdownHelp and Update-MarkdownHelpModule which will omit example text for empty fields which were not provided/found and will instead just skip empty sections
  • Added switch -CreateTableOfContent to cmdlet New-MarkdownHelp which will create an additional table of content in the single- or module-landing-page.
  • Added switch -WithModuleMetaData to cmdlet New-MarkdownHelp which will add a section "Module Metadata" filled with the following data (as far as that data exists): Module version, Author, Company, Copyright, Tags, License Uri, Project Uri
  • Added module version to yaml metadata at beginning of markdown
  • Fixed rendering of example Introduction (is array but wasn't handled as array) and removed "PS>", "PS >" (PS Core default) and "PS C:>" (PS 5 default) from Introduction array (apparently microsoft is putting everything before a > sign in an example into introduction, even its default values, so we had to delete those default values from the array for the documentation to be generated as was previously, so without a "PS >" or "PS C:>" being suddenly in the introduction of every example).
  • Adapted UnitTests to work with removed empty sections (due to missing data)

* Sections, like for example Description, without data (and without example data due to new switch -SkipEmptyFields) will no longer be rendered
* Added switch -SinglePage to cmdlet New-MarkdownHelp so all functions will be written into the same module markdown file (same name as module landing page would normally have), instead of writing every cmdlet into its own markdown file
* Added switch -NoInputOutputFormatting to cmdlets New-MarkdownHelp, Update-MarkdownHelp and Merge-MarkdownHelp so Input/Output comments won't be formatted. This is because microsoft gives us no way to actually set the values in Input/Output correct (type, description) but will put everything written there into the "type" property, so all text will be formatted bold. So for this to work correctly (not as intended) this switch needs to be provided so everything in the Input/Output section will just be written as is, without any bold formatting.
* Added switch -SkipEmptyFields to cmdlets New-MarkdownHelp, Update-MarkdownHelp and Update-MarkdownHelpModule which will omit example text for empty fields which were not provided/found and will instead just skip empty sections
* Added switch -CreateTableOfContent to cmdlet New-MarkdownHelp which will create an additional table of content in the single- or module-landing-page.
* Added switch -WithModuleMetaData to cmdlet New-MarkdownHelp which will add a section "Module Metadata" filled with the following data (as far as that data exists): Module version, Author, Company, Copyright, Tags, License Uri, Project Uri
* Added module version to yaml metadata at beginning of markdown
* Adapted UnitTests to work with removed empty sections (due to missing data)
@echalone
Copy link
Author

Okay, seems one UnitTest is failing, I might have to take another look at that tomorrow

@echalone
Copy link
Author

Alright, seems everything is fixed now :)

@echalone
Copy link
Author

Fixed a bug with new Switch -WithModuleMetaData and added help text for all the new switches in the documentation

@echalone
Copy link
Author

Fixed metadata output bugs (on github everything appeared as one line in the metadata, some more linebreaks were needed for the headers as well)

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.

None yet

1 participant