Contributing quality improvements

For Hacktoberfest 2022, we piloted a process for contributing quality improvements to the PowerShell content. This guide continues and generalizes that process, providing a low-friction way for community members to contribute and collaborate on GitHub through enhancing the quality of documentation.

We're focusing on these quality areas:

Project Tracking

We're tracking contributions with the PowerShell Docs Quality Contributions GitHub Project.

The project page has several views for the issues and PRs related to this effort:

Formatting code samples

All code samples should follow the style guidelines for PowerShell content. Those rules are repeated in abbreviated form here for convenience:

  • All code blocks should be contained in a triple-backtick code fence (```).
  • Line length for code blocks is limited to 90 characters except in About topics, where it's limited to 76 characters.
  • Avoid using line continuation characters (`) in PowerShell code examples.
    • Use splatting or natural line break opportunities, like after pipe (|) characters, opening braces (}), parentheses ((), and brackets ([) to limit line length.
  • Only include the PowerShell prompt for illustrative examples where the code is not intended for copy-pasting.
  • Don't use aliases in examples unless you're specifically documenting the alias.
  • Avoid using positional parameters. Use the parameter name, even if the parameter is positional.

Formatting command syntax

All prose should follow the style guidelines for PowerShell content. Those rules are repeated here for convenience:

  • Always use the full name for cmdlets and parameters. Avoid using aliases unless you're specifically demonstrating the alias.
  • Property, parameter, object, type names, class names, class methods should be bold.
    • Property and parameter values should be wrapped in backticks (`).
    • When referring to types using the bracketed style, use backticks. For example: [System.Io.FileInfo]
  • PowerShell module names should be bold.
  • PowerShell keywords and operators should be all lowercase.
  • Use proper (Pascal) casing for cmdlet names and parameters.
  • When referring to a parameter by name, the name should be bold. When illustrating the use of a parameter with the hyphen prefix, the parameter should be wrapped in backticks.
  • When showing example usage of an external command, the example should be wrapped in backticks. Always include the file extension of the external command.

For maintainability and readability of the markdown source for our documentation, we're converting our conceptual documentation to use link references instead of inline links.

For example, instead of:

The [Packages tab][31] displays all available
packages in the PowerShell Gallery.

It should be:

The [Packages tab][31] displays all available packages in the PowerShell Gallery.

Note

When you replace an inline link, reflow the content to wrap at 100 characters. You can use the reflow-markdown VS Code extension to do this quickly.

At the bottom of the file, add a markdown comment before the definition of the links.

<!-- Link references -->
[01]: https://www.powershellgallery.com/packages

Make sure that:

  1. The links are defined in the order they appear in the document.
  2. Every link points to the correct location.
  3. The link reference definitions are at the bottom of the file after the markdown comment and are in the correct order.

Markdown linting

For any article in one of the participating repositories, opening the article in VS Code displays linting warnings. Address any of these warnings you find, except:

Make sure of the line lengths and use the Reflow Markdown extension to fix any long lines.

Spelling

Sometimes, despite our best efforts, typos and misspellings get through and end up in the documentation. These mistakes make documentation harder to follow and localize. Fixing these mistakes makes the documentation more readable, especially for non-English speakers who rely on accurate translations.

Process

We encourage you to choose one or more of the quality areas and an article (or group of articles) to improve. Once you've decided what articles and content areas you want to work on, follow these steps:

  1. Check the project for issues filed for this effort to avoid duplicating efforts.

  2. Open a new issue in the appropriate repository:

  3. Follow our contributor's guide to get setup for making your changes.

  4. Submit your pull request. Ensure:

    1. Your PR title has the Quality: prefix.

    2. Your PR body references the issue it resolves as an unordered list item and uses one of the linking keywords.

      For example, if you're working on issue 123, the body of your PR should include the following Markdown:

      - resolves #123
      

    The content developers will review your work as soon as they can to help you get it merged.