Code Explainers
Code explainers tagged #seo
javascript
import type { MetadataRoute } from 'next' import { db } from '@/lib/db' const URLS_PER_SITEMAP = 50_000
Sharding a large sitemap in Next.js
sitemap
pagination
seo
Intermediate
6 steps
javascript
import type { MetadataRoute } from 'next' const BASE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? 'https://example.com'
Environment-aware robots.txt in Next.js
seo
environment-config
web-crawlers
Intermediate
6 steps
php
<?php namespace App\Http\Controllers;
Building a paginated XML sitemap in Laravel
pagination
seo
collections
Intermediate
8 steps
javascript
import { db } from '@/lib/db' const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? 'https://example.com'
Generating a dynamic sitemap in Next.js
sitemap
seo
database-query
Intermediate
5 steps