Skip to content

Commit 7dfad7b

Browse files
committed
Convert GitHub admonitions to just-the-docs syntax
1 parent 3dbc006 commit 7dfad7b

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name: Deploy Docs site to Pages
99
on:
1010
push:
1111
branches: ["add-gh-pages"]
12-
paths: ["docs/**","**/README.md","**/CHANGELOG.md"]
12+
paths: ["docs/**","**/README.md","**/CHANGELOG.md","Pipelines/Scripts/prepare-pages.ps1"]
1313

1414
# Allows you to run this workflow manually from the Actions tab
1515
workflow_dispatch:

Pipelines/Scripts/prepare-pages.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ parent: Packages
3333
3434
3535
"@
36-
Add-Content -Path "./$packageName.md" -Value (Get-Content -Path (Join-Path $packagePath "README.md"))
36+
$readmeContent = (Get-Content -Path (Join-Path $packagePath "README.md"))
37+
$readmeContent = $readmeContent -replace "> \[!(\w+)\]", { "{: .$("$($_.Groups[1])".ToLower()) }" } # Convert GitHub admonitions to just-the-docs syntax
38+
Add-Content -Path "./$packageName.md" -Value $readmeContent
3739

3840
# Create CHANGELOG, add front matter, and copy content
3941
New-Item -Path "./$packageName.CHANGELOG.md" -Value @"

0 commit comments

Comments
 (0)