Added this website as content to hobbies, refactored some items into site-layout
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type { navLink } from "@interfaces/site-layout.ts";
|
||||
|
||||
export const siteLayout: navLink[] = [
|
||||
// Standard navbar entries
|
||||
{ navText: "About", path: "" },
|
||||
{ navText: "Education", path: "education" },
|
||||
{
|
||||
@@ -187,6 +188,7 @@ export const siteLayout: navLink[] = [
|
||||
},
|
||||
{ enabled: false, navText: "NixOS", path: "nixos" },
|
||||
{ navText: "Body Mods", path: "body-mods" },
|
||||
{ navText: "This Website", path: "this-website" },
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -268,3 +270,13 @@ export const getPaths = (
|
||||
}
|
||||
return [...new Set(foundPaths)];
|
||||
};
|
||||
|
||||
export const getNavLinkSuffix = (paths: string[], entry: navLink): string => {
|
||||
return "-" + [...paths, entry.path].join("-");
|
||||
};
|
||||
export const getHrefPath = (paths: string[], entry: navLink): string => {
|
||||
return entry.pubpath
|
||||
? entry.pubpath
|
||||
: "/" +
|
||||
(paths && paths.length ? [...paths, entry.path].join("/") : entry.path);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user