about page
All checks were successful
Deploy / build-deploy (push) Successful in 4m46s

This commit is contained in:
Jorijn van der Graaf 2026-08-05 07:05:00 +02:00
commit cc02023625
10 changed files with 341 additions and 39 deletions

View file

@ -20,6 +20,7 @@ namespace Catcrafts {
export enum class RouteKind {
Home,
About, // /about — the person behind the company
Projects,
Posts,
Demos, // /demos — the list
@ -92,6 +93,7 @@ export Route ParseRoute(std::string_view path, std::string_view query = {}) {
r.query = std::string(query);
if (p == "/") { r.kind = RouteKind::Home; return r; }
if (p == "/about") { r.kind = RouteKind::About; return r; }
if (p == "/projects") { r.kind = RouteKind::Projects; return r; }
if (p == "/posts") { r.kind = RouteKind::Posts; return r; }
if (p == "/demos") { r.kind = RouteKind::Demos; return r; }
@ -182,12 +184,13 @@ export struct NavItem {
};
export std::span<const NavItem> NavItems() {
static constexpr std::array<NavItem, 5> items{{
static constexpr std::array<NavItem, 6> items{{
{ "Home", "/", RouteKind::Home },
{ "Shop", "/shop", RouteKind::Shop },
{ "Projects", "/projects", RouteKind::Projects },
{ "Posts", "/posts", RouteKind::Posts },
{ "Demos", "/demos", RouteKind::Demos },
{ "About", "/about", RouteKind::About },
}};
return items;
}
@ -199,8 +202,8 @@ export std::span<const std::string_view> SitemapPaths() {
// /shop/<slug> entries are appended by the caller from the loaded product
// list — the sitemap has to reflect what actually exists, and a hardcoded
// slug list here would be one more thing to forget to update.
static constexpr std::array<std::string_view, 8> paths{
"/", "/shop", "/projects", "/posts", "/demos",
static constexpr std::array<std::string_view, 9> paths{
"/", "/about", "/shop", "/projects", "/posts", "/demos",
// Legal pages are indexable on purpose: they are trust signals, and a
// buyer looking for the returns policy before purchasing should be able
// to find it from a search engine.