Skip to content

AirKyzzZ/blog-klyx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Blog Klyx - Production-Ready SEO Blog

Minimalist, high-performance blog built with Next.js 16, Tailwind CSS v4, and TypeScript. Optimized for SEO, Core Web Vitals, and conversions.

Live URL: https://blog.klyx.fr (after deployment)
Main Site: https://klyx.fr
Stack: Next.js 16 (App Router) β€’ Tailwind v4 β€’ TypeScript β€’ MDX β€’ GA4


πŸš€ Quick Start

1. Fix npm Cache (One-Time Fix)

sudo chown -R $(whoami):staff ~/.npm

2. Install Dependencies

npm install

3. Configure Environment

# Copy and edit environment variables
cp .env.example .env.local

# Add your GA4 tracking ID
# NEXT_PUBLIC_GA_ID=G-XXXXXXXXXX

4. Create Your First Post

# Create a new MDX file
touch content/posts/mon-premier-article.mdx

See CONTENT_GUIDE.md for the complete frontmatter template and best practices.

5. Run Development Server

npm run dev
# Visit http://localhost:3000

6. Build & Deploy

# Test production build
npm run build
npm run start

# Deploy to Vercel (recommended)
npm i -g vercel
vercel

See DEPLOYMENT.md for complete deployment instructions.


✨ Features

SEO Optimized

βœ… Dynamic meta tags (title, description, OG, Twitter)
βœ… JSON-LD structured data (Article, WebSite, LocalBusiness)
βœ… Sitemap + RSS feed generation
βœ… robots.txt configuration
βœ… Canonical URLs
βœ… Semantic HTML

Performance

βœ… Next.js 16 - Latest features & optimizations
βœ… Static Site Generation (SSG) - Pre-rendered pages
βœ… Image Optimization - Automatic WebP/AVIF
βœ… Code Splitting - Minimal JavaScript
βœ… Font Optimization - Geist Sans & Mono
βœ… Target: Lighthouse 90+ across all metrics

Accessibility

βœ… WCAG AA compliant
βœ… Skip-to-content link
βœ… Semantic HTML5
βœ… Keyboard navigation
βœ… Reduced motion support
βœ… High contrast (black & white + #6b2fcd accent)

Analytics & Conversion

βœ… Google Analytics 4 integration
βœ… Event tracking (CTAs, shares, outbound links)
βœ… Calendly CTAs (header, footer, inline)
βœ… Internal linking to klyx.fr
βœ… Social share buttons


πŸ“Έ Copyright-Free Images (Unsplash API)

Get professional, unique images for all articles:

# 1. Get FREE API key: https://unsplash.com/developers
# 2. Add to .env.local: UNSPLASH_ACCESS_KEY=your_key
# 3. Download all images:
npm run get-images

# βœ… All 8 posts get unique, relevant cover images!

See UNSPLASH_SETUP.md for complete guide.

πŸ“ Project Structure

blog-klyx/
β”œβ”€β”€ app/                      # Next.js App Router
β”‚   β”œβ”€β”€ layout.tsx           # Root layout (GA4, schemas, Header, Footer)
β”‚   β”œβ”€β”€ page.tsx             # Homepage (hero + featured posts)
β”‚   β”œβ”€β”€ posts/[slug]/        # Dynamic post pages (SSG)
β”‚   β”œβ”€β”€ tags/                # Tag filtering & listing
β”‚   β”œβ”€β”€ about/               # About Klyx page
β”‚   β”œβ”€β”€ contact/             # Contact page (Calendly + email)
β”‚   β”œβ”€β”€ sitemap.ts           # Dynamic sitemap generator
β”‚   β”œβ”€β”€ rss.xml/             # RSS feed route
β”‚   └── robots.txt/          # robots.txt route
β”‚
β”œβ”€β”€ components/              # React components
β”‚   β”œβ”€β”€ SEO.tsx             # Meta tags & OG management
β”‚   β”œβ”€β”€ Header.tsx          # Navigation + Calendly CTA
β”‚   β”œβ”€β”€ Footer.tsx          # Footer with klyx.fr links
β”‚   β”œβ”€β”€ CalendlyCTA.tsx     # CTA component (primary/inline)
β”‚   β”œβ”€β”€ PostCard.tsx        # Post preview card
β”‚   β”œβ”€β”€ MDXComponents.tsx   # Custom MDX component mapping
β”‚   β”œβ”€β”€ ShareButtons.tsx    # Social sharing
β”‚   β”œβ”€β”€ TagBadge.tsx        # Tag pills
β”‚   └── AuthorCard.tsx      # Author info
β”‚
β”œβ”€β”€ lib/                     # Utilities & helpers
β”‚   β”œβ”€β”€ types.ts            # TypeScript types
β”‚   β”œβ”€β”€ utils.ts            # Formatting, slugify, reading time
β”‚   β”œβ”€β”€ json-ld.ts          # Schema.org generators
β”‚   β”œβ”€β”€ analytics.ts        # GA4 event tracking
β”‚   └── posts.ts            # Post fetching & filtering
β”‚
β”œβ”€β”€ content/                 # MDX blog posts
β”‚   └── posts/
β”‚       └── *.mdx           # Your blog articles
β”‚
β”œβ”€β”€ public/                  # Static assets
β”‚   └── assets/
β”‚       β”œβ”€β”€ posts/          # Post images (organized by slug)
β”‚       └── og-default.jpg  # Default OG image
β”‚
β”œβ”€β”€ .env.local              # Environment variables (gitignored)
β”œβ”€β”€ .env.example            # Environment template
β”œβ”€β”€ CONTENT_GUIDE.md        # How to create blog posts
β”œβ”€β”€ DEPLOYMENT.md           # Deployment instructions
└── IMPLEMENTATION_STATUS.md # What's done, what's next

πŸ“ Creating Content

Quick Template

Create content/posts/my-post.mdx:

---
title: "Your Post Title (50-60 chars)"
date: "2025-11-01"
slug: "your-post-slug"
description: "Meta description 150-160 characters"
keywords: ["keyword1", "keyword2", "Klyx"]
tags: ["tag1", "tag2"]
coverImage: "/assets/posts/your-post-slug/cover.jpg"
author:
  name: "Klyx Studio"
  email: "[email protected]"
---

## Introduction

Your content here...

## Main Section

More content...

## FAQ

**Question?**
Answer...

See CONTENT_GUIDE.md for:

  • Complete frontmatter reference
  • SEO best practices
  • Internal linking strategy
  • Image optimization
  • Publishing checklist

🎨 Design System

Colors

--color-primary: #6b2fcd  /* Accent color */
--color-black: #000000    /* Text & borders */
--color-white: #ffffff    /* Backgrounds */

Typography

  • Base font: 18px (Geist Sans)
  • H1: 3-4rem, bold (used for titles)
  • H2: 2.25-3rem, bold (section headings)
  • H3: 1.875-2.25rem, semibold (subsections)
  • Responsive: Uses clamp() for fluid scaling

Components

  • .btn-primary - Primary CTA (purple background)
  • .btn-secondary - Secondary CTA (outlined)
  • .card - Post cards with hover effect
  • .prose - MDX content styling
  • .container-custom - Max-width container (80rem)

πŸ”§ Configuration

Environment Variables

Required in .env.local:

NEXT_PUBLIC_GA_ID=G-XXXXXXXXXX
NEXT_PUBLIC_SITE_URL=https://blog.klyx.fr
NEXT_PUBLIC_CALENDLY_URL=https://calendly.com/klyx-studio/call-solution-site-internet
[email protected]
NEXT_PUBLIC_MAIN_SITE_URL=https://klyx.fr

TypeScript

Strict mode enabled in tsconfig.json.

Tailwind v4

CSS-based configuration in app/globals.css using @theme directive.


Scripts

# Development
npm run dev          # Start dev server (localhost:3000)

# Production
npm run build        # Build for production
npm run start        # Start production server

# Linting
npm run lint         # Run ESLint

πŸ“Š SEO Features

On-Page SEO

  • Dynamic title tags (50-60 chars)
  • Meta descriptions (150-160 chars)
  • Keyword optimization
  • Structured heading hierarchy (H1 β†’ H2 β†’ H3)
  • Alt text on images
  • Internal linking strategy

Technical SEO

  • Sitemap.xml (auto-generated)
  • RSS feed
  • robots.txt
  • Canonical URLs
  • Mobile-first responsive design
  • Fast Core Web Vitals

Structured Data

  • Article schema for posts
  • WebSite schema for blog
  • LocalBusiness schema for Klyx
  • Breadcrumb navigation
  • FAQ schema (when applicable)

Social SEO

  • Open Graph tags (Facebook, LinkedIn)
  • Twitter Card tags
  • Optimized OG images (1200x630)

🎯 Conversion Strategy

Every blog post includes:

  1. 2+ links to klyx.fr (services, portfolio, main site)
  2. 1 contextual Calendly CTA (inline in content)
  3. Persistent CTAs (header + footer)
  4. Share buttons (Twitter, LinkedIn, copy link)
  5. Related posts (tag-based recommendations)

🚒 Deployment

Vercel (Recommended)

# Install Vercel CLI
npm i -g vercel

# Deploy
vercel

# Deploy to production
vercel --prod

DNS Configuration

Add CNAME record in your registrar:

  • Name: blog
  • Value: cname.vercel-dns.com

See DEPLOYMENT.md for:

  • Complete Vercel setup
  • Custom domain configuration
  • SSL certificate setup
  • Google Search Console
  • Google Analytics 4
  • Troubleshooting

πŸ“ˆ Post-Launch Checklist

Immediate (Day 1)

  • Deploy to production
  • Configure custom domain (blog.klyx.fr)
  • Verify SSL certificate
  • Submit sitemap to Google Search Console
  • Test GA4 tracking
  • Verify all Calendly CTAs work
  • Test on mobile devices

Week 1

  • Publish 6-10 initial blog posts
  • Monitor GSC for indexing errors
  • Run Lighthouse audit (target 90+)
  • Check accessibility with axe DevTools
  • Set up weekly backups

Month 1

  • Publish 8-12 new posts
  • Review GA4 traffic patterns
  • Optimize top-performing posts
  • Build internal linking between posts
  • Monitor conversion rates (Calendly clicks)

πŸ“š Documentation

  • README.md (this file) - Project overview
  • CONTENT_GUIDE.md - How to create blog posts
  • DEPLOYMENT.md - Deployment & DNS setup
  • IMPLEMENTATION_STATUS.md - What's completed/pending

πŸ› Troubleshooting

Build Errors

# Clear cache
rm -rf .next
rm -rf node_modules
npm install
npm run build

Posts Not Showing

  • Check MDX files are in content/posts/
  • Verify frontmatter is valid YAML
  • Ensure slug matches filename (without .mdx)
  • Check for syntax errors in MDX content

Images Not Loading

  • Images must be in public/ directory
  • Paths must start with / (e.g., /assets/posts/...)
  • Check image file extensions match frontmatter

GA4 Not Tracking

  • Verify NEXT_PUBLIC_GA_ID is set
  • Check browser console for errors
  • Disable ad blockers for testing
  • Allow 24-48 hours for data to appear in GA4

🀝 Support


πŸ“„ License

Private project for Klyx Studio. All rights reserved.


πŸŽ‰ What's Next?

  1. Create Content: Use CONTENT_GUIDE.md to write your first 6 posts
  2. Deploy: Follow DEPLOYMENT.md for Vercel deployment
  3. Monitor: Set up Google Search Console and GA4
  4. Optimize: Run Lighthouse and improve scores
  5. Grow: Publish consistently, build backlinks, monitor analytics

Ready to launch your blog? Start with npm install and follow this README!

About

Blog for Klyx.fr - Digital transformation agency

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors