Meta Tags Implementation
All pages use theSEOHead.astro component to generate proper meta tags:
Core Meta Tags
Every page includes: Character Encoding & Viewport- Format:
{Page Title} | Showtimes NG - Example: “Dune: Part Two | Showtimes NG”
- Unique per page, includes branding
- Unique description per page
- Includes relevant keywords (movie names, cinema names, “Lagos”)
- Actionable language (“See showtimes”, “Book tickets”, “Find movies”)
SEOHead Component Usage
SEOHead Component Usage
The component is used in Example usage from
BaseLayout.astro and accepts these props:src/pages/movies/[id].astro:21-24:Canonical URLs
Proper canonical tags prevent duplicate content issues:- Auto-generated from current URL path
- Includes site domain (https://showtimes.ng)
- Removes trailing slashes for consistency
- Can be manually overridden via
canonicalUrlprop
Canonical URLs are critical for SEO as they tell search engines which version of a page is the authoritative source, especially important for dynamic route parameters.
Open Graph Tags
Complete Open Graph implementation for social media sharing:Facebook & LinkedIn
Image Handling
OG images are intelligently selected:- Movie pages: Use movie poster if available
- Custom image: Accept image prop from page
- Fallback: Use site logo (
/logo.svg) - URL handling: Convert relative paths to absolute URLs
Open Graph images must be absolute URLs. The component automatically converts relative paths to full URLs including the domain.
Twitter Cards
Twitter-specific meta tags for rich previews:summary_large_image
- Displays large image preview
- Best for movie posters
- More engaging than standard cards
Structured Data (Schema.org)
Showtimes NG implements JSON-LD structured data for rich search results:Movie Schema
Movie pages include Movie schema (StructuredData.astro:11-32):
- Prioritizes IMDb rating (scale 1-10)
- Falls back to Metacritic (scale 0-100)
- Falls back to Rotten Tomatoes (scale 0-100)
- Adjusts
bestRatingbased on source
Duration Format
Duration Format
Movie duration is converted to ISO 8601 format:
- Database:
166(minutes) - Schema.org:
"PT166M"(Period of Time: 166 Minutes) - This is the standard format search engines expect
Cinema Schema
Cinema pages include MovieTheater schema (StructuredData.astro:34-44):
- Helps Google show cinema in local results
- Enables “cinemas near me” searches
- Provides location context
Showtime Schema (Future)
The codebase includes ScreeningEvent schema preparation:ScreeningEvent schema could enable Google to show individual showtimes directly in search results, though it’s not currently used on live pages. Implementation is ready in
StructuredData.astro:47-56.URL Structure
SEO-friendly URLs throughout the site:Pattern
Examples
Movies:/movies/42-dune-part-two/movies/108-kung-fu-panda-4
/cinemas/5-filmhouse-imax-lekki/cinemas/12-genesis-deluxe-cinemas-maryland
Benefits
- Readable: Humans understand the URL
- Keywords: Movie/cinema names in URL
- Shareable: Clean URLs for social media
- Stable: ID ensures correct page even if name changes
Slug Generation
Slug Generation
URLs use the Examples:
slugify() utility from src/lib/utils.ts:54-59:- “Dune: Part Two” →
dune-part-two - “Filmhouse IMAX Lekki” →
filmhouse-imax-lekki
Static Site Generation
SEO benefits from Astro’s static generation:Build-Time Rendering
- All pages pre-rendered as HTML
- No JavaScript required for content
- Fast initial page load
- Full content available to crawlers
Static Paths
Dynamic routes usegetStaticPaths():
Movie Pages (movies/[id].astro:8-13):
Static generation means all pages exist as HTML files at deploy time. Search engine crawlers see fully-rendered content immediately, without waiting for JavaScript or API calls.
Page-Specific SEO
Homepage
Title: “Now Showing in Lagos | Showtimes NG” Description: “Find movie showtimes at cinemas across Lagos. See what’s playing at Filmhouse, Genesis, Silverbird and more.” Strategy:- Geographic targeting (Lagos)
- Lists major cinema chains
- Action-oriented language
Movie Pages
Title:{Movie Title} | Showtimes NG
Description: See {Movie Title} showtimes at cinemas across Lagos. Book tickets now.
Strategy:
- Movie name in title and description
- Geographic targeting
- Call-to-action (“Book tickets”)
- Movie poster as OG image
Cinema Pages
Title:{Cinema Name} | Showtimes NG
Description: Movie showtimes at {Cinema Name}{, Location}. See what's playing and book tickets.
Strategy:
- Cinema name and location
- What’s playing (discovery intent)
- Booking call-to-action
Performance & Core Web Vitals
SEO benefits from performance optimizations:Image Optimization
- Lazy loading:
loading="lazy"on all images - Proper aspect ratios:
aspect-[2/3]for posters - Fallback handling: Emoji or placeholder if image missing
- Explicit dimensions: Width and height attributes
Minimal JavaScript
- Static HTML content
- No client-side routing (standard navigation)
- Inline critical JS only (date picker)
- No framework overhead for content
Fast Load Times
- Pre-rendered pages
- No API calls on page load
- Optimized CSS with Tailwind
- Minimal external dependencies
Google uses Core Web Vitals (LCP, FID, CLS) as ranking factors. Showtimes NG’s static generation and minimal JavaScript ensure excellent scores in these metrics.
Best Practices Implemented
Content
- Unique titles per page
- Unique descriptions per page
- Proper heading hierarchy (h1 → h2 → h3)
- Semantic HTML structure
- Descriptive link text
Technical
- Proper canonical tags
- XML sitemap (auto-generated by Astro)
- Clean URL structure
- Fast page loads
- Mobile-responsive design
Schema.org
- Movie schema for film pages
- MovieTheater schema for venues
- Proper typing and required fields
- Valid JSON-LD syntax
Social
- Open Graph tags (Facebook, LinkedIn)
- Twitter Card tags
- Proper image URLs (absolute)
- Engaging descriptions
The SEO implementation is centralized in the
SEOHead.astro and StructuredData.astro components, making it easy to maintain and update across the entire site.