71 lines
1.6 KiB
JavaScript
71 lines
1.6 KiB
JavaScript
const withTrailingSlash = (path) => {
|
|
if (!path || path === "/") return "/";
|
|
return path.endsWith("/") ? path : `${path}/`;
|
|
};
|
|
|
|
export const PUBLIC_ROUTES = [
|
|
{ path: "/", href: "/", label: "Accueil", prerender: true },
|
|
{
|
|
path: "/services/prestation-maitrise-oeuvre",
|
|
href: withTrailingSlash("/services/prestation-maitrise-oeuvre"),
|
|
label: "Création de site web",
|
|
prerender: true,
|
|
},
|
|
{
|
|
path: "/services/formations-web",
|
|
href: withTrailingSlash("/services/formations-web"),
|
|
label: "Formations web",
|
|
prerender: true,
|
|
},
|
|
{
|
|
path: "/services/electricite",
|
|
href: withTrailingSlash("/services/electricite"),
|
|
label: "Graphisme",
|
|
prerender: true,
|
|
},
|
|
{
|
|
path: "/services/service-securite-incendie",
|
|
href: withTrailingSlash("/services/service-securite-incendie"),
|
|
label: "Podcast",
|
|
prerender: true,
|
|
},
|
|
{
|
|
path: "/services/expertises-tce",
|
|
href: withTrailingSlash("/services/expertises-tce"),
|
|
label: "Formations professionnelles",
|
|
prerender: true,
|
|
},
|
|
{
|
|
path: "/nosFormations",
|
|
href: withTrailingSlash("/nosFormations"),
|
|
label: "Nos formations",
|
|
prerender: true,
|
|
},
|
|
{
|
|
path: "/posts",
|
|
href: withTrailingSlash("/posts"),
|
|
label: "Actualités",
|
|
prerender: true,
|
|
},
|
|
{
|
|
path: "/contact",
|
|
href: withTrailingSlash("/contact"),
|
|
label: "Contact",
|
|
prerender: true,
|
|
},
|
|
{
|
|
path: "/search",
|
|
href: withTrailingSlash("/search"),
|
|
label: "Recherche",
|
|
prerender: true,
|
|
},
|
|
{
|
|
path: "/sitemap.xml",
|
|
href: "/sitemap.xml",
|
|
label: "Plan du site complet",
|
|
prerender: false,
|
|
},
|
|
];
|
|
|
|
export const NOT_FOUND_ROUTE = "/__404";
|