Home Articles Books Search About
日本語
Improving Google Search Console Indexing Issues with schema.org Structured Data

Improving Google Search Console Indexing Issues with schema.org Structured Data

Introduction While developing Digital Literary Map of Japan, a bilingual (Japanese/English) database of literary places in classical Japanese literature, Google Search Console reported 391 pages as “Crawled - currently not indexed.” Google was visiting these pages but choosing not to include them in its index. Why? One key measure we took was implementing schema.org structured data. In this post, I’ll explain what structured data is, how we implemented it, and what improvements we expect. ...

How to Implement sitemap.ts When Using output: 'export' in Next.js 15

How to Implement sitemap.ts When Using output: 'export' in Next.js 15

This article was written by AI after a human verified the implementation. Background When using static site generation (output: 'export') in Next.js 15, you may encounter an error with the sitemap.ts implementation: Error: export const dynamic = "force-static"/export const revalidate not configured on route "/sitemap.xml" with "output: export". Solution This problem can be solved by adding the following two exports to sitemap.ts: // src/app/sitemap.ts import { MetadataRoute } from 'next'; export const dynamic = 'force-static'; export const revalidate = false; export default function sitemap(): MetadataRoute.Sitemap { // sitemap generation logic } Implementation Example import { MetadataRoute } from 'next'; import { routing } from '@/i18n/routing'; export const dynamic = 'force-static'; export const revalidate = false; export default function sitemap(): MetadataRoute.Sitemap { const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || 'http://localhost:3000'; const staticPages = [ '', // Home page '/about', '/example', ]; const sitemapEntries: MetadataRoute.Sitemap = routing.locales.flatMap((locale) => staticPages.map((page) => ({ url: `${baseUrl}/${locale}${page}`, lastModified: new Date(), changeFrequency: page === '' ? 'daily' : 'weekly' as const, priority: page === '' ? 1 : 0.8, })) ); return sitemapEntries; } Verification With this implementation, /out/sitemap.xml is correctly generated when running npm run build. ...