Commit ff531f2549
ff531f2549baeb689d1d9a11a23af9c04a6886d3
parent: e1bf34dab0
Unsigned
Alicia Sykes <alicia@omg.lol> · 2026-08-08 22:15 UTC
Sets right meta tags on subpages
Layout: unified · split
web/src/components/things/ListingHero.astro
+6 −6
| @@ -156,7 +156,7 @@ const highlights = [ |
| 156 | 156 | /> |
| 157 | 157 | </div> |
| 158 | 158 | <div class="intro"> |
| 159 | | <ServiceIcon name={name} url={url} icon={icon} size={60} /> |
| 159 | <ServiceIcon name={name} url={url} icon={icon} size={60} eager /> |
| 160 | 160 | <div> |
| 161 | 161 | <p class="description" set:html={parseMarkdown(description)} /> |
| 162 | 162 | <ul> |
| @@ -175,9 +175,9 @@ const highlights = [ |
| 175 | 175 | { |
| 176 | 176 | (parentSection.alternativeTo || []).length > 0 && ( |
| 177 | 177 | <div class="related-group"> |
| 178 | | <h4 class="avoid"> |
| 178 | <h2 class="avoid"> |
| 179 | 179 | <FontAwesome iconName="faceBad" /> Avoid |
| 180 | | </h4> |
| 180 | </h2> |
| 181 | 181 | <ul> |
| 182 | 182 | {(parentSection.alternativeTo || []).map((alt: string) => ( |
| 183 | 183 | <li> |
| @@ -191,9 +191,9 @@ const highlights = [ |
| 191 | 191 | { |
| 192 | 192 | otherServices.length > 0 && ( |
| 193 | 193 | <div class="related-group"> |
| 194 | | <h4 class="consider"> |
| 194 | <h2 class="consider"> |
| 195 | 195 | <FontAwesome iconName="faceGood" /> Also Consider |
| 196 | | </h4> |
| 196 | </h2> |
| 197 | 197 | <ul> |
| 198 | 198 | {otherServices.map((s: Service) => ( |
| 199 | 199 | <li> |
| @@ -303,7 +303,7 @@ const highlights = [ |
| 303 | 303 | flex-wrap: wrap; |
| 304 | 304 | margin: var(--space-md) 0; |
| 305 | 305 | .related-group { |
| 306 | | h4 { |
| 306 | h2 { |
| 307 | 307 | font-size: var(--text-sm); |
| 308 | 308 | font-family: var(--font-subtitle); |
| 309 | 309 | text-transform: uppercase; |
web/src/components/things/ServiceIcon.astro
+3 −2
| @@ -6,9 +6,10 @@ interface Props { |
| 6 | 6 | url: string; |
| 7 | 7 | icon?: string; |
| 8 | 8 | size?: number; |
| 9 | eager?: boolean; // Set on above-the-fold icons, so they aren't deferred |
| 9 | 10 | } |
| 10 | 11 | |
| 11 | | const { name, url, icon, size = 40 } = Astro.props; |
| 12 | const { name, url, icon, size = 40, eager = false } = Astro.props; |
| 12 | 13 | const src = icon || `https://icon.horse/icon/${formatLink(url)}`; |
| 13 | 14 | const horseSrc = `https://icon.horse/icon/${formatLink(url)}`; |
| 14 | 15 | const iconSize = Math.round(size * 0.45); |
| @@ -39,7 +40,7 @@ const iconSize = Math.round(size * 0.45); |
| 39 | 40 | <img |
| 40 | 41 | width={size} |
| 41 | 42 | height={size} |
| 42 | | loading="lazy" |
| 43 | loading={eager ? 'eager' : 'lazy'} |
| 43 | 44 | decoding="async" |
| 44 | 45 | class="service-icon" |
| 45 | 46 | alt={name} |
web/src/layouts/Layout.astro
+2 −1
| @@ -54,6 +54,7 @@ const makeSearchLd = () => { |
| 54 | 54 | return { |
| 55 | 55 | '@context': 'https://schema.org', |
| 56 | 56 | '@type': 'WebSite', |
| 57 | name: 'Awesome Privacy', |
| 57 | 58 | url: 'https://awesome-privacy.xyz/', |
| 58 | 59 | potentialAction: [ |
| 59 | 60 | { |
| @@ -141,7 +142,7 @@ const makeSearchLd = () => { |
| 141 | 142 | content="https://awesome-privacy.xyz/banner.png" |
| 142 | 143 | /> |
| 143 | 144 | <meta name="twitter:card" content="summary_large_image" /> |
| 144 | | <meta name="twitter:url" content="https://awesome-privacy.xyz" /> |
| 145 | <meta name="twitter:url" content={canonical} /> |
| 145 | 146 | <meta name="twitter:title" content={title} /> |
| 146 | 147 | <meta name="twitter:description" content={description} /> |
| 147 | 148 | <meta |
web/src/pages/[...section].astro
+1
| @@ -80,6 +80,7 @@ const makeDescriptionTag = () => { |
| 80 | 80 | }; |
| 81 | 81 | |
| 82 | 82 | const makeCarasolData = () => { |
| 83 | if (!services.length) return undefined; |
| 83 | 84 | return { |
| 84 | 85 | "@context": "https://schema.org", |
| 85 | 86 | "@type": "ItemList", |
web/src/pages/[category].astro
+10 −5
| @@ -4,6 +4,7 @@ import SectionList from '@components/things/SectionList.astro'; |
| 4 | 4 | import Main from '@components/scafold/MainCard.astro'; |
| 5 | 5 | |
| 6 | 6 | import { fetchData, slugify } from '@utils/fetch-data'; |
| 7 | import { truncate } from '@utils/meta-tags'; |
| 7 | 8 | |
| 8 | 9 | import type { Section } from '../types/Service'; |
| 9 | 10 | import Button from '@components/form/Button.astro'; |
| @@ -43,12 +44,8 @@ const makeCarasolData = () => { |
| 43 | 44 | itemListElement: sections.map((section, index) => ({ |
| 44 | 45 | '@type': 'ListItem', |
| 45 | 46 | position: index + 1, |
| 47 | name: section.name, |
| 46 | 48 | url: `https://awesome-privacy.xyz/${slugify(title)}/${slugify(section.name)}/`, |
| 47 | | item: { |
| 48 | | '@type': 'Service', |
| 49 | | name: section.name, |
| 50 | | url: `https://awesome-privacy.xyz/${slugify(title)}/${slugify(section.name)}/`, |
| 51 | | }, |
| 52 | 49 | })), |
| 53 | 50 | }; |
| 54 | 51 | }; |
| @@ -60,6 +57,13 @@ const makeBreadcrumbs = () => { |
| 60 | 57 | ]; |
| 61 | 58 | }; |
| 62 | 59 | |
| 60 | const makeDescriptionTag = () => |
| 61 | truncate( |
| 62 | `Privacy-respecting ${title.toLowerCase()}: ` + |
| 63 | `${sections.map((section) => section.name).join(', ')}. ` + |
| 64 | `Compare free, open source and secure alternatives.`, |
| 65 | ); |
| 66 | |
| 63 | 67 | const makePaginationLinks = () => { |
| 64 | 68 | const index = categories.findIndex((category) => category.name === title); |
| 65 | 69 | const previousCategory = index > 0 ? categories[index - 1].name : null; |
| @@ -73,6 +77,7 @@ const { previous, next } = makePaginationLinks(); |
| 73 | 77 | |
| 74 | 78 | <Layout |
| 75 | 79 | title={`${title} | Awesome Privacy`} |
| 80 | description={makeDescriptionTag()} |
| 76 | 81 | breadcrumbs={makeBreadcrumbs()} |
| 77 | 82 | customSchemaJson={makeCarasolData()} |
| 78 | 83 | > |
web/src/pages/browse.astro
+4 −1
| @@ -8,7 +8,10 @@ import type { Category } from '../types/Service'; |
| 8 | 8 | const categories: Category[] = (await fetchData())?.categories; |
| 9 | 9 | --- |
| 10 | 10 | |
| 11 | | <Layout title="Browse"> |
| 11 | <Layout |
| 12 | title="Browse Categories | Awesome Privacy" |
| 13 | description="Browse every category of privacy-respecting software, from browsers and VPNs to encrypted messaging, cloud storage and password managers." |
| 14 | > |
| 12 | 15 | <div class="head-wrap"> |
| 13 | 16 | <h1>Browse</h1> |
| 14 | 17 | <span> |
web/src/pages/inventory/[...inventoryId].astro
+1 −1
| @@ -26,7 +26,7 @@ if (serviceList.error) { |
| 26 | 26 | } |
| 27 | 27 | --- |
| 28 | 28 | |
| 29 | | <Layout title="Saved Services"> |
| 29 | <Layout title={`${makeTitle(inventoryId)} | Awesome Privacy`}> |
| 30 | 30 | <main> |
| 31 | 31 | <h2>{makeTitle(inventoryId)}</h2> |
| 32 | 32 | { |
web/src/pages/inventory/index.astro
+4 −1
| @@ -7,7 +7,10 @@ import Button from '@components/form/Button.astro'; |
| 7 | 7 | import EditableTitle from '@components/form/EditableTitle.svelte'; |
| 8 | 8 | --- |
| 9 | 9 | |
| 10 | | <Layout title="Saved Services"> |
| 10 | <Layout |
| 11 | title="Saved Services | Awesome Privacy" |
| 12 | description="Your personal shortlist of privacy-respecting apps and services, saved in your browser and sharable with a link." |
| 13 | > |
| 11 | 14 | <main> |
| 12 | 15 | <h1 class="sr-only">Saved Services</h1> |
| 13 | 16 | <div class="top-row"> |
web/src/pages/search/[...searchTerm].astro
+1 −1
| @@ -64,7 +64,7 @@ const putResultsIntoGroups = () => { |
| 64 | 64 | const beer = putResultsIntoGroups(); |
| 65 | 65 | --- |
| 66 | 66 | |
| 67 | | <Layout title="Search | Awesome Privacy"> |
| 67 | <Layout title={`Search: ${searchTerm} | Awesome Privacy`}> |
| 68 | 68 | <section> |
| 69 | 69 | <h1>Search</h1> |
| 70 | 70 | <Search client:visible previousSearch={searchTerm} /> |
web/src/pages/search/index.astro
+4 −1
| @@ -4,7 +4,10 @@ import Layout from '@layouts/Layout.astro'; |
| 4 | 4 | import Search from '@components/things/Search.svelte'; |
| 5 | 5 | --- |
| 6 | 6 | |
| 7 | | <Layout title="Search | Awesome Privacy"> |
| 7 | <Layout |
| 8 | title="Search | Awesome Privacy" |
| 9 | description="Search hundreds of privacy-respecting apps and services by name, category or the mainstream product you want to replace." |
| 10 | > |
| 8 | 11 | <section> |
| 9 | 12 | <h1>Search</h1> |
| 10 | 13 | <Search client:visible /> |
web/src/pages/sitemap.astro
+4 −1
| @@ -6,7 +6,10 @@ import { fetchData, slugify } from '@utils/fetch-data'; |
| 6 | 6 | const categories = ((await fetchData()) as AwesomePrivacy)?.categories || []; |
| 7 | 7 | --- |
| 8 | 8 | |
| 9 | | <Layout title="All Links | Awesome Privacy"> |
| 9 | <Layout |
| 10 | title="All Links | Awesome Privacy" |
| 11 | description="A full index of every page on Awesome Privacy, covering all categories, sections and individual service listings." |
| 12 | > |
| 10 | 13 | <main> |
| 11 | 14 | <h1>Sitemap</h1> |
| 12 | 15 | <p> |
web/src/pages/submit.astro
+4 −1
| @@ -11,7 +11,10 @@ const commits = ((await fetchGitHubStats('lissy93/awesome-privacy')) || {}) |
| 11 | 11 | const isDisabled = true; // will set this back to false if/when we have better way to manage the AI spam |
| 12 | 12 | --- |
| 13 | 13 | |
| 14 | | <Layout title="Submit a Change | Awesome Privacy"> |
| 14 | <Layout |
| 15 | title="Submit a Change | Awesome Privacy" |
| 16 | description="Suggest a new service, correct an existing entry or propose a new category. All data is community maintained, openly, via Git." |
| 17 | > |
| 15 | 18 | <section> |
| 16 | 19 | <h1 class="page-title">Submit a Change</h1> |
| 17 | 20 | <h2>About our Data</h2> |