Skip to content

Commit b31cc5d

Browse files
committed
Try jekyll-relative-links
1 parent 68c42cf commit b31cc5d

5 files changed

Lines changed: 84 additions & 32 deletions

File tree

Pipelines/Scripts/prepare-pages.ps1

Lines changed: 53 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,71 @@ Copy-Item -Path (Join-Path $ProjectRoot "images" "*") -Destination $images -Recu
2121
Copy-Item -Path (Join-Path $ProjectRoot "org.mixedrealitytoolkit.standardassets" "Textures" "Logos" "MRTK_Logo_White.png") -Destination $images -Force
2222
Copy-Item -Path (Join-Path $ProjectRoot "org.mixedrealitytoolkit.standardassets" "Textures" "Logos" "IconMRTKLogo.png") -Destination $images -Force
2323

24-
$indexDestination = Join-Path $docs "index.md"
25-
# Create home page, add front matter, and copy content
26-
New-Item -Path $indexDestination -ItemType File -Force -Value @"
24+
$destination = Join-Path $docs "index.md"
25+
# Create page, add front matter, and copy content
26+
New-Item -Path $destination -ItemType File -Force -Value @"
2727
---
2828
title: Home
2929
nav_order: 1
3030
---
3131
3232
3333
"@
34-
Add-Content -Path $indexDestination -Value (Get-Content -Path (Join-Path $ProjectRoot "README.md"))
34+
Add-Content -Path $destination -Value (Get-Content -Path (Join-Path $ProjectRoot "README.md"))
35+
36+
$destination = Join-Path $docs "CONTRIBUTING.md"
37+
# Create page, add front matter, and copy content
38+
New-Item -Path $destination -ItemType File -Force -Value @"
39+
---
40+
title: Contributing
41+
parent: Home
42+
---
43+
44+
45+
"@
46+
Add-Content -Path $destination -Value (Get-Content -Path (Join-Path $ProjectRoot "CONTRIBUTING.md"))
47+
48+
$destination = Join-Path $docs "LICENSE.md"
49+
# Create page, add front matter, and copy content
50+
New-Item -Path $destination -ItemType File -Force -Value @"
51+
---
52+
title: License
53+
parent: Home
54+
---
55+
56+
57+
"@
58+
Add-Content -Path $destination -Value (Get-Content -Path (Join-Path $ProjectRoot "LICENSE.md"))
59+
60+
$destination = Join-Path $docs "MAINTAINERS.md"
61+
# Create page, add front matter, and copy content
62+
New-Item -Path $destination -ItemType File -Force -Value @"
63+
---
64+
title: Maintainers
65+
parent: Home
66+
---
67+
68+
69+
"@
70+
Add-Content -Path $destination -Value (Get-Content -Path (Join-Path $ProjectRoot "MAINTAINERS.md"))
71+
72+
$destination = Join-Path $docs "GOVERNANCE.md"
73+
# Create page, add front matter, and copy content
74+
New-Item -Path $destination -ItemType File -Force -Value @"
75+
---
76+
title: Governance
77+
parent: Home
78+
---
79+
80+
81+
"@
82+
Add-Content -Path $destination -Value (Get-Content -Path (Join-Path $ProjectRoot "GOVERNANCE.md"))
3583

3684
# Convert GitHub admonitions to just-the-docs syntax for in-place docs files
3785
# We leave them checked-in so they render correctly in the GitHub repo, but we convert them for Pages
3886
Get-ChildItem -Path (Join-Path $docs "*" "*.md") -Recurse | ForEach-Object {
3987
$fileContent = Get-Content -Path $_
40-
Set-Content -Path $_ -Value ($fileContent -replace "> \[!(\w+)\]", { "{: .$("$($_.Groups[1])".ToLower()) }" })
88+
Set-Content -Path $_ -Value ($fileContent -replace "> \[!(\w+)\]", { "{: .$("$($_.Groups[1])".ToLower()) }" } -replace "/docs/", "/")
4189
}
4290

4391
# Loop through package directories and copy documentation

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ To help identify specific packages and their versions, MRTK3 provides an about d
9292

9393
This project welcomes contributions, suggestions, and feedback. All contributions, suggestions, and feedback you submitted are accepted under the [Project's license](./LICENSE.md). You represent that if you do not own copyright in the code that you have the authority to submit it under the [Project's license](./LICENSE.md). All feedback, suggestions, or contributions are not confidential.
9494

95-
For more information on how to contribute Mixed Reality Toolkit for Unity Project, please read [CONTRIBUTING.md](./CONTRIBUTING.md).
95+
For more information on how to contribute Mixed Reality Toolkit for Unity Project, please read the [Contributing document](./CONTRIBUTING.md).
9696

9797
## Governance
9898

99-
For information on how the Mixed Reality Toolkit for Unity Project is governed, please read [GOVERNANCE.md](./GOVERNANCE.md).
99+
For information on how the Mixed Reality Toolkit for Unity Project is governed, please read the [Governance document](./GOVERNANCE.md).
100100

101101
All projects under the Mixed Reality Toolkit organization are governed by the Steering Committee. The Steering Committee is responsible for all technical oversight, project approval and oversight, policy oversight, and trademark management for the Organization. To learn more about the Steering Committee, visit this link: <https://github.com/MixedRealityToolkit/MixedRealityToolkit-MVG/blob/main/org-docs/CHARTER.md>

docs/Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ source 'https://rubygems.org'
22

33
gem "jekyll", "~> 4.4.1"
44
gem "just-the-docs", "0.10.1"
5+
gem 'jekyll-relative-links', '~> 0.7.0'

docs/Gemfile.lock

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
addressable (2.8.7)
5-
public_suffix (>= 2.0.2, < 7.0)
6-
base64 (0.2.0)
7-
bigdecimal (3.1.9)
4+
addressable (2.8.8)
5+
public_suffix (>= 2.0.2, < 8.0)
6+
base64 (0.3.0)
7+
bigdecimal (3.3.1)
88
colorator (1.1.0)
99
concurrent-ruby (1.3.5)
10-
csv (3.3.2)
10+
csv (3.3.5)
1111
em-websocket (0.5.3)
1212
eventmachine (>= 0.12.9)
1313
http_parser.rb (~> 0)
1414
eventmachine (1.2.7)
15-
ffi (1.17.1-arm64-darwin)
16-
ffi (1.17.1-x86_64-linux-gnu)
15+
ffi (1.17.2-x86_64-linux-gnu)
1716
forwardable-extended (2.6.0)
18-
google-protobuf (4.29.3-arm64-darwin)
19-
bigdecimal
20-
rake (>= 13)
21-
google-protobuf (4.29.3-x86_64-linux)
17+
google-protobuf (4.33.1-x86_64-linux-gnu)
2218
bigdecimal
2319
rake (>= 13)
2420
http_parser.rb (0.8.0)
@@ -45,13 +41,15 @@ GEM
4541
webrick (~> 1.7)
4642
jekyll-include-cache (0.2.1)
4743
jekyll (>= 3.7, < 5.0)
48-
jekyll-sass-converter (3.0.0)
49-
sass-embedded (~> 1.54)
44+
jekyll-relative-links (0.7.0)
45+
jekyll (>= 3.3, < 5.0)
46+
jekyll-sass-converter (3.1.0)
47+
sass-embedded (~> 1.75)
5048
jekyll-seo-tag (2.8.0)
5149
jekyll (>= 3.8, < 5.0)
5250
jekyll-watch (2.2.1)
5351
listen (~> 3.0)
54-
json (2.9.1)
52+
json (2.16.0)
5553
just-the-docs (0.10.1)
5654
jekyll (>= 3.8.5)
5755
jekyll-include-cache
@@ -68,30 +66,28 @@ GEM
6866
mercenary (0.4.0)
6967
pathutil (0.16.2)
7068
forwardable-extended (~> 2.6)
71-
public_suffix (6.0.1)
72-
rake (13.2.1)
69+
public_suffix (7.0.0)
70+
rake (13.3.1)
7371
rb-fsevent (0.11.2)
7472
rb-inotify (0.11.1)
7573
ffi (~> 1.0)
76-
rexml (3.4.0)
77-
rouge (4.5.1)
74+
rexml (3.4.4)
75+
rouge (4.6.1)
7876
safe_yaml (1.0.5)
79-
sass-embedded (1.83.4-arm64-darwin)
80-
google-protobuf (~> 4.29)
81-
sass-embedded (1.83.4-x86_64-linux-gnu)
82-
google-protobuf (~> 4.29)
77+
sass-embedded (1.94.2-x86_64-linux-gnu)
78+
google-protobuf (~> 4.31)
8379
terminal-table (3.0.2)
8480
unicode-display_width (>= 1.1.1, < 3)
8581
unicode-display_width (2.6.0)
86-
webrick (1.9.1)
82+
webrick (1.9.2)
8783

8884
PLATFORMS
89-
arm64-darwin
9085
x86_64-linux-gnu
9186

9287
DEPENDENCIES
9388
jekyll (~> 4.4.1)
89+
jekyll-relative-links (~> 0.7.0)
9490
just-the-docs (= 0.10.1)
9591

9692
BUNDLED WITH
97-
2.5.9
93+
2.4.20

docs/_config.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ url: https://mixedrealitytoolkit.github.io/MixedRealityToolkit-Unity/
77
logo: "/images/MRTK_Logo_White.png"
88
favicon_ico: "/images/IconMRTKLogo.png"
99

10+
plugins:
11+
- jekyll-relative-links
12+
relative_links:
13+
enabled: true
14+
collections: true
15+
include: [ 'CONTRIBUTING.md', 'LICENSE.md', '**/CHANGELOG.md' ,'GOVERNANCE.md']
16+
1017
defaults:
1118
- scope:
1219
path: "" # an empty string here means all files in the project

0 commit comments

Comments
 (0)