File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 22
22
23
23
- name : Install dependencies
24
24
run : npm ci
25
+ - name : Check for GitHub-style admonitions in markdown files
26
+ run : |
27
+ # Search for the `> [!` pattern locally in .md and .mdx files
28
+ files_with_admonitions=$(grep -rl '> \[!' --include='*.md' --include='*.mdx' ./)
29
+ if [[ -n "$files_with_admonitions" ]]; then
30
+ echo "Error: Found GitHub-style admonitions (e.g., '> [!') in the following files:"
31
+ echo "$files_with_admonitions"
32
+ echo "Please replace them with Docusaurus-compatible admonitions (e.g., ':::note')."
33
+ exit 1 # Fail the workflow to indicate that GitHub-style admonitions should not be used
34
+ else
35
+ echo "No GitHub-style admonitions found. All markdown files are Docusaurus compatible."
36
+ fi
25
37
- name : Test build website
26
38
run : npm run build
You can’t perform that action at this time.
0 commit comments