File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222
2323 - name : Install dependencies
2424 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
2537 - name : Test build website
2638 run : npm run build
You can’t perform that action at this time.
0 commit comments