Skip to content

Commit

Permalink
throw stuff at it until it works
Browse files Browse the repository at this point in the history
  • Loading branch information
couleurm committed Dec 4, 2023
1 parent 5c03dd4 commit 722858d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions redirector.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#>

$root = "https://ctt.cx/"

Set-Location $PSScriptRoot

function New-HtmlRedirect ($url) {
Expand Down Expand Up @@ -52,7 +54,7 @@ foreach ($filepath in $mdFiles.FullName) {

$Parameters = @{
Path = Join-Path (Resolve-Path ./docs) $filename/index.html
Value = New-HtmlRedirect -url "$target"
Value = New-HtmlRedirect -url "$root$target"
}
if ($env:YES_MAKE_TONS_OF_FOLDERS) { Set-Content @Parameters }

Expand All @@ -75,7 +77,7 @@ foreach ($key in [string[]]$table.keys) {

$Parameters = @{
Path = Join-Path (Resolve-Path ./docs) $key/index.html
Value = New-HtmlRedirect -url "$($table.$key)"
Value = New-HtmlRedirect -url "$root$($table.$key)"
}
if ($env:YES_MAKE_TONS_OF_FOLDERS) { Set-Content @Parameters }

Expand Down

0 comments on commit 722858d

Please sign in to comment.