Skip to content

Commit fefe4fd

Browse files
authored
Exclude media cards from search (#1275)
1 parent 34624c4 commit fefe4fd

File tree

9 files changed

+15
-10
lines changed

9 files changed

+15
-10
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ check:
4444

4545
build:
4646
pnpm run astro build --mode $(MODE)
47+
pnpm pagefind
4748

4849
preview: RELEASES_DIR = $(VPS_PREVIEW_PATH)/$(SAFE_BRANCH)/releases
4950
preview: TARGET = $(RELEASES_DIR)/$(TIMESTAMP)

astro.config.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import remarkToc from "remark-toc";
66
import rehypeSlug from "rehype-slug";
77
import rehypeAutolinkHeadings from "rehype-autolink-headings";
88
import metaTags from "astro-meta-tags";
9-
import pagefind from "astro-pagefind";
109
import deleteUnusedImages from "astro-delete-unused-images";
1110
import { execSync } from "node:child_process";
1211
import svelte from "@astrojs/svelte";
@@ -116,7 +115,6 @@ export default defineConfig({
116115
mdx(),
117116
sitemap(),
118117
metaTags(),
119-
pagefind(),
120118
deleteUnusedImages(),
121119
svelte(),
122120
compress({

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"dev": "astro dev",
77
"start": "astro dev",
8-
"build": "astro check && astro build && pnpm pagefind --site dist",
8+
"build": "astro check && astro build && pnpm pagefind",
99
"preview": "astro preview",
1010
"astro": "astro",
1111
"format": "prettier --write --plugin=prettier-plugin-astro ."

pagefind.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
site: dist
22
glob: "**/*.{html}"
3+
root_selector: "main"

src/layouts/ScheduleLayout.astro

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22
import Layout from "@layouts/Layout.astro";
33
import Section from "@ui/Section.astro";
44
import Note from "@ui/Note.astro";
5+
import Headline from "@ui/Headline.astro"
6+
import { slugify } from '@utils/content';
57
68
export interface Props {
79
title?: string;
810
description: string;
11+
headline: string;
912
}
1013
11-
const { title, description } = Astro.props;
14+
const { title, description, headline } = Astro.props;
1215
---
1316
<Layout title={title || "Schedule for 2025"} description={description} >
1417
<Fragment slot="head">
@@ -17,8 +20,10 @@ const { title, description } = Astro.props;
1720
</Fragment>
1821
<Section>
1922

20-
<Note type="warning">This is an early version of the schedule and may still change. If you're planning travel around specific sessions, please keep that in mind.</Note>
21-
<Note type="info" >Mark talks as favorites by opening their details and tapping the ❤️ icon. Your selections are saved locally and will only be visible on this device.</Note>
23+
<Headline as="h1"id={slugify(headline)} title={headline} />
24+
25+
<Note type="warning">This is an early version of the schedule and may still change. If you're planning travel around specific sessions, please keep that in mind.</Note>
26+
<Note type="info" >Mark talks as favorites by opening their details and tapping the ❤️ icon. Your selections are saved locally and will only be visible on this device.</Note>
2227

2328
<div class="layout-wrapper2">
2429
<slot />

src/pages/schedule.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const days = await getCollection("days");
1919
2020
---
2121

22-
<Layout description="Browse all scheduled events.">
22+
<Layout description="Browse all scheduled events." headline="Schedule">
2323

2424
{
2525
days.map((day) => (

src/pages/schedule/day/[day].astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ if (!dayEntry) {
2222
const day: Day = dayEntry;
2323
---
2424

25-
<Layout description=`Schedule for the day: ${day.id}`>
25+
<Layout description=`Schedule for the day: ${day.id}` headline=`Schedule for the day: ${day.id}`>
2626
<ScheduleDay day={day} />
2727
</Layout>

src/pages/schedule/talks.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const days = await getCollection("days");
2323
2424
---
2525

26-
<Layout description="Browse all scheduled talks.">
26+
<Layout description="Browse all scheduled talks." headline="Talks schedule">
2727
{
2828
days
2929
.filter((day) => {

src/pages/schedule/tutorials.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const days = await getCollection("days");
2323
2424
---
2525

26-
<Layout description="Browse all scheduled tutorials.">
26+
<Layout description="Browse all scheduled tutorials." headline="Tutorials schedule">
2727
{
2828
days
2929
.filter((day) => {

0 commit comments

Comments
 (0)