main: Fixed canonical tag

This commit is contained in:
Nathan Woodburn 2023-07-13 18:00:17 +10:00
parent 60b3e5e45c
commit bb70f69a34
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
4 changed files with 30 additions and 4 deletions

View File

@ -6,8 +6,8 @@
<!--This Website was made by Nathan Woodburn https://nathan.woodburn.au --> <!--This Website was made by Nathan Woodburn https://nathan.woodburn.au -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>Woodburn</title> <title>Woodburn</title>
<link rel="canonical" href="https://woodburn.au/404.html"> <link rel="canonical" href="https://woodburn.au/404">
<meta property="og:url" content="https://woodburn.au/404.html"> <meta property="og:url" content="https://woodburn.au/404">
<meta name="description" content="Woodburn Home Page"> <meta name="description" content="Woodburn Home Page">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="assets/img/180.png"> <link rel="apple-touch-icon" type="image/png" sizes="180x180" href="assets/img/180.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/img/16.png"> <link rel="icon" type="image/png" sizes="16x16" href="assets/img/16.png">
@ -52,4 +52,4 @@ setTimeout(callback(), 4000);
<script src="assets/js/404.js"></script> <script src="assets/js/404.js"></script>
</body> </body>
</html> </html>

1
cleanup.bat Normal file
View File

@ -0,0 +1 @@
powershell -executionpolicy bypass -File cleanup.ps1

25
cleanup.ps1 Normal file
View File

@ -0,0 +1,25 @@
# Get arg 1
$directory = $args[0]
if ($args.Length -eq 0) {
Write-Host "No directory specified using current directory"
$directory = "."
}
Write-Host "Directory: $directory"
# Go through each .html file in the directory
Get-ChildItem -Path $directory -Filter "*.html" | ForEach-Object {
# Get the file name without extension
$filename = $_.BaseName
# Read the file content
$content = Get-Content $_.FullName -Raw
# Replace occurrences of "filename.html" with "filename" (outside HTML comments)
$modifiedContent = $content -replace "$filename\.html", $filename
# Save the modified content back to the file
$modifiedContent | Set-Content $_.FullName
Write-Host "Modified: $($_.Name)"
}

View File

@ -66,4 +66,4 @@
<script src="assets/js/agency.js"></script> <script src="assets/js/agency.js"></script>
</body> </body>
</html> </html>