Skip to content

Commit bc64900

Browse files
rohanharikrclaude
andcommitted
fix: Add external link arrows to blog posts and fix search with Pagefind
- Add ↗ arrow to blog post titles and "Read more" link - Install pagefind and add to postbuild for Nextra v4 search support - Indexed 43 pages for search Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8042dda commit bc64900

3 files changed

Lines changed: 108 additions & 5 deletions

File tree

components/feed.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ const Feed = () => {
5757
<ul className="m-0 mt-6 space-y-12 md:space-y-4 no-ext-link-icon">
5858
{posts.map(i => (
5959
<li key={i.guid}>
60-
<Link href={i.link} target="_blank" className="flex flex-col md:flex-row md:items-center gap-6 group">
60+
<Link href={i.link} target="_blank" rel="noreferrer" className="flex flex-col md:flex-row md:items-center gap-6 group">
6161
<Image src={i.image} alt={i.title} width={256} height={144} className="rounded-md object-cover flex-shrink-0" priority={false} />
6262
<div>
6363
<span className="text-sm opacity-80">{i.pubDate.split(" ").slice(0, -2).join(" ")}</span>
64-
<h3 className="text-xl font-semibold my-1 group-hover:underline">{i.title}</h3>
64+
<h3 className="text-xl font-semibold my-1 group-hover:underline">{i.title}</h3>
6565
<p className={`${styles.description} opacity-80`}>
6666
{/* RSS trims the ō letter */}
6767
{i.contentSnippet.replaceAll('Hell ', 'Hellō')}
@@ -71,8 +71,7 @@ const Feed = () => {
7171
</li>
7272
))}
7373
</ul>
74-
{/* TBD Make link open in new tab (fix extenal link icon positioning) */}
75-
<Link href="https://blog.hello.coop" className="flex items-center gap-6 group md:ml-64 md:pl-6 mt-10 text-xl hover:underline font-semibold">Read more at blog.hello.coop</Link>
74+
<Link href="https://blog.hello.coop" target="_blank" rel="noreferrer" className="flex items-center gap-6 group md:ml-64 md:pl-6 mt-10 text-xl hover:underline font-semibold">Read more at blog.hello.coop ↗</Link>
7675
</>
7776
)
7877
}

package-lock.json

Lines changed: 103 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"dev": "next dev",
77
"build": "next build",
8-
"postbuild": "next-sitemap && node scripts/generate-markdown.mjs",
8+
"postbuild": "pagefind --site S3 --output-path S3/_pagefind && next-sitemap && node scripts/generate-markdown.mjs",
99
"start": "next start",
1010
"test": "linkinator ./S3 --config linkinator.config.json",
1111
"pr": "./scripts/pr.sh",
@@ -34,6 +34,7 @@
3434
"@types/node": "25.5.0",
3535
"@types/react": "19.2.14",
3636
"linkinator": "^6.0.1",
37+
"pagefind": "^1.4.0",
3738
"postcss": "^8.4.31",
3839
"tailwindcss": "^4",
3940
"turndown": "^7.2.0",

0 commit comments

Comments
 (0)