# markdown-autodocs **Repository Path**: mirrors_buger/markdown-autodocs ## Basic Information - **Project Name**: markdown-autodocs - **Description**: ✨ A GitHub Action that automatically generates & updates markdown content (like your README.md) from external or remote files. - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-13 - **Last Updated**: 2026-01-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

A GitHub Action that automatically generates & updates markdown content (like your README.md) from external or remote files.

npm version MIT License

## Table of contents - [Why markdown-autodocs?](#why-markdown-autodocs) - [Features](#features) - [Examples](#examples) - [CODE Block](#code-block) - [JSON to HTML table](#json-to-html-table) - [Github Workflow Artifacts table](#github-workflow-artifacts-table) - [Example Repo which uses all the markdown-autodocs feature](#example-repo-which-uses-all-the-markdown-autodocs-feature) - [Local usage without Github action](#local-usage-without-github-action) - [Usage](#usage) - [Adding markdown-autodocs in your workflow](#adding-markdown-autodocs-in-your-workflow) - [Extended example with all possible options available for this Action](#extended-example-with-all-possible-options-available-for-this-action) - [Github Workflow Artifacts](#github-workflow-artifacts) - [Contributing](#contributing) - [Used By](#-used-by) - [License](#license) ## Why markdown-autodocs? To make your repo more appealing and useful you need to provide example code snippets in your README.md. Manually copy and pasting each code snippet in their respective places in your README would be inefficient and time-consuming. This problem can be solved using markdown-autodocs a GitHub Action that automatically generates & updates markdown content (like your README.md) from external or remote files. You need to add markers in your README.md that will tell markdown-autodocs where to insert the code snippet. ## Features * Code block: Insert code snippet in your markdown file from external or remote files. * JSON to HTML table: Insert HTML Table in your markdown file by converting JSON file contents to HTML table. * Github Workflow Artifacts table: Insert the Github workflow artifacts table in your markdown file by getting the latest artifacts for a workflow run. ## Examples ### CODE Block Get code from an external file or URL and insert it in your markdown. **Options:** - `src`: The relative path to the code to pull in, or the `URL` where the raw code lives

Get code from external file

Get code from remote file

### JSON to HTML table Get JSON contents from an external file and convert it into an HTML table and insert's it in your markdown. **Options:** - `src`: The relative path to the JSON file to pull in. ### Github Workflow Artifacts table Get the list of the latest artifacts generated from a workflow run. Generates a workflow artifacts table consists of artifacts download and workflow URL in an HTML table and inserts it in your markdown file. ### [Example Repo which uses all the markdown-autodocs feature](https://github.com/dineshsonachalam/repo-using-markdown-autodocs) ## Local usage without Github action **Install markdown-autodocs CLI:** ``` npm i -g markdown-autodocs ``` **markdown-autodocs CLI usage:** ``` dineshsonachalam@macbook ~ % markdown-autodocs --help Usage: markdown-autodocs [options] Options: -o, --outputFilePath Output file paths -c, --category code-block, json-to-html-table, workflow-artifact-table -r, --repo Repo name -b, --branch Branch name -a, --accessToken Github Access token -h, --help display help for command ``` 1. Code block ``` markdown-autodocs -c code-block -o ./README.md ``` 2. JSON to HTML table ``` markdown-autodocs -c json-to-html-table -o ./README.md ``` 3. Github workflow artifacts table ``` markdown-autodocs -c workflow-artifact-table -o ./README.md -r $REPO -b $BRANCH -a $ACCESSTOKEN ``` ## Usage ### Adding markdown-autodocs in your workflow Add the following step at the end of your job, after other steps that might add or change files. ```yml uses: dineshsonachalam/markdown-autodocs@v1.0.2 ``` ### Extended example with all possible options available for this Action ```yml - name: Markdown autodocs - uses: dineshsonachalam/markdown-autodocs@v1.0.2 with: # Optional, defaults to author of the commit that triggered the run commit_author: Author # Optional, defaults to "actions@github.com" commit_user_email: actions@github.com # Optional, but recommended # Defaults to "Apply automatic changes" commit_message: Apply automatic changes # Optional branch name where commit should be pushed to. # Defaults to the current branch. branch: feature-123 # Optional output file paths, defaults to '[./README.md]'. output_file_paths: '[./README.md]' # Categories to automatically sync or transform its contents in the markdown files. # Defaults to '[code-block,json-to-html-table,workflow-artifact-table]' categories: '[code-block,json-to-html-table,workflow-artifact-table]' ``` ## Github Workflow Artifacts
ArtifactWorkflow
Jest-integration-test-reportintegration-tests
module-dependencies-license-reportintegration-tests
size-of-dependenciesintegration-tests
vulnerabilities-audit-reportintegration-tests
## Contributing * [Code of Conduct](CODE_OF_CONDUCT.md) * [Contributing Guideline](CONTRIBUTING.md) ## 🚀 Used By * [iro.js - 🎨 Modular color picker widget for JavaScript, with support for a bunch of color formats](https://github.com/jaames/iro.js) * [LucidDynamodb - A minimalistic wrapper to AWS DynamoDB](https://github.com/dineshsonachalam/Lucid-Dynamodb) ## License [MIT](https://choosealicense.com/licenses/mit/) © [dineshsonachalam](https://www.github.com/dineshsonachalam)