Skip to content

A GitHub Action to convert Markdown files to HTML via GitHub's API with embedded GitHub CSS style.

License

Notifications You must be signed in to change notification settings

natescherer/markdown-to-html-with-github-style-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Markdown to HTML with GitHub Style GitHub Action

A GitHub Action to convert Markdown files to HTML via GitHub's API.

Essentially, this action will take input Markdown files and render them into self-contained HTML files that look as close as possible to how Markdown files are displayed on github.com.

It is tested and runs on windows-latest, ubuntu-latest, and macos-latest.

Usage

jobs:
  Job:
    runs-on: windows-latest
    steps:
      - name: Convert Markdown to HTML
        uses: natescherer/markdown-to-html-with-github-style-action@v1
        with:
          path: README.md,CHANGELOG.md,docs\doc1.md
          outputpath: out

Inputs

Name Required Description
path true A comma-separated list of one or more paths to markdown files to convert, relative to the root of your project.
outputpath false Path to a folder where HTML files should be saved. By default, HTML files will be saved in the same path as the source markdown file.
matchpathstructure false If set to true, will output files into the path provided to outputfolder while preserving the directory structure of the input files. I.E. if path is README.md,docs/Doc1.md and outputfolder is out, the files created will be out/README.html and out/docs/Doc1.html rather than both files being created in the root of out.

Outputs

This Action does not have outputs.

Authors

Nate Scherer - Initial work - natescherer

License

This project is licensed under The MIT License - see LICENSE for details.

Acknowledgements

sindresorhus - For creating the CSS used in this action

About

A GitHub Action to convert Markdown files to HTML via GitHub's API with embedded GitHub CSS style.

Resources

License

Stars

Watchers

Forks