Added sitemap, with filtering of disabled pages, removal of content from disabled pages, robots.txt generation pointing to the sitemap, adjustment of the Navbar generation to ignore disabled entries, e2e check for all pages including a non-blank title, content for body mods page
All checks were successful
Build and Test - Staging / test (pull_request) Successful in 2m44s
Build and Test - Staging / build_and_push (pull_request) Successful in 2m14s
Build and Test - Staging / deploy_staging (pull_request) Successful in 6s

This commit is contained in:
2025-11-09 21:50:49 -08:00
parent d0f5838cac
commit c3673b76b6
21 changed files with 228 additions and 109 deletions

View File

@@ -30,6 +30,7 @@ export const siteLayout: navLink[] = [
path: "robotic-oceanographic-surface-sampler",
},
{
enabled: false,
navText: "LeConte Glacier Deployments",
path: "leconte-glacier-deployments",
}
@@ -40,6 +41,7 @@ export const siteLayout: navLink[] = [
path: "osu-sinnhuber-aquatic-research-laboratory",
children: [
{
enabled: false,
navText: "Team Lead",
path: "team-lead",
},
@@ -48,18 +50,22 @@ export const siteLayout: navLink[] = [
path: "zebrafish-embryo-pick-and-plate",
},
{
enabled: false,
navText: "Shuttlebox Behavior System",
path: "shuttlebox-behavior-system",
},
{
enabled: false,
navText: "Dechorionator",
path: "dechorionator",
},
{
enabled: false,
navText: "Denso Embryo Pick and Plate",
path: "denso-embryo-pick-and-plate",
},
{
enabled: false,
navText: "ZScan Processor",
path: "zscan-processor",
}
@@ -74,14 +80,17 @@ export const siteLayout: navLink[] = [
path: "mars-rover-software-team-lead",
},
{
enabled: false,
navText: "Mars Rover Emergency Software Team Lead",
path: "mars-rover-emergency-software-team-lead",
},
{
enabled: false,
navText: "Mars Rover Electrical Team Lead",
path: "mars-rover-electrical-team-lead",
},
{
enabled: false,
navText: "Club Officer",
path: "club-officer",
}
@@ -95,12 +104,13 @@ export const siteLayout: navLink[] = [
children: [
{
enabled: false,
navText: "Homelab", path: "homelab",
children: [
{navText: "Home Server Rack", path: "home-server-rack"},
{navText: "Offsite Backup Rack", path: "offsite-backup-rack"},
{navText: "Kubernetes Cluster", path: "kubernetes-cluster"},
{navText: "Home Automation", path: "home-automation"},
{enabled: false, navText: "Home Server Rack", path: "home-server-rack"},
{enabled: false, navText: "Offsite Backup Rack", path: "offsite-backup-rack"},
{enabled: false, navText: "Kubernetes Cluster", path: "kubernetes-cluster"},
{enabled: false, navText: "Home Automation", path: "home-automation"},
]
},
{
@@ -109,30 +119,34 @@ export const siteLayout: navLink[] = [
children: [
{navText: "Lineup", path: "lineup"},
{
enabled: false,
navText: "Custom Accessories",
path: "custom-accessories",
children: [
{navText: "Chubby Buttons 2 Mount", path: "chubby-buttons-2-mount"},
]
},
// {
// navText: "Trips",
// path: "trips",
// children: [
// {navText: "2025-08 | Alaska ", path: "2025-08-alaska"},
// {navText: "2024-10 | Norway ", path: "2024-10-norway"}
// ]
// },
{
enabled: false,
navText: "Trips",
path: "trips",
children: [
{navText: "2025-08 | Alaska ", path: "2025-08-alaska", enabled: false,},
{navText: "2024-10 | Norway ", path: "2024-10-norway", enabled: false,}
]
},
]
},
// {
// title: "Projects", path: "projects",
// children: [
// {title: "Shed Solar", path: "shed-solar"},
// {title: "OSSM Overkill Edition", path: "ossm-overkill-edition"},
// ]
// },
{navText: "NixOS", path: "nixos"},
{
enabled: false,
navText: "Projects",
path: "projects",
children: [
{navText: "Shed Solar", path: "shed-solar", enabled: false},
{navText: "OSSM Overkill Edition", path: "ossm-overkill-edition", enabled: false},
]
},
{enabled: false, navText: "NixOS", path: "nixos"},
{navText: "Body Mods", path: "body-mods"},
]
},
@@ -140,7 +154,7 @@ export const siteLayout: navLink[] = [
navText: "Resumes",
path: "resume",
children: [
// {title: "2025-11-10 | Complete CV", path: "2025-11-10-complete-cv"},
{enabled: false, navText: "2025-11-10 | Complete CV", path: "2025-11-10-complete-cv"},
{navText: "2025-11-10 | Infrastructure Engineer", path: "2025-11-10-infrastructure-engineer"},
{navText: "2019-07-01 | Hardware Test Engineer", path: "2019-07-01-hardware-test-engineer"},
]
@@ -150,7 +164,13 @@ export const siteLayout: navLink[] = [
]
export const pathToMetadata = (path: string): navLink => {
const paths = path.split("/").filter((entry) => entry);
let paths = path.split("/").filter((entry) => entry);
// Handle root path of /
if (paths.length < 1) {
paths = [""]
}
let currentEntries: navLink[] = siteLayout;
let foundEntry: navLink | undefined;
@@ -175,7 +195,8 @@ export const pathToMetadata = (path: string): navLink => {
export const getPaths = (
currentEntries: navLink[] = siteLayout,
paths: string[] = []
paths: string[] = [],
disabledOnly = false
): string[] => {
let foundPaths: string[] = [];
@@ -183,11 +204,14 @@ export const getPaths = (
if (currentEntry.children && currentEntry.children.length > 0) {
foundPaths = [
...foundPaths,
...getPaths(currentEntry.children, [...paths, currentEntry.path || ""])
...getPaths(currentEntry.children, [...paths, currentEntry.path || ""], disabledOnly)
]
} else {
foundPaths.push("/" + [...paths, currentEntry.path || ""].join("/"));
let enabled = currentEntry.enabled ?? true;
if (disabledOnly ? !enabled : enabled) {
foundPaths.push("/" + [...paths, currentEntry.path || ""].join("/"));
}
}
}
return foundPaths.filter(path => path !== "/");
return [...new Set(foundPaths)];
}