diff --git a/assets/images/logo.png b/assets/images/logo.png new file mode 100644 index 0000000..e749500 Binary files /dev/null and b/assets/images/logo.png differ diff --git a/assets/images/og-logo.png b/assets/images/og-logo.png new file mode 100644 index 0000000..5f5c043 Binary files /dev/null and b/assets/images/og-logo.png differ diff --git a/assets/images/og-logo.xcf b/assets/images/og-logo.xcf new file mode 100644 index 0000000..d60023e Binary files /dev/null and b/assets/images/og-logo.xcf differ diff --git a/docs/SEO-IMPROVEMENTS.md b/docs/SEO-IMPROVEMENTS.md new file mode 100644 index 0000000..a4cdf1d --- /dev/null +++ b/docs/SEO-IMPROVEMENTS.md @@ -0,0 +1,114 @@ +# SEO Improvements Documentation + +## Overview +This project has been enhanced with comprehensive SEO capabilities using a modular partial system in Hugo. + +## File Structure +``` +layouts/partials/seo/ +├── seo-config.html # Main SEO configuration loader +├── seo-meta.html # Core SEO meta tags +├── opengraph.html # Open Graph tags for social media +├── twitter-cards.html # Twitter Card tags +├── structured-data.html # JSON-LD schema markup +└── favicons.html # Favicon variations and PWA support +``` + +## Features Added + +### 1. Core SEO Meta Tags +- Dynamic meta description +- Keywords (with fallback) +- Author information +- Canonical URLs +- Robots meta tags +- Dublin Core metadata +- Geo tags (if configured) + +### 2. Open Graph Tags +- og:title, og:description, og:image +- og:type (article/website) +- og:site_name +- og:url +- Article-specific tags for blog posts + +### 3. Twitter Cards +- twitter:card (summary_large_image) +- twitter:title, twitter:description +- twitter:image +- Site and creator handles + +### 4. Structured Data (JSON-LD) +- WebSite schema +- Article schema for blog posts +- BreadcrumbList schema +- Organization schema + +### 5. Favicon & PWA Support +- Multiple favicon sizes +- Apple Touch Icons +- Android icons +- PWA manifest.json +- Theme colors + +## Configuration + +### Hugo Configuration (hugo.toml) +```toml +[params.seo] + description = "Your site description" + keywords = ["keyword1", "keyword2"] + author = "Your Name" + theme_color = "#007bff" + default_image = "/images/og-default.jpg" + logo = "/images/logo.png" + + [params.seo.twitter] + site = "@yourhandle" + creator = "@yourhandle" +``` + +### Content Frontmatter +Add to your content's frontmatter: +```yaml +--- +title: "Your Post Title" +description: "Detailed description for SEO" +keywords: ["seo", "hugo", "optimization"] +author: "Author Name" +image: "/images/post-image.jpg" +robots: "index, follow" +--- +``` + +## Testing & Validation + +### Recommended Tools +- Google Rich Results Test: https://search.google.com/test/rich-results +- Facebook Sharing Debugger: https://developers.facebook.com/tools/debug/ +- Twitter Card Validator: https://cards-dev.twitter.com/validator +- Schema.org Validator: https://validator.schema.org/ + +### Validation Checklist +- [ ] Meta tags present in page source +- [ ] Open Graph tags validate +- [ ] Twitter Cards validate +- [ ] JSON-LD schema validates +- [ ] Favicons load correctly +- [ ] Canonical URLs are correct + +## Next Steps +1. Generate favicon files for all sizes (use a favicon generator) +2. Create og-default.jpg and twitter-default.jpg images +3. Set up Google Search Console and add verification code +4. Set up Bing Webmaster Tools +5. Test with social media sharing + +## Fallback Values +The system includes intelligent fallback values: +- Description: Page → Site → Title +- Keywords: Page → Site → Empty string +- Image: Page → Site → Default +- Author: Page → Site → Site Title + +All SEO improvements have been successfully implemented! \ No newline at end of file diff --git a/hugo.toml b/hugo.toml index 0ac014d..ebfc1f4 100644 --- a/hugo.toml +++ b/hugo.toml @@ -13,6 +13,32 @@ ignoreLogs = ["warning-goldmark-raw-html"] [markup.goldmark.renderer] unsafe = true +# SEO Configuration +[params.seo] + description = "Mistergeek - Tutoriels et guides en informatique" + keywords = ["développement web", "technologies", "innovation", "solutions digitales", "mistergeek"] + author = "Mistergeek" + theme_color = "#007bff" + default_image = "/assets/images/og-logo.png" + logo = "/assets/images/logo.png" + + # Social Media + [params.seo.twitter] + site = "@mistergeekfrance" + creator = "@mistergeekfrance" + + # Search Engine Verification + # google_verification = "your-google-verification-code" + # bing_verification = "your-bing-verification-code" + # yandex_verification = "your-yandex-verification-code" + + # Geo Location (if applicable) + # [params.seo.geo] + # region = "FR-IDF" + # placename = "Paris" + # latitude = "48.8566" + # longitude = "2.3522" + # WordPress API Configuration [params.wordpress] apiUrl = "https://www.mistergeek.net/wp-json/wp/v2" @@ -31,3 +57,20 @@ ignoreLogs = ["warning-goldmark-raw-html"] [[build.cachebusters]] source = "assets/.*\\.(css|sass|scss)$" target = "css" + +# Output formats for search index +[outputs] + home = ["HTML", "RSS", "JSON"] + +[outputFormats] + [outputFormats.JSON] + mediaType = "application/json" + baseName = "search-index" + isPlainText = true + notAlternative = true + +# Search configuration +[params.search] + enabled = true + minQueryLength = 2 + maxResults = 10 diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 90a6fb7..17c4629 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,13 +1,13 @@ - +
- - + +