Making a Next.js portfolio findable by Google and AI assistants

· 3 min read

My personal site is a single page with tabs: Experience, Projects, Skills, Blog and About. It looks clean, but when I checked what a search engine actually gets, the picture was worse than I expected. Every tab pointed its canonical URL at the home page, so my bio and skills on the About tab were never indexed at all. The description said "The website and experience of Ryan Yovanda", which tells nobody anything.

I wanted the site to come up when someone looks for a full-stack developer who's open to relocating. That meant fixing three things: what each URL says it is, what the page says about me in a form machines can read, and what an AI assistant gets when it reads the site.

Every tab is its own page

The tabs already had their own addresses (/?section=about), but the metadata ignored them. In the App Router, generateMetadata gets the search params, so each tab can claim its own canonical URL and title:

export async function generateMetadata({ searchParams }: PageProps<"/">) {
  const { section } = await searchParams;
  return homeMetadata("en", section);
}

Inside, a small helper works out which tab that is (falling back to the first one) and builds the path: / for the first tab, /?section=about for the rest. The same path goes into the canonical URL, the Open Graph URL and the hreflang alternates for my Japanese version, so search engines see two languages of the same page rather than duplicates.

The sitemap lists every tab in both languages too, so they're found without crawling the tab links.

Saying who I am in structured data

Search engines and AI assistants both read schema.org JSON-LD. For a portfolio, the right shape is a ProfilePage whose main entity is a Person:

const jsonLd = {
  "@context": "https://schema.org",
  "@type": "ProfilePage",
  mainEntity: {
    "@type": "Person",
    name: profile.name,
    jobTitle: profile.headline,
    address: { "@type": "PostalAddress", addressLocality: "Jakarta", addressCountry: "Indonesia" },
    knowsAbout: skills,
    seeks: { "@type": "Demand", description: "Open to relocation worldwide" },
  },
};

<script
  type="application/ld+json"
  dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd).replace(/</g, "\\u003c") }}
/>

Two details matter. Replacing < stops any content from closing the script tag early. And everything comes from the CMS: the skills are read from my CV's skills section, education from the education section, so the data never drifts from what the page shows.

An availability line people and machines both see

"Open to relocation worldwide" is now a field on my profile in the CMS, in English and Japanese. It shows under my location with a small green dot, and the same text goes into the page title, the meta description and the seeks field above. A recruiter skimming the page and a crawler reading the markup get the same message.

llms.txt for AI assistants

llms.txt is a convention: a Markdown file at the root of a site that sums it up for language models. Mine is a route handler built from the CMS on every request:

export const dynamic = "force-dynamic";

export async function GET() {
  const site = await getSite();
  if (!site) return new Response("Temporarily unavailable", { status: 503 });
  return new Response(llmsText(site), {
    headers: { "Content-Type": "text/markdown; charset=utf-8" },
  });
}

llmsText writes my name, a one-line summary, the bio, contact links, every job with its bullet points, every project, the skills and the blog posts. An assistant that fetches one URL gets the whole picture, with nothing to render.

What I'd keep in mind

None of this makes a personal site outrank job boards for broad searches. What it does is make sure that when someone searches for my name, my skills, or asks an AI assistant about me, the answer is accurate and complete. That part is entirely under my control, and before this, it was mostly missing.