diff --git a/docs/SEO-CHECKLIST.md b/docs/SEO-CHECKLIST.md new file mode 100644 index 0000000..7015f6c --- /dev/null +++ b/docs/SEO-CHECKLIST.md @@ -0,0 +1,206 @@ +# SEO Implementation Checklist - Mistergeek + +This checklist tracks the implementation of advanced SEO features for the Mistergeek Hugo site. + +## ✅ Completed Features + +### 1. Translation & Documentation +- [x] Translated `seo-recommendations-fr.md` to `seo-recommendations-en.md` +- [x] Created comprehensive English SEO documentation + +### 2. Performance Optimizations +- [x] Created `layouts/partials/seo/head-performance.html` +- [x] Added DNS prefetch and preconnect for external resources +- [x] Implemented resource hints for fonts and CDNs +- [x] Added performance meta tags + +### 3. Advanced Schema.org Structured Data +- [x] Enhanced `layouts/partials/seo/structured-data.html` +- [x] Created `layouts/partials/seo/schema-article.html` - TechArticle schema +- [x] Created `layouts/partials/seo/schema-tutorial.html` - HowTo schema +- [x] Created `layouts/partials/seo/schema-local.html` - Local SEO schema + +### 4. Multi-language Support +- [x] Created `layouts/partials/seo/hreflang.html` +- [x] Added French regional variations (fr-fr, fr-be, fr-ca, fr-ch, fr-lu) +- [x] Implemented x-default fallback + +### 5. Dynamic Meta Tags +- [x] Created `layouts/partials/seo/meta-dynamic.html` +- [x] Section-specific meta descriptions (tutorials, comparisons, security, wordpress) +- [x] Dynamic keywords based on content type +- [x] Article-specific meta tags + +### 6. Local SEO Configuration +- [x] Added French market local SEO +- [x] Google My Business schema +- [x] Educational organization markup +- [x] Contact point and social profiles + +### 7. Enhanced Configuration +- [x] Updated `hugo.toml` with advanced SEO settings +- [x] Added image optimization settings +- [x] Configured analytics integration +- [x] Added social media profiles + +## 📋 Pre-launch SEO Checklist + +### Technical SEO +- [ ] Verify all meta tags are present +- [ ] Test Schema.org markup with Google's Rich Results Test +- [ ] Validate structured data +- [ ] Check page loading speed (Core Web Vitals) +- [ ] Test mobile responsiveness +- [ ] Verify HTTPS implementation +- [ ] Check robots.txt file + +### Content SEO +- [ ] Optimize meta descriptions for key pages +- [ ] Ensure unique title tags for all pages +- [ ] Add alt text to all images +- [ ] Create XML sitemap +- [ ] Set up 404 error page +- [ ] Implement canonical URLs + +### Analytics & Monitoring +- [ ] Set up Google Analytics 4 +- [ ] Configure Google Search Console +- [ ] Set up Bing Webmaster Tools +- [ ] Create Yandex Webmaster account +- [ ] Install SEO monitoring tools + +### Social Media +- [ ] Verify Open Graph tags +- [ ] Test Twitter Cards +- [ ] Check social media meta tags +- [ ] Validate social media images + +## 📊 Post-launch Monitoring + +### Weekly Tasks +- [ ] Check Google Search Console for crawl errors +- [ ] Monitor 404 errors +- [ ] Review search performance metrics +- [ ] Check page loading speeds + +### Monthly Tasks +- [ ] Analyze keyword positions +- [ ] Review backlink profile +- [ ] Audit internal linking +- [ ] Update outdated content +- [ ] Check competitor analysis + +### Quarterly Tasks +- [ ] Comprehensive SEO audit +- [ ] Update Schema markup +- [ ] Review and update meta descriptions +- [ ] Analyze user engagement metrics +- [ ] Update local SEO information + +## 🔧 Configuration Required + +### Google Analytics Setup +1. Replace `G-XXXXXXXXXX` in `hugo.toml` with your actual Google Analytics 4 ID +2. Replace `GTM-XXXXXXX` with your Google Tag Manager ID + +### Search Console Verification +1. Add your verification codes to `hugo.toml`: + ```toml + [params.seo.verification] + google = "your-google-verification-code" + bing = "your-bing-verification-code" + ``` + +### Social Media URLs +Update the social media URLs in the schema files: +- `layouts/partials/seo/schema-local.html` +- `layouts/partials/seo/schema-article.html` + +### Local SEO Information +Update the local business information in: +- `layouts/partials/seo/schema-local.html` +- Business address, phone, email + +## 🎯 SEO Monitoring Tools + +### Essential Tools +- Google Search Console +- Google Analytics 4 +- Google PageSpeed Insights +- Schema Markup Validator +- Mobile-Friendly Test + +### Advanced Tools +- Ahrefs or SEMrush +- Screaming Frog SEO Spider +- GTmetrix +- Bing Webmaster Tools +- Yandex Webmaster + +### French Market Tools +- Yooda Insight (French SEO tool) +- SEMrush.fr +- Ahrefs France +- Local SEO France directories + +## 🚀 Next Steps + +1. **Immediate (Week 1)** + - Set up Google Analytics 4 + - Configure Google Search Console + - Submit sitemap to search engines + - Test all Schema markup + +2. **Short-term (Month 1)** + - Monitor search performance + - Optimize top pages + - Build initial backlinks + - Create social media profiles + +3. **Long-term (Quarter 1)** + - Content optimization + - Link building campaigns + - Local SEO optimization + - Competitor analysis + +## 📈 Key Performance Indicators (KPIs) + +### Traffic Metrics +- Organic search traffic growth +- Click-through rate (CTR) +- Bounce rate +- Average session duration +- Pages per session + +### Technical Metrics +- Page loading speed +- Core Web Vitals scores +- Mobile usability score +- Schema markup errors +- Crawl errors + +### Business Metrics +- Keyword rankings +- Conversion rate +- Return on investment (ROI) +- Local search visibility +- Brand mentions + +## 🛠️ Troubleshooting + +### Common Issues +- Schema markup errors: Use Google's Rich Results Test +- Slow loading: Check PageSpeed Insights +- Mobile issues: Use Mobile-Friendly Test +- Indexing problems: Check Search Console coverage report + +### Support Resources +- Google SEO Starter Guide (French) +- Schema.org documentation +- Hugo community forums +- French SEO communities + +--- + +**Last Updated**: 2024-01-15 +**Next Review**: 2024-02-15 \ No newline at end of file diff --git a/docs/seo-recommendations-en.md b/docs/seo-recommendations-en.md new file mode 100644 index 0000000..bc4e6b8 --- /dev/null +++ b/docs/seo-recommendations-en.md @@ -0,0 +1,363 @@ +# Advanced SEO Recommendations - Hugo Mistergeek + +## Overview + +This document provides advanced SEO recommendations specifically tailored for the Hugo Mistergeek blog, a French-speaking site covering technology and computing topics. The recommendations take into account the existing SEO implementation and propose targeted improvements to maximize visibility in the French-speaking market. + +## Current SEO Implementation Status ✅ + +### ✅ Successfully Implemented +- **Essential meta tags** (description, keywords, author) +- **Open Graph** for social networks +- **Twitter Cards** with optimized images +- **Schema.org** (JSON-LD) for structured data +- **Favicons** multi-format and PWA support +- **Canonical URLs** and hreflang +- **XML sitemap generation** via Hugo + +## SEO Improvement Recommendations + +### 1. French Content Optimization + +#### URL Structure +```yaml +# Recommendation: Optimize for French +Old structure: /post/2023-11-wordpress-creation-site/ +New structure: /tutorials/wordpress/create-wordpress-site-complete-guide/ +``` + +#### Keyword Strategy for French Market +```yaml +# Main keywords (high competition) +- "computer tutorial" +- "technology guide" +- "IT solutions" + +# Long-tail keywords (French) +- "how to create a WordPress site in French" +- "best free antivirus for Windows 10 in 2024" +- "computer security tutorial for beginners" + +# Language variations +- English: "computer tutorial" → French: "tutoriel informatique" +- English: "how to" → French: "how", "guide", "tutorial" +``` + +### 2. Advanced Technical Optimization + +#### Performance and Core Web Vitals +```html + + + + + +``` + +#### Strategic Lazy Loading +```html + +WordPress Tutorial - Create a Professional Site +``` + +### 3. Enhanced Schema.org + +#### Article Schema with Detailed Author +```json +{ + "@context": "https://schema.org", + "@type": "TechArticle", + "headline": "Complete WordPress Guide 2024", + "description": "Create your WordPress site in French with this step-by-step guide", + "author": { + "@type": "Person", + "name": "Mistergeek", + "url": "https://www.mistergeek.net/", + "sameAs": [ + "https://twitter.com/mistergeekfrance", + "https://www.linkedin.com/in/mistergeek" + ] + }, + "publisher": { + "@type": "Organization", + "name": "Mistergeek", + "logo": { + "@type": "ImageObject", + "url": "https://www.mistergeek.net/assets/images/logo.png" + } + }, + "inLanguage": "fr-FR", + "datePublished": "2024-01-15", + "dateModified": "2024-01-15", + "keywords": ["wordpress", "french tutorial", "create website"] +} +``` + +#### BreadcrumbList for Navigation +```json +{ + "@context": "https://schema.org", + "@type": "BreadcrumbList", + "itemListElement": [ + { + "@type": "ListItem", + "position": 1, + "name": "Home", + "item": "https://www.mistergeek.net/" + }, + { + "@type": "ListItem", + "position": 2, + "name": "Tutorials", + "item": "https://www.mistergeek.net/tutorials/" + }, + { + "@type": "ListItem", + "position": 3, + "name": "WordPress", + "item": "https://www.mistergeek.net/tutorials/wordpress/" + } + ] +} +``` + +### 4. Local SEO for French Market + +#### Google My Business +```json +{ + "@context": "https://schema.org", + "@type": "Organization", + "name": "Mistergeek", + "url": "https://www.mistergeek.net", + "logo": "https://www.mistergeek.net/assets/images/logo.png", + "contactPoint": { + "@type": "ContactPoint", + "contactType": "support", + "email": "contact@mistergeek.net", + "availableLanguage": ["French"] + }, + "sameAs": [ + "https://twitter.com/mistergeekfrance", + "https://www.youtube.com/@mistergeek" + ] +} +``` + +### 5. Meta Tags Enhancement + +#### Dynamic Meta Tags by Content Type +```go + +{{- if eq .Section "tutorials" }} + + +{{- else if eq .Section "comparisons" }} + +{{- end }} +``` + +### 6. Multi-language Optimization + +#### hreflang for French +```html + + + + + +``` + +### 7. Tutorial Data Structure + +#### Tutorial Schema +```json +{ + "@context": "https://schema.org", + "@type": "HowTo", + "name": "Create a WordPress Site", + "description": "Complete guide to create your WordPress site in French", + "image": "https://www.mistergeek.net/assets/images/wordpress-guide.jpg", + "totalTime": "PT30M", + "estimatedCost": { + "@type": "MonetaryAmount", + "currency": "EUR", + "value": "0" + }, + "supply": [ + { + "@type": "HowToSupply", + "name": "WordPress" + }, + { + "@type": "HowToSupply", + "name": "Web hosting" + } + ], + "tool": [ + { + "@type": "HowToTool", + "name": "WordPress" + } + ], + "step": [ + { + "@type": "HowToStep", + "name": "WordPress Installation", + "text": "Download and install WordPress" + } + ] +} +``` + +### 8. Image Optimization + +#### SEO Image Structure +```yaml +# config.toml - Image configuration +[imaging] + quality = 75 + resampleFilter = "lanczos" + +[params.images] + # Recommended dimensions for SEO + og_image = "1200x630" + twitter_image = "1200x675" + thumbnail = "400x300" + hero = "1920x1080" +``` + +### 9. Strategic Internal Linking + +#### Link Structure +```markdown + +To go further, discover: +- [Complete WordPress Guide](/tutorials/wordpress/complete-guide/) +- [Best WordPress Plugins](/comparisons/plugins-wordpress-2024/) +- [WordPress Security](/security/wordpress-security-maximum/) +``` + +### 10. Advanced Hugo.toml Configuration + +```toml +# Advanced SEO Configuration +[params.seo] + # Existing configuration... + + # Analytics + google_analytics = "G-XXXXXXXXXX" + google_tag_manager = "GTM-XXXXXXX" + + # Rich Snippets + enable_search_box = true + enable_sitelinks_searchbox = true + + # Social + facebook_page = "mistergeek.fr" + twitter_handle = "@mistergeekfrance" + youtube_channel = "UCXXXXXXXXXXXXXXXXXXX" + + # Local SEO + [params.seo.local] + enabled = true + country = "FR" + language = "fr" + region = "Île-de-France" + +[markup.goldmark.renderer] + unsafe = true + +[markup.highlight] + style = "github" + lineNos = true + codeFences = true + +[sitemap] + changefreq = "weekly" + filename = "sitemap.xml" + priority = 0.5 + +[privacy] + [privacy.googleAnalytics] + disable = false + respectDoNotTrack = true +``` + +### 11. Monitoring and Tools + +#### SEO Monitoring Tools +```yaml +# To configure +- Google Search Console: verify site +- Google Analytics 4: advanced tracking +- Bing Webmaster Tools: Bing indexing +- Yandex Webmaster: Russian market +- Ahrefs/SEMrush: competitive analysis +``` + +### 12. Launch Checklist + +#### Pre-launch SEO +- [ ] Check all meta tags +- [ ] Test rich snippets +- [ ] Validate sitemap.xml +- [ ] Configure Google Search Console +- [ ] Configure Google Analytics 4 +- [ ] Test loading speed +- [ ] Check for missing images +- [ ] Test broken links +- [ ] Validate Schema.org markup + +#### Post-launch +- [ ] Submit sitemap to Google +- [ ] Monitor 404 errors +- [ ] Analyze keyword positioning +- [ ] Optimize pages with low CTR +- [ ] Improve pages with high bounce rate + +### 13. Performance Measurement + +#### SEO KPIs to track +```yaml +Monthly: + - Average keyword position + - Click-through rate (CTR) + - Indexed pages + - Crawl errors + - Loading speed + +Quarterly: + - Keyword market share + - Quality backlinks + - Authority Score (Domain Rating) + - Organic traffic vs goals +``` + +## Additional Resources + +### French SEO Tools +- **Google Search Console** - Main monitoring +- **Screaming Frog** - Technical audit +- **Ahrefs/SEMrush** - Competitive analysis +- **GTmetrix** - Performance +- **Schema Markup Validator** - Rich snippets + +### Documentation +- [Google SEO Starter Guide - French](https://support.google.com/webmasters/answer/7451184?hl=fr) +- [Bing Webmaster Guidelines](https://www.bing.com/webmaster/help/webmaster-guidelines-30fba23a) +- [Schema.org Documentation](https://schema.org/docs/documents.html) + +### Community Support +- [Webmaster Help Community - French](https://support.google.com/webmasters/community?hl=fr) +- [Reddit r/SEO](https://www.reddit.com/r/SEO/) +- [Search Engine Journal - French](https://www.searchenginejournal.com/tag/french/) + +This SEO guide is specifically adapted for the French-speaking market and takes into account the linguistic and cultural particularities of the Mistergeek target audience. \ No newline at end of file diff --git a/hugo.toml b/hugo.toml index ebfc1f4..b5ebd11 100644 --- a/hugo.toml +++ b/hugo.toml @@ -15,29 +15,65 @@ ignoreLogs = ["warning-goldmark-raw-html"] # SEO Configuration [params.seo] - description = "Mistergeek - Tutoriels et guides en informatique" - keywords = ["développement web", "technologies", "innovation", "solutions digitales", "mistergeek"] + description = "Mistergeek - Tutoriels et guides en informatique et technologie en français" + keywords = ["tutoriel informatique", "guide technologie", "solutions informatiques", "développement web", "technologies", "innovation", "mistergeek"] author = "Mistergeek" theme_color = "#007bff" default_image = "/assets/images/og-logo.png" logo = "/assets/images/logo.png" + # Analytics + google_analytics = "G-XXXXXXXXXX" + google_tag_manager = "GTM-XXXXXXX" + # Social Media [params.seo.twitter] site = "@mistergeekfrance" creator = "@mistergeekfrance" + # Facebook + facebook_page = "mistergeek.fr" + youtube_channel = "UCXXXXXXXXXXXXXXXXXXX" + # 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" + # Local SEO + [params.seo.local] + enabled = true + country = "FR" + language = "fr" + region = "Île-de-France" + city = "Paris" + latitude = "48.8566" + longitude = "2.3522" + + # Rich snippets + enable_search_box = true + enable_sitelinks_searchbox = true + + # Verification codes + [params.seo.verification] + google = "your-google-verification-code" + bing = "your-bing-verification-code" + yandex = "your-yandex-verification-code" + alexa = "your-alexa-verification-code" + pinterest = "your-pinterest-verification-code" + norton = "your-norton-verification-code" + +# Image optimization for SEO +[imaging] + quality = 75 + resampleFilter = "Lanczos" + +[params.images] + # Dimensions recommandées pour le SEO + og_image = "1200x630" + twitter_image = "1200x675" + thumbnail = "400x300" + hero = "1920x1080" # WordPress API Configuration [params.wordpress] diff --git a/layouts/partials/seo/head-performance.html b/layouts/partials/seo/head-performance.html new file mode 100644 index 0000000..109e960 --- /dev/null +++ b/layouts/partials/seo/head-performance.html @@ -0,0 +1,34 @@ +{{- /* Performance optimization for SEO */ -}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/layouts/partials/seo/hreflang.html b/layouts/partials/seo/hreflang.html new file mode 100644 index 0000000..21e98fc --- /dev/null +++ b/layouts/partials/seo/hreflang.html @@ -0,0 +1,31 @@ +{{- /* hreflang implementation for multilingual SEO */ -}} + + + + + + + + + +{{ range .Translations }} +{{ if eq .Language.Lang "en" }} + +{{ end }} +{{ end }} + + +{{ range .Translations }} +{{ if ne .Language.Lang "en" }} + +{{ end }} +{{ end }} + + + + + + \ No newline at end of file diff --git a/layouts/partials/seo/meta-dynamic.html b/layouts/partials/seo/meta-dynamic.html new file mode 100644 index 0000000..714e2e8 --- /dev/null +++ b/layouts/partials/seo/meta-dynamic.html @@ -0,0 +1,84 @@ +{{- /* Dynamic meta tags based on content type */ -}} + +{{- $description := "" -}} +{{- $keywords := "" -}} +{{- $title := .Title | default .Site.Title -}} + +{{/* Dynamic description based on section */}} +{{- if eq .Section "tutorials" -}} + {{- $description = printf "Complete tutorial: %s. Learn %s in French with our step-by-step guide. %s" + .Title + (.Params.skill | default "the technology") + (.Params.summary | default "") -}} + {{- $keywords = printf "tutorial %s, french guide %s, %s, tutoriel informatique, guide technologie" + (.Params.category | default "") + (.Params.skill | default "") + (.Title | lower) -}} + +{{- else if eq .Section "comparisons" -}} + {{- $description = printf "Detailed comparison: %s. %s Which to choose in 2024? Complete reviews and tests." + .Title + (.Params.summary | default "") -}} + {{- $keywords = printf "comparison %s, best %s 2024, review %s, comparatif %s" + (.Params.category | default "") + (.Params.category | default "") + (.Title | lower) + (.Params.category | default "") -}} + +{{- else if eq .Section "security" -}} + {{- $description = printf "Computer security guide: %s. %s Learn to protect your data and systems effectively." + .Title + (.Params.summary | default "") -}} + {{- $keywords = printf "security %s, cybersecurity %s, protection %s, sécurité informatique" + (.Params.category | default "") + (.Title | lower) + (.Params.category | default "") -}} + +{{- else if eq .Section "wordpress" -}} + {{- $description = printf "WordPress tutorial: %s. %s Complete guide to create and manage your WordPress site in French." + .Title + (.Params.summary | default "") -}} + {{- $keywords = printf "wordpress %s, tutorial wordpress %s, guide wordpress %s, créer site wordpress" + (.Params.category | default "") + (.Params.category | default "") + (.Title | lower) -}} + +{{- else -}} + {{- $description = .Description | default .Summary | default .Site.Params.description | default .Site.Title -}} + {{- $keywords = delimit (.Keywords | default .Site.Params.keywords | default (slice)) ", " -}} +{{- end -}} + + + + + + +{{- if eq .Section "tutorials" }} + + + +{{- end }} + +{{- if eq .Section "comparisons" }} + + +{{- end }} + + +{{- if .IsPage }} + + +{{- end }} + + +{{- $author := .Params.author | default .Site.Params.author | default .Site.Title }} + + + + +{{- if .Params.category }} + +{{- end }} +{{- range .Params.tags }} + +{{- end }} \ No newline at end of file diff --git a/layouts/partials/seo/schema-article.html b/layouts/partials/seo/schema-article.html new file mode 100644 index 0000000..66dd497 --- /dev/null +++ b/layouts/partials/seo/schema-article.html @@ -0,0 +1,57 @@ +{{- /* Advanced Article Schema with enhanced metadata */ -}} + +{{- $title := .Title | default .Site.Title -}} +{{- $description := .Description | default .Summary | default .Site.Params.description | default .Site.Title -}} +{{- $image := .Params.image | default .Site.Params.seo.default_image | default "/assets/images/logo.png" -}} +{{- $image = $image | absURL -}} +{{- $url := .Permalink | default .RelPermalink | absURL -}} +{{- $author := .Params.author | default .Site.Params.author | default .Site.Title -}} +{{- $datePublished := .Date.Format "2006-01-02T15:04:05Z07:00" -}} +{{- $dateModified := .Lastmod.Format "2006-01-02T15:04:05Z07:00" -}} +{{- $keywords := delimit (.Keywords | default .Site.Params.keywords | default (slice)) ", " -}} + + \ No newline at end of file diff --git a/layouts/partials/seo/schema-local.html b/layouts/partials/seo/schema-local.html new file mode 100644 index 0000000..8329333 --- /dev/null +++ b/layouts/partials/seo/schema-local.html @@ -0,0 +1,126 @@ +{{- /* Local SEO Schema.org markup for French market */ -}} + + + + + \ No newline at end of file diff --git a/layouts/partials/seo/schema-tutorial.html b/layouts/partials/seo/schema-tutorial.html new file mode 100644 index 0000000..fc42788 --- /dev/null +++ b/layouts/partials/seo/schema-tutorial.html @@ -0,0 +1,87 @@ +{{- /* Tutorial-specific Schema.org markup */ -}} + +{{- $title := .Title | default .Site.Title -}} +{{- $description := .Description | default .Summary | default .Site.Params.description | default .Site.Title -}} +{{- $image := .Params.image | default .Site.Params.seo.default_image | default "/assets/images/logo.png" -}} +{{- $image = $image | absURL -}} +{{- $url := .Permalink | default .RelPermalink | absURL -}} +{{- $author := .Params.author | default .Site.Params.author | default .Site.Title -}} +{{- $duration := .Params.duration | default "PT30M" -}} +{{- $difficulty := .Params.level | default "beginner" -}} +{{- $category := .Params.category | default "technology" -}} + + \ No newline at end of file diff --git a/layouts/partials/seo/seo-config.html b/layouts/partials/seo/seo-config.html index 8a2e809..ef9578c 100644 --- a/layouts/partials/seo/seo-config.html +++ b/layouts/partials/seo/seo-config.html @@ -1,9 +1,15 @@ {{- /* SEO Configuration Partial */ -}} {{- /* This partial includes all SEO-related partials */ -}} + +{{ partial "seo/head-performance.html" . }} + {{ partial "seo/seo-meta.html" . }} + +{{ partial "seo/meta-dynamic.html" . }} + {{ partial "seo/opengraph.html" . }} @@ -16,6 +22,9 @@ {{ partial "seo/favicons.html" . }} + +{{ partial "seo/hreflang.html" . }} + {{- if .Site.Params.seo.google_verification }} @@ -33,10 +42,30 @@ {{ end }} - -{{ range .Translations }} - + +{{- if .Site.Params.seo.google_analytics }} + + + {{ end }} -{{ if .IsTranslated }} - -{{ end }} \ No newline at end of file + +{{- if .Site.Params.seo.google_tag_manager }} + + +{{ end }} + + +{{- range $name, $code := .Site.Params.seo.verification }} +{{- if $code }} + +{{- end }} +{{- end }} \ No newline at end of file diff --git a/layouts/partials/seo/structured-data.html b/layouts/partials/seo/structured-data.html index cd6653b..4d3606b 100644 --- a/layouts/partials/seo/structured-data.html +++ b/layouts/partials/seo/structured-data.html @@ -5,46 +5,103 @@ {{- $url := .Permalink | default .RelPermalink | absURL -}} {{- $siteName := .Site.Title -}} {{- $logo := .Site.Params.seo.logo | default "/assets/images/logo.png" | absURL -}} +{{- $author := .Params.author | default .Site.Params.author | default .Site.Title -}} +{{- $datePublished := .Date.Format "2006-01-02T15:04:05Z07:00" -}} +{{- $dateModified := .Lastmod.Format "2006-01-02T15:04:05Z07:00" -}} +{{- $keywords := delimit (.Keywords | default .Site.Params.keywords | default (slice)) ", " -}} + + {{ if .IsPage }} {{ end }} + +{{ if eq .Section "tutorials" }} +{{ partial "seo/schema-tutorial.html" . }} +{{ end }} + + +{{ if or (eq .Section "blog") (eq .Section "posts") }} +{{ partial "seo/schema-article.html" . }} +{{ end }} + + +{{ if .IsHome }} +{{ partial "seo/schema-local.html" . }} +{{ end }} + {{ if and .IsPage .Section }}