About GitHub Action that inserts additional markdown content into a template markdown file.
-
Create a markdown file to serve as the template (e.g.,
template.md
). -
Place the files you want to insert in any directory of your choice (e.g.,
/docs
). -
Insert other markdown files at desired locations by adding a comment like
<!-- {filename}.md -->
. -
Specify input parameters and execute the action.
- name: Insert document files to template
uses: ryohidaka/action-md-insert@v1
with:
template_path: "./template.md"
src_dir: "./docs"
dest_file: ./output.md
Required Path to template md file.
Required Path to directory of md files to insert.
Optional Destination file path for replaced file, including file name. (Default: output.md
)
Result
# This is a template
<!-- file1.md -->
## File1
Contents of file1.md
<!-- file2.md -->
## File2
Contents of file2.md
© 2023 ryohidaka under the MIT license.