

GitHub - dineshsonachalam/markdown-autodocs: ✨ A GitHub Action that automaticall...
source link: https://github.com/dineshsonachalam/markdown-autodocs
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

A GitHub Action that automatically generates & updates markdown content (like your README.md) from external or remote files.
Table of contents
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 theURL
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
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.
uses: dineshsonachalam/[email protected]
Extended example with all possible options available for this Action
- name: Markdown autodocs - uses: dineshsonachalam/[email protected] with: # Optional, defaults to author of the commit that triggered the run commit_author: Author <[email protected]> # Optional, defaults to "[email protected]" commit_user_email: [email protected] # 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
Contributing
Used By
License
Recommend
-
164
Emacs Markdown Mode markdown-mode is a major mode for editing Markdown-formatted text. The latest stable version is markdown-mode 2.5, released on Feb 12, 2022....
-
207
Vim Markdown runtime files This is the development version of Vim's included syntax highlighting and filetype plugins for Markdown. Generally you don't need to install these if you are running a recent version of Vim. If you want...
-
150
➹ Clean-mark Convert a blog article into a clean Markdown text file. Example For example, this article:
-
155
mkdx.vim 888b d888 888 d8P 8888888b. Y88b d88P 888 888 8888888 888b d888 8888b d8888 888 d8P 888 "Y88b Y88b d88P 888 888 888 8888b d8888 88888b.d88888 888 d...
-
119
Vim Markdown Syntax highlighting, matching rules and mappings for the original Markdown and extensions. Installation If you use
-
66
-
97
Emacs Markdown Mode markdown-mode is a major mode for editing Markdown-formatted text. The latest stable version is markdown-mode 2.3, released on August 31,...
-
107
rentry Rentry.co is markdown-powered pastebin/publishing service with preview, custom urls and editing. This repository contains a simple script that allows pasting and editing from...
-
6
A minimalistic wrapper to AWS DynamoDB Installation pip install LucidDynamodb Note:
-
2
Sam's Club CEO wants to use AI-powered cart scanners to ring you up automaticallyDominick ReuterWed, Februar...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK