Skip to content

Commit

Permalink
add more options
Browse files Browse the repository at this point in the history
  • Loading branch information
alxgomz committed Dec 4, 2024
1 parent 2a78346 commit 962ca90
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/actions/md-toc/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ inputs:
description: Bullets to use for Table of Contents ("*", "-" or "+")
required: false
default: '*'
no_toc_in_toc:
description: >-
Do not include Table of Contents heading in Table of Contents
(Assuming it's the first h1/##)
required: false
default: 'true'
node_version:
description: Node.js version to install (false means do not install)
required: false
Expand All @@ -43,8 +49,10 @@ runs:
- name: Generate Table of Contents
env:
MDTOC_IARG: ${{ inputs.dry_run == 'false' && '-i' || '' }}
MDTOC_HARG: ${{ inputs.no_toc_in_toc == 'true' && '--no-firsth1' || '' }}
MDTOC_ARGS: ${{ env.MDTOC_IARG }} ${{ env.MDTOC_HARG }}
run: |
markdown-toc "$MDTOC_IARG" \
markdown-toc "$MDTOC_ARGS" \
--maxdepth "${{ inputs.depth }}" \
--bullets "${{ inputs.bullets }}" \
--append "${{ inputs.append }}" \
Expand Down

0 comments on commit 962ca90

Please sign in to comment.