Skip to content

Commit 031ebb2

Browse files
committed
Try parsing the rest of the markdown files
1 parent db44ddc commit 031ebb2

2 files changed

Lines changed: 21 additions & 9 deletions

File tree

Pipelines/Scripts/prepare-pages.ps1

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ Get-ChildItem -Path (Join-Path $ProjectRoot "*" "package.json") | ForEach-Object
3838

3939
$packageName = $packageName.Matches[0].Value
4040
$packageFriendlyName = (Select-String -Pattern "`"displayName`": `"(.+)`"" -Path $_ | Select-Object -First 1).Matches.Groups[1].Value
41-
$packagePath = $_.Directory
41+
$packagePath = $_.DirectoryName
42+
$packageDocsPath = Join-Path $docs $packageName
4243

43-
New-Item -Path (Join-Path $docs $packageName) -ItemType Directory
44+
New-Item -Path $packageDocsPath -ItemType Directory
4445

4546
# Create README, add front matter, and copy content
46-
$packageReadmeDestination = Join-Path $docs $packageName "index.md"
47+
$packageReadmeDestination = Join-Path $packageDocsPath "index.md"
4748
New-Item -Path $packageReadmeDestination -ItemType File -Value @"
4849
---
4950
title: $packageFriendlyName
@@ -57,7 +58,7 @@ parent: Packages
5758
Add-Content -Path $packageReadmeDestination -Value $readmeContent
5859

5960
# Create CHANGELOG, add front matter, and copy content
60-
$packageChangelogDestination = Join-Path $docs $packageName "CHANGELOG.md"
61+
$packageChangelogDestination = Join-Path $packageDocsPath "CHANGELOG.md"
6162
New-Item -Path $packageChangelogDestination -ItemType File -Value @"
6263
---
6364
title: Changelog
@@ -67,4 +68,20 @@ parent: $packageFriendlyName
6768
6869
"@
6970
Add-Content -Path $packageChangelogDestination -Value (Get-Content -Path (Join-Path $packagePath "CHANGELOG.md"))
71+
72+
Get-ChildItem -Path (Get-ChildItem -Path $packagePath -Directory) -Recurse -File -Include "*.md" | ForEach-Object {
73+
# Create file, add front matter, and copy content
74+
$fileFolder = Join-Path $packageDocsPath ($_.DirectoryName | Split-Path -Leaf)
75+
New-Item -Path $fileFolder -ItemType Directory
76+
$fileDestination = Join-Path $fileFolder $_.Name
77+
New-Item -Path $fileDestination -ItemType File -Value @"
78+
---
79+
title: $($_.Name)
80+
parent: $packageFriendlyName
81+
---
82+
83+
84+
"@
85+
Add-Content -Path $fileDestination -Value (Get-Content -Path $_)
86+
}
7087
}

org.mixedrealitytoolkit.uxcomponents/Button/Prefabs/README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
---
2-
title: Unified UX
3-
parent: MRTK UX Components
4-
---
5-
61
# Unified UX
72

83
## Why can't I preview my animations on the object?

0 commit comments

Comments
 (0)