Skip to content

Commit 5d1b79d

Browse files
committed
Programmatically add front matter
1 parent 3c4d3eb commit 5d1b79d

10 files changed

Lines changed: 26 additions & 49 deletions

File tree

Pipelines/Scripts/prepare-pages.ps1

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

2323
$packageName = $packageName.Matches[0].Value
24+
$packageFriendlyName = (Select-String -Pattern "`"displayName`": `"(.+)`"" -Path $_ | Select-Object -First 1).Matches.Groups[1].Value
2425
$packagePath = $_.Directory
2526

26-
Copy-Item -Path (Join-Path $packagePath "README.md") -Destination "./$packageName.md"
27-
Copy-Item -Path (Join-Path $packagePath "CHANGELOG.md") -Destination "./$packageName.CHANGELOG.md"
28-
Add-Content -Path "./$packageName.md" -Value "
27+
# Create README, add front matter, copy content, and add changelog link
28+
New-Item -Path "./$packageName.md" -Value @"
29+
---
30+
title: $packageFriendlyName
31+
parent: Packages
32+
---
33+
34+
35+
"@
36+
Add-Content -Path "./$packageName.md" -Value (Get-Content -Path (Join-Path $packagePath "README.md"))
37+
Add-Content -Path "./$packageName.md" -Value @"
38+
2939
## Latest changelog
3040
31-
[Changelog](./$packageName.CHANGELOG.md)"
41+
[Changelog](./$packageName.CHANGELOG.md)
42+
"@
43+
44+
# Create CHANGELOG, add front matter, and copy content
45+
New-Item -Path "./$packageName.CHANGELOG.md" -Value @"
46+
---
47+
title: $packageFriendlyName Changelog
48+
parent: $packageFriendlyName
49+
---
50+
51+
52+
"@
53+
Add-Content -Path "./$packageName.CHANGELOG.md" -Value (Get-Content -Path (Join-Path $packagePath "CHANGELOG.md"))
3254
}

org.mixedrealitytoolkit.accessibility/README.md

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

83
Features and subsystem to enable accessibility in MR experiences.

org.mixedrealitytoolkit.audio/README.md

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

83
Features to enhance audio in XR experiences.
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
---
2-
title: MRTK Core Definitions
3-
parent: Packages
4-
---
5-
61
# MRTK Core Definitions
72

83
A limited collection of common interfaces and utilities that most MRTK packages share. Most implementations of these interfaces are contained in other packages in the MRTK ecosystem.
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
---
2-
title: MRTK Diagnostics
3-
parent: Packages
4-
---
5-
61
# MRTK Diagnostics
72

83
Subsystems and utilities for common diagnostic and performance monitoring tasks.
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
---
2-
title: MRTK Tools
3-
parent: Packages
4-
---
5-
61
# MRTK Tools
72

83
A collection of tools, utilities, and wizards that can be used to create and analyze components for use with MRTK3.
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
---
2-
title: MRTK UX Components (Non-Canvas)
3-
parent: Packages
4-
---
5-
61
# MRTK UX Components (Non-Canvas)
72

83
UX component library for 3D UX without Canvas layout. In some cases, non-Canvas UI may offer better performance.
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
---
2-
title: MRTK UX Components
3-
parent: Packages
4-
---
5-
61
# MRTK UX Components
72

83
UX library leveraging RectTransform and Canvas for dynamic layout and presentation. Contains prefabs, visuals, controls, and everything to get started building 3D user interfaces for mixed reality.
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
---
2-
title: MRTK UX Core
3-
parent: Packages
4-
---
5-
61
# MRTK UX Core Scripts
72

83
Core interaction and visualization scripts for building MR UI components. Intended to be consumed when building UX libraries. For pre-existing library of components, see the UX Components package.

org.mixedrealitytoolkit.windowsspeech/README.md

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

83
Speech subsystem implementation for native Windows speech APIs enables native Windows text-to-speech and speech recognition features, producing events to drive XRI interactions using speech.

0 commit comments

Comments
 (0)