Skip to content

Commit 8452e07

Browse files
authored
Update documentation.yml
Add YAML front matter to the generated documentation. This should hopefully generate the directory structure we want.
1 parent d6af596 commit 8452e07

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/documentation.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,20 @@ jobs:
7070
swift doc generate Sources\SwiftWin32 --module-name SwiftWin32 --output site\SwiftWin32 --base-url https://compnerd.github.io/swift-win32/SwiftWin32
7171
swift doc generate Sources\SwiftWin32UI --module-name SwiftWin32UI --output site\SwiftWin32UI --base-url https://compnerd.github.io/swift-win32/SwiftWin32UI
7272
73+
- name: Post-Process
74+
run: |
75+
foreach ($module in "CoreGraphics","SwiftWin32","SwiftWin32UI") {
76+
Get-ChildItem -Path site\$module -Recurse -File -Include "*.md" -Exclude _Footer.md,_Sidebar.md,index.md | ForEach-Object {
77+
Set-Content $_.FullName -value @"
78+
---
79+
layout: default
80+
title: $(_.BaseName -replace '(?<=\w)_','.')
81+
parent: $($_.Directory.BaseName)
82+
---
83+
"@,$(Get-Content $_.FullName)
84+
}
85+
}
86+
7387
- name: Deploy
7488
run: |
7589
git -C site add --all

0 commit comments

Comments
 (0)