Skip to content

knom/vsts-markdown-tasks

Repository files navigation

Markdown 2 HTML VSTS/Azure DevOps Build/Release Task Version Visual Studio Marketplace Downloads GitHub License Build Status

Useful for converting Markdown language into HTML.

Supported Platforms

Usage

The extension installs the follow tasks:

Extension Tasks

Transform a single Markdown file To HTML

Screenshot

Parameters:

  • Markdown file path:

    • The path of the input Markdown file.
    • It can contain variables such as $(Build.ArtifactStagingDirectory)
  • HTML output file path:

    • The path of the output HTML file. If the file does not exist, it will be created.
    • If the file exists, it will be overwritten.
    • It can contain variables such as $(Build.ArtifactStagingDirectory).
  • HTML template file path:

    • The path of the HTML file used as a template.

    • The placeholder for the inserted transformed Markdown is

          {body|s}
      

      Put it wherever you want the converted Markdown to show up in the template.

    • Other custom placeholders for parameters can be used such as

          {title}
          {author}
      

      These parameters need to be passed in as JSON.

  • JSON Template Parameters:

    • The parameters to be used instead of placeholders in the template file.

    • body is automatically filled

    • The parameters are case-sensitive

          {"title": "Release Notes", "Author": "knom"}
      

Transform multiple Markdown files To HTML

Screenshot

Parameters:

  • Markdown search pattern:

    • The GLOB search patterns to input Markdown files.
    • Multiple lines, each with a COMMA at the end
    • E.g. **\*.md, !**\node_modules\*
    • It can contain variables such as $(Build.ArtifactStagingDirectory)
  • HTML output folder:

    • If empty the output folder will be the source folder of the Markdown files.
    • The path of the folder for output HTML files. If the folder does not exist, it will be created.
    • If the files exists, they will be overwritten.
    • It can contain variables such as $(Build.ArtifactStagingDirectory).
  • HTML template file path:

    • The path of the HTML file used as a template.

    • The placeholder for the inserted transformed Markdown is

          {body|s}
      

      Put it wherever you want the converted Markdown to show up in the template.

    • Other custom placeholders for parameters can be used such as

          {title}
          {author}
      

      These parameters need to be passed in as JSON.

  • JSON Template Parameters:

    • The parameters to be used instead of placeholders in the template file.

    • body is automatically filled

    • The parameters are case-sensitive

          {"title": "Release Notes", "Author": "knom"}
      

License

Published under Apache 2.0 License.