From 8e0eee08b4c28216a1f2d00f7fa812735544f178 Mon Sep 17 00:00:00 2001 From: Christoph von Gellhorn Date: Mon, 8 Jul 2024 21:09:33 +1000 Subject: [PATCH] chore: update nav and header --- src/components/widgets/Header.astro | 2 +- src/config.yaml | 2 +- src/layouts/PageLayout.astro | 2 +- src/navigation.js | 174 +++++++++--------- src/pages/[...blog]/[...page].astro | 1 + .../[...blog]/[category]/[...page].astro | 1 + src/pages/[...blog]/[tag]/[...page].astro | 1 + src/pages/[...blog]/index.astro | 1 + src/types.d.ts | 1 + 9 files changed, 96 insertions(+), 89 deletions(-) diff --git a/src/components/widgets/Header.astro b/src/components/widgets/Header.astro index 8e6cb27..bc1cd2a 100644 --- a/src/components/widgets/Header.astro +++ b/src/components/widgets/Header.astro @@ -136,7 +136,6 @@ const currentPath = `/${trimSlash(new URL(Astro.url).pathname)}`; >
- {showToggleTheme && } { showRssFeed && ( ) } + {showToggleTheme && }
{ actions?.length ? ( diff --git a/src/config.yaml b/src/config.yaml index ec5c783..d923c9e 100644 --- a/src/config.yaml +++ b/src/config.yaml @@ -10,7 +10,7 @@ site: metadata: title: default: Sturmfrei Pty Ltd - template: '%s — Sturmfrei' + template: '%s · Sturmfrei' description: "\U0001F680 Delightful apps and tools for the web." robots: index: true diff --git a/src/layouts/PageLayout.astro b/src/layouts/PageLayout.astro index d80f5b7..08c704c 100644 --- a/src/layouts/PageLayout.astro +++ b/src/layouts/PageLayout.astro @@ -20,7 +20,7 @@ const { metadata } = Astro.props; --> -
+
diff --git a/src/navigation.js b/src/navigation.js index e737357..1625d9d 100644 --- a/src/navigation.js +++ b/src/navigation.js @@ -1,9 +1,9 @@ -import { getPermalink, getAsset, getBlogPermalink } from './utils/permalinks'; +import { getPermalink, getBlogPermalink } from './utils/permalinks'; export const headerData = { links: [ { - text: 'Homes', + text: 'Products', links: [ { text: 'SaaS', @@ -23,92 +23,94 @@ export const headerData = { }, ], }, + // { + // text: 'Pages', + // links: [ + // { + // text: 'Features (Anchor Link)', + // href: getPermalink('/#features'), + // }, + // { + // text: 'Services', + // href: getPermalink('/services'), + // }, + // { + // text: 'Pricing', + // href: getPermalink('/pricing'), + // }, + // { + // text: 'About us', + // href: getPermalink('/about'), + // }, + // { + // text: 'Contact', + // href: getPermalink('/contact'), + // }, + // { + // text: 'Terms', + // href: getPermalink('/terms'), + // }, + // { + // text: 'Privacy policy', + // href: getPermalink('/privacy'), + // }, + // ], + // }, { - text: 'Pages', - links: [ - { - text: 'Features (Anchor Link)', - href: getPermalink('/#features'), - }, - { - text: 'Services', - href: getPermalink('/services'), - }, - { - text: 'Pricing', - href: getPermalink('/pricing'), - }, - { - text: 'About us', - href: getPermalink('/about'), - }, - { - text: 'Contact', - href: getPermalink('/contact'), - }, - { - text: 'Terms', - href: getPermalink('/terms'), - }, - { - text: 'Privacy policy', - href: getPermalink('/privacy'), - }, - ], - }, - { - text: 'Landing', - links: [ - { - text: 'Lead Generation', - href: getPermalink('/landing/lead-generation'), - }, - { - text: 'Long-form Sales', - href: getPermalink('/landing/sales'), - }, - { - text: 'Click-Through', - href: getPermalink('/landing/click-through'), - }, - { - text: 'Product Details (or Services)', - href: getPermalink('/landing/product'), - }, - { - text: 'Coming Soon or Pre-Launch', - href: getPermalink('/landing/pre-launch'), - }, - { - text: 'Subscription', - href: getPermalink('/landing/subscription'), - }, - ], + text: 'About', + href: getPermalink('/landing/sales'), + // links: [ + // { + // text: 'Lead Generation', + // href: getPermalink('/landing/lead-generation'), + // }, + // { + // text: 'Long-form Sales', + // href: getPermalink('/landing/sales'), + // }, + // { + // text: 'Click-Through', + // href: getPermalink('/landing/click-through'), + // }, + // { + // text: 'Product Details (or Services)', + // href: getPermalink('/landing/product'), + // }, + // { + // text: 'Coming Soon or Pre-Launch', + // href: getPermalink('/landing/pre-launch'), + // }, + // { + // text: 'Subscription', + // href: getPermalink('/landing/subscription'), + // }, + // ], }, { text: 'Blog', - links: [ - { - text: 'Blog List', - href: getBlogPermalink(), - }, - { - text: 'Article', - href: getPermalink('get-started-website-with-astro-tailwind-css', 'post'), - }, - { - text: 'Article (with MDX)', - href: getPermalink('markdown-elements-demo-post', 'post'), - }, - { - text: 'Category Page', - href: getPermalink('tutorials', 'category'), - }, - { - text: 'Tag Page', - href: getPermalink('astro', 'tag'), - }, - ], + href: getBlogPermalink(), + // links: [ + // { + // text: 'Blog List', + // href: getBlogPermalink(), + // }, + // { + // text: 'Article', + // href: getPermalink('get-started-website-with-astro-tailwind-css', 'post'), + // }, + // { + // text: 'Article (with MDX)', + // href: getPermalink('markdown-elements-demo-post', 'post'), + // }, + // { + // text: 'Category Page', + // href: getPermalink('tutorials', 'category'), + // }, + // { + // text: 'Tag Page', + // href: getPermalink('astro', 'tag'), + // }, + // ], }, ], // actions: [{ text: 'Download', href: 'https://github.com/onwidget/astrowind', target: '_blank' }], @@ -169,8 +171,8 @@ export const footerData = { { ariaLabel: 'X', icon: 'tabler:brand-x', href: '#' }, { ariaLabel: 'Instagram', icon: 'tabler:brand-instagram', href: '#' }, { ariaLabel: 'Facebook', icon: 'tabler:brand-facebook', href: '#' }, - { ariaLabel: 'RSS', icon: 'tabler:rss', href: getAsset('/rss.xml') }, - { ariaLabel: 'Github', icon: 'tabler:brand-github', href: 'https://github.com/onwidget/astrowind' }, + { ariaLabel: 'Github', icon: 'tabler:brand-github', href: 'https://github.com/sturmfreico' }, + // { ariaLabel: 'RSS', icon: 'tabler:rss', href: getAsset('/rss.xml') }, ], // footNote: ` // onWidget logo diff --git a/src/pages/[...blog]/[...page].astro b/src/pages/[...blog]/[...page].astro index 5a6da41..ecb85e2 100644 --- a/src/pages/[...blog]/[...page].astro +++ b/src/pages/[...blog]/[...page].astro @@ -32,6 +32,7 @@ const metadata = { openGraph: { type: 'blog', }, + showRssFeed: true, }; --- diff --git a/src/pages/[...blog]/[category]/[...page].astro b/src/pages/[...blog]/[category]/[...page].astro index e1c4ff6..35494cc 100644 --- a/src/pages/[...blog]/[category]/[...page].astro +++ b/src/pages/[...blog]/[category]/[...page].astro @@ -25,6 +25,7 @@ const metadata = { index: blogCategoryRobots?.index, follow: blogCategoryRobots?.follow, }, + showRssFeed: true, }; --- diff --git a/src/pages/[...blog]/[tag]/[...page].astro b/src/pages/[...blog]/[tag]/[...page].astro index 86a767b..ab2702f 100644 --- a/src/pages/[...blog]/[tag]/[...page].astro +++ b/src/pages/[...blog]/[tag]/[...page].astro @@ -25,6 +25,7 @@ const metadata = { index: blogTagRobots?.index, follow: blogTagRobots?.follow, }, + showRssFeed: true, }; --- diff --git a/src/pages/[...blog]/index.astro b/src/pages/[...blog]/index.astro index 421927c..aa3aff4 100644 --- a/src/pages/[...blog]/index.astro +++ b/src/pages/[...blog]/index.astro @@ -40,6 +40,7 @@ const metadata = merge( ? { images: [{ url: image, width: (image as ImageMetadata)?.width, height: (image as ImageMetadata)?.height }] } : {}), }, + showRssFeed: true, }, { ...(post?.metadata ? { ...post.metadata, canonical: post.metadata?.canonical || url } : {}) } ) as MetaData; diff --git a/src/types.d.ts b/src/types.d.ts index 6c4223b..8ad0bb0 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -61,6 +61,7 @@ export interface MetaData { openGraph?: MetaDataOpenGraph; twitter?: MetaDataTwitter; + showRssFeed?: boolean; } export interface MetaDataRobots {