Skip to content

Commit

Permalink
change color and root source
Browse files Browse the repository at this point in the history
  • Loading branch information
couleurm committed Dec 4, 2023
1 parent a5b1fd1 commit 8c9417b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions redirector.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@
#>

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

Set-Location $PSScriptRoot

function New-HtmlRedirect ($url) {
return @"
<!DOCTYPE html>
<meta http-equiv="refresh" content="0; url=$url"/>
<style>body {background-color: rgb(17, 17, 17);}</style>
<style>body {background-color: rgb(37, 38, 50);}</style>
"@
}

Expand Down Expand Up @@ -55,7 +53,7 @@ foreach ($filepath in $mdFiles.FullName) {

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

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

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

Expand Down

0 comments on commit 8c9417b

Please sign in to comment.