Layout component is the primary page wrapper for the Chitagá Tech website, built with Astro. It provides consistent page structure, comprehensive SEO optimization, and structured data markup.
Props
Page title displayed in browser tab and search results
Page description for SEO and social media previews
Open Graph image for social media sharing (relative or absolute URL)
Features
SEO Meta Tags
The Layout component automatically includes:- Basic SEO: Title, description, canonical URL, author, robots directives
- Theme color:
#184014for browser UI customization - Keywords: Pre-configured for technology community content
- Viewport: Responsive meta viewport configuration
Open Graph & Social Media
Full Open Graph protocol support for rich social media previews:Structured Data (JSON-LD)
The component injects Schema.org Organization structured data:Page Structure
The Layout renders a complete HTML document with:- Header: Sticky navigation with desktop/mobile responsive design
- Mobile Menu: Overlay navigation for mobile devices
- Main Content: Slot for page-specific content
- Footer: Site links and branding
Header Behavior
The header implements a glassmorphism effect on scroll:Mobile Menu
Hamburger menu with accessibility attributes:aria-label: “Abrir menú”aria-expanded: Toggles between “true”/“false”- Prevents body scroll when menu is open
- Auto-closes when navigation links are clicked
Usage Example
URL Construction
The component automatically generates absolute URLs for:- Canonical URL: Based on current pathname
- OG Image URL: Resolves relative image paths to absolute URLs
- Site URL: Uses
Astro.siteor falls back to origin
Fonts
Pre-configured Google Fonts with optimized loading:- Montserrat (400, 500, 600, 700)
- Open Sans (400, 500, 600)
- Poppins (400, 500, 600, 700)
- Source Sans 3 (400, 500, 600, 700)
Navigation Links
Default navigation structure:- Inicio (
#inicio) - Nosotros (
#nosotros) - Servicios (
#servicios) - Proyectos (
#proyectos) - Contacto (
#contacto)
Source
Location:src/layouts/Layout.astro:1