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 = [
156156 />
157157 </div>
158158 <div class="intro">
159 <ServiceIcon name={name} url={url} icon={icon} size={60} />
159 <ServiceIcon name={name} url={url} icon={icon} size={60} eager />
160160 <div>
161161 <p class="description" set:html={parseMarkdown(description)} />
162162 <ul>
@@ -175,9 +175,9 @@ const highlights = [
175175 {
176176 (parentSection.alternativeTo || []).length > 0 && (
177177 <div class="related-group">
178 <h4 class="avoid">
178 <h2 class="avoid">
179179 <FontAwesome iconName="faceBad" /> Avoid
180 </h4>
180 </h2>
181181 <ul>
182182 {(parentSection.alternativeTo || []).map((alt: string) => (
183183 <li>
@@ -191,9 +191,9 @@ const highlights = [
191191 {
192192 otherServices.length > 0 && (
193193 <div class="related-group">
194 <h4 class="consider">
194 <h2 class="consider">
195195 <FontAwesome iconName="faceGood" /> Also Consider
196 </h4>
196 </h2>
197197 <ul>
198198 {otherServices.map((s: Service) => (
199199 <li>
@@ -303,7 +303,7 @@ const highlights = [
303303 flex-wrap: wrap;
304304 margin: var(--space-md) 0;
305305 .related-group {
306 h4 {
306 h2 {
307307 font-size: var(--text-sm);
308308 font-family: var(--font-subtitle);
309309 text-transform: uppercase;
web/src/components/things/ServiceIcon.astro +3 −2
@@ -6,9 +6,10 @@ interface Props {
66 url: string;
77 icon?: string;
88 size?: number;
9 eager?: boolean; // Set on above-the-fold icons, so they aren't deferred
910}
1011
11const { name, url, icon, size = 40 } = Astro.props;
12const { name, url, icon, size = 40, eager = false } = Astro.props;
1213const src = icon || `https://icon.horse/icon/${formatLink(url)}`;
1314const horseSrc = `https://icon.horse/icon/${formatLink(url)}`;
1415const iconSize = Math.round(size * 0.45);
@@ -39,7 +40,7 @@ const iconSize = Math.round(size * 0.45);
3940 <img
4041 width={size}
4142 height={size}
42 loading="lazy"
43 loading={eager ? 'eager' : 'lazy'}
4344 decoding="async"
4445 class="service-icon"
4546 alt={name}
web/src/layouts/Layout.astro +2 −1
@@ -54,6 +54,7 @@ const makeSearchLd = () => {
5454 return {
5555 '@context': 'https://schema.org',
5656 '@type': 'WebSite',
57 name: 'Awesome Privacy',
5758 url: 'https://awesome-privacy.xyz/',
5859 potentialAction: [
5960 {
@@ -141,7 +142,7 @@ const makeSearchLd = () => {
141142 content="https://awesome-privacy.xyz/banner.png"
142143 />
143144 <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} />
145146 <meta name="twitter:title" content={title} />
146147 <meta name="twitter:description" content={description} />
147148 <meta
web/src/pages/[...section].astro +1
@@ -80,6 +80,7 @@ const makeDescriptionTag = () => {
8080};
8181
8282const makeCarasolData = () => {
83 if (!services.length) return undefined;
8384 return {
8485 "@context": "https://schema.org",
8586 "@type": "ItemList",
web/src/pages/[category].astro +10 −5
@@ -4,6 +4,7 @@ import SectionList from '@components/things/SectionList.astro';
44import Main from '@components/scafold/MainCard.astro';
55
66import { fetchData, slugify } from '@utils/fetch-data';
7import { truncate } from '@utils/meta-tags';
78
89import type { Section } from '../types/Service';
910import Button from '@components/form/Button.astro';
@@ -43,12 +44,8 @@ const makeCarasolData = () => {
4344 itemListElement: sections.map((section, index) => ({
4445 '@type': 'ListItem',
4546 position: index + 1,
47 name: section.name,
4648 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 },
5249 })),
5350 };
5451};
@@ -60,6 +57,13 @@ const makeBreadcrumbs = () => {
6057 ];
6158};
6259
60const 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
6367const makePaginationLinks = () => {
6468 const index = categories.findIndex((category) => category.name === title);
6569 const previousCategory = index > 0 ? categories[index - 1].name : null;
@@ -73,6 +77,7 @@ const { previous, next } = makePaginationLinks();
7377
7478<Layout
7579 title={`${title} | Awesome Privacy`}
80 description={makeDescriptionTag()}
7681 breadcrumbs={makeBreadcrumbs()}
7782 customSchemaJson={makeCarasolData()}
7883>
web/src/pages/browse.astro +4 −1
@@ -8,7 +8,10 @@ import type { Category } from '../types/Service';
88const categories: Category[] = (await fetchData())?.categories;
99---
1010
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>
1215 <div class="head-wrap">
1316 <h1>Browse</h1>
1417 <span>
web/src/pages/inventory/[...inventoryId].astro +1 −1
@@ -26,7 +26,7 @@ if (serviceList.error) {
2626}
2727---
2828
29<Layout title="Saved Services">
29<Layout title={`${makeTitle(inventoryId)} | Awesome Privacy`}>
3030 <main>
3131 <h2>{makeTitle(inventoryId)}</h2>
3232 {
web/src/pages/inventory/index.astro +4 −1
@@ -7,7 +7,10 @@ import Button from '@components/form/Button.astro';
77import EditableTitle from '@components/form/EditableTitle.svelte';
88---
99
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>
1114 <main>
1215 <h1 class="sr-only">Saved Services</h1>
1316 <div class="top-row">
web/src/pages/search/[...searchTerm].astro +1 −1
@@ -64,7 +64,7 @@ const putResultsIntoGroups = () => {
6464const beer = putResultsIntoGroups();
6565---
6666
67<Layout title="Search | Awesome Privacy">
67<Layout title={`Search: ${searchTerm} | Awesome Privacy`}>
6868 <section>
6969 <h1>Search</h1>
7070 <Search client:visible previousSearch={searchTerm} />
web/src/pages/search/index.astro +4 −1
@@ -4,7 +4,10 @@ import Layout from '@layouts/Layout.astro';
44import Search from '@components/things/Search.svelte';
55---
66
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>
811 <section>
912 <h1>Search</h1>
1013 <Search client:visible />
web/src/pages/sitemap.astro +4 −1
@@ -6,7 +6,10 @@ import { fetchData, slugify } from '@utils/fetch-data';
66const categories = ((await fetchData()) as AwesomePrivacy)?.categories || [];
77---
88
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>
1013 <main>
1114 <h1>Sitemap</h1>
1215 <p>
web/src/pages/submit.astro +4 −1
@@ -11,7 +11,10 @@ const commits = ((await fetchGitHubStats('lissy93/awesome-privacy')) || {})
1111const isDisabled = true; // will set this back to false if/when we have better way to manage the AI spam
1212---
1313
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>
1518 <section>
1619 <h1 class="page-title">Submit a Change</h1>
1720 <h2>About our Data</h2>