Skip to content

Commit c5312d4

Browse files
committed
Update prepare-pages.ps1
1 parent 84ef945 commit c5312d4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Pipelines/Scripts/prepare-pages.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ parent: Home
6060
"@
6161
Add-Content -Path $destination -Value (Get-Content -Path (Join-Path $ProjectRoot "GOVERNANCE.md"))
6262

63-
$destination = Join-Path $docs "index.md"
63+
$destination = Join-Path $docs "README.md"
6464
# Create page, add front matter, and copy content
6565
New-Item -Path $destination -ItemType File -Force -Value @"
6666
---
@@ -76,7 +76,7 @@ Add-Content -Path $destination -Value (Get-Content -Path (Join-Path $ProjectRoot
7676
# We leave them checked-in so they render correctly in the GitHub repo, but we convert them for Pages
7777
Get-ChildItem -Path (Join-Path $docs "*" "*.md") -Recurse | ForEach-Object {
7878
$fileContent = Get-Content -Path $_
79-
Set-Content -Path $_ -Value ($fileContent -replace "> \[!(\w+)\]", { "{: .$("$($_.Groups[1])".ToLower()) }" })
79+
Set-Content -Path $_ -Value ($fileContent -replace "> \[!(\w+)\]", { "{: .$("$($_.Groups[1])".ToLower()) }" } -replace "docs/", "")
8080
}
8181

8282
# Loop through package directories and copy documentation
@@ -99,7 +99,7 @@ Get-ChildItem -Path (Join-Path $ProjectRoot "*" "package.json") | ForEach-Object
9999
New-Item -Path $packageDocsPath -ItemType Directory -Force
100100

101101
# Create README, add front matter, and copy content
102-
$packageReadmeDestination = Join-Path $packageDocsPath "index.md"
102+
$packageReadmeDestination = Join-Path $packageDocsPath "README.md"
103103
New-Item -Path $packageReadmeDestination -ItemType File -Force -Value @"
104104
---
105105
title: $packageFriendlyName

0 commit comments

Comments
 (0)