refactor: rename /releases route to /documentatie
Complete route rename from /releases to /documentatie to better reflect the continuous build-in-public nature of the project (not formal releases). Changes: - Renamed app/(marketing)/releases/ → app/(marketing)/documentatie/ - Renamed content/nl/releases/ → content/nl/documentatie/ - Updated all internal links from /releases to /documentatie - Updated middleware publicRoutes (/releases → /documentatie) - Updated navigation.json link - Updated build-timeline.tsx documentation link - Updated all component href attributes - Updated lib/mdx/releases.ts content directory path - Updated sidebar component paths and checks - Updated MDX documentation files with new routes Files changed: - app/(marketing)/documentatie/[category]/page.tsx (footer link) - app/(marketing)/documentatie/page.tsx (card links) - app/(marketing)/documentatie/components/release-sidebar.tsx (all links) - app/(marketing)/components/build-timeline.tsx (documentation link) - content/nl/navigation.json (header link) - content/nl/documentatie/*.mdx (internal references) - middleware.ts (publicRoutes) - lib/mdx/releases.ts (RELEASES_DIR path) This prevents future confusion between "releases" (versioned software releases) and "documentatie" (continuous build documentation). Old URL: /releases/[category] New URL: /documentatie/[category] The old /releases route now returns 404 as expected.
This commit is contained in:
@@ -242,7 +242,7 @@ export const BuildTimeline = ({ data }: BuildTimelineProps) => {
|
||||
|
||||
{/* Link to detailed documentation */}
|
||||
<a
|
||||
href="/releases"
|
||||
href="/documentatie"
|
||||
className="inline-flex items-center gap-2 text-teal-600 hover:text-teal-700 font-medium text-sm transition-colors"
|
||||
>
|
||||
<span>Bekijk uitgebreide documentatie</span>
|
||||
|
||||
@@ -84,10 +84,10 @@ export default async function ReleasePage({ params }: ReleasePageProps) {
|
||||
</div>
|
||||
|
||||
{/* Footer Navigation */}
|
||||
<footer className="mt-12 pt-8 border-t border-slate-200">
|
||||
<footer className="mt-12 pt-8 border-slate-200">
|
||||
<div className="flex justify-between items-center">
|
||||
<a
|
||||
href="/releases"
|
||||
href="/documentatie"
|
||||
className="text-teal-600 hover:text-teal-700 font-medium flex items-center gap-2"
|
||||
>
|
||||
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
@@ -11,7 +11,7 @@ import Link from 'next/link'
|
||||
import { usePathname } from 'next/navigation'
|
||||
import { ChevronRight, ChevronDown } from 'lucide-react'
|
||||
import { useState } from 'react'
|
||||
import type { ReleaseNote, GroupMetadata, CategoryMetadata } from '@/lib/mdx/releases'
|
||||
import type { ReleaseNote, GroupMetadata, CategoryMetadata } from '@/lib/mdx/documentatie'
|
||||
|
||||
interface ReleaseSidebarProps {
|
||||
releases: ReleaseNote[]
|
||||
@@ -46,7 +46,7 @@ export function ReleaseSidebar({ releases, metadata }: ReleaseSidebarProps) {
|
||||
}, {} as Record<string, ReleaseNote[]>)
|
||||
|
||||
// Check if we're on a specific release page
|
||||
const isReleaseDetail = pathname.startsWith('/releases/') && pathname !== '/releases'
|
||||
const isReleaseDetail = pathname.startsWith('/documentatie/') && pathname !== '/documentatie'
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -54,9 +54,9 @@ export function ReleaseSidebar({ releases, metadata }: ReleaseSidebarProps) {
|
||||
<div className="lg:hidden bg-white border-b border-slate-200 sticky top-16 z-40">
|
||||
<div className="flex gap-2 p-4 overflow-x-auto">
|
||||
<Link
|
||||
href="/releases"
|
||||
href="/documentatie"
|
||||
className={`flex-shrink-0 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${
|
||||
pathname === '/releases'
|
||||
pathname === '/documentatie'
|
||||
? 'bg-teal-100 text-teal-700'
|
||||
: 'bg-slate-100 text-slate-600 hover:bg-slate-200'
|
||||
}`}
|
||||
@@ -66,9 +66,9 @@ export function ReleaseSidebar({ releases, metadata }: ReleaseSidebarProps) {
|
||||
{releases.map((release) => (
|
||||
<Link
|
||||
key={release.slug}
|
||||
href={`/releases/${release.slug}`}
|
||||
href={`/documentatie/${release.slug}`}
|
||||
className={`flex-shrink-0 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${
|
||||
pathname === `/releases/${release.slug}`
|
||||
pathname === `/documentatie/${release.slug}`
|
||||
? 'bg-teal-100 text-teal-700'
|
||||
: 'bg-slate-100 text-slate-600 hover:bg-slate-200'
|
||||
}`}
|
||||
@@ -89,9 +89,9 @@ export function ReleaseSidebar({ releases, metadata }: ReleaseSidebarProps) {
|
||||
<nav className="space-y-1">
|
||||
{/* Overview link */}
|
||||
<Link
|
||||
href="/releases"
|
||||
href="/documentatie"
|
||||
className={`flex items-center justify-between px-3 py-2 rounded-lg text-sm font-medium transition-colors ${
|
||||
pathname === '/releases' && !isReleaseDetail
|
||||
pathname === '/documentatie' && !isReleaseDetail
|
||||
? 'bg-teal-50 text-teal-700'
|
||||
: 'text-slate-700 hover:bg-slate-50'
|
||||
}`}
|
||||
@@ -125,12 +125,12 @@ export function ReleaseSidebar({ releases, metadata }: ReleaseSidebarProps) {
|
||||
{isExpanded && (
|
||||
<div className="space-y-1 ml-2">
|
||||
{groupReleases.map((release) => {
|
||||
const isActive = pathname === `/releases/${release.slug}`
|
||||
const isActive = pathname === `/documentatie/${release.slug}`
|
||||
|
||||
return (
|
||||
<Link
|
||||
key={release.slug}
|
||||
href={`/releases/${release.slug}`}
|
||||
href={`/documentatie/${release.slug}`}
|
||||
className={`flex items-center justify-between px-3 py-2 rounded-lg text-sm font-medium transition-colors group ${
|
||||
isActive
|
||||
? 'bg-teal-50 text-teal-700'
|
||||
@@ -98,7 +98,7 @@ export default async function ReleasesPage() {
|
||||
function ReleaseCard({ release }: { release: any }) {
|
||||
return (
|
||||
<Link
|
||||
href={`/releases/${release.slug}`}
|
||||
href={`/documentatie/${release.slug}`}
|
||||
className="block bg-white rounded-lg border border-slate-200 p-6 hover:border-teal-300 hover:shadow-md transition-all"
|
||||
>
|
||||
<div className="flex items-start justify-between gap-4">
|
||||
@@ -25,7 +25,7 @@ De authentication flow vormt de basis van het Mini-ECD systeem. Gebruikers kunne
|
||||
|
||||
### Login Flow
|
||||
|
||||

|
||||

|
||||
*Login formulier met email/password fields en demo account optie*
|
||||
|
||||
De login pagina biedt twee opties:
|
||||
@@ -146,7 +146,7 @@ Styled components voor consistente formatting:
|
||||
|
||||
```
|
||||
# Code
|
||||
app/(marketing)/releases/
|
||||
app/(marketing)/documentatie/
|
||||
├── layout.tsx # Sidebar wrapper
|
||||
├── page.tsx # Overview
|
||||
├── [category]/
|
||||
@@ -156,7 +156,7 @@ app/(marketing)/releases/
|
||||
└── mdx-components.tsx
|
||||
|
||||
# Content
|
||||
content/nl/releases/
|
||||
content/nl/documentatie/
|
||||
├── _index.json # Categories metadata
|
||||
├── authentication.mdx
|
||||
└── release-notes-system.mdx
|
||||
@@ -235,7 +235,7 @@ export async function generateStaticParams() {
|
||||
**Stap 1:** Kopieer template
|
||||
```bash
|
||||
cp docs/templates/release-note-template.mdx \
|
||||
content/nl/releases/new-feature.mdx
|
||||
content/nl/documentatie/new-feature.mdx
|
||||
```
|
||||
|
||||
**Stap 2:** Vul frontmatter in
|
||||
@@ -255,7 +255,7 @@ description: "Short description here"
|
||||
|
||||
**Stap 4:** (Optioneel) Voeg screenshots toe
|
||||
```bash
|
||||
mkdir -p public/releases/new-feature/
|
||||
mkdir -p public/documentatie/new-feature/
|
||||
# Add images: screenshot-1.png, etc.
|
||||
```
|
||||
|
||||
@@ -263,12 +263,12 @@ mkdir -p public/releases/new-feature/
|
||||
```bash
|
||||
npm run build
|
||||
npm run dev
|
||||
# Visit /releases/new-feature
|
||||
# Visit /documentatie/new-feature
|
||||
```
|
||||
|
||||
**Stap 6:** Commit en push
|
||||
```bash
|
||||
git add content/nl/releases/new-feature.mdx
|
||||
git add content/nl/documentatie/new-feature.mdx
|
||||
git commit -m "docs: add new-feature release note"
|
||||
```
|
||||
|
||||
@@ -281,7 +281,7 @@ git commit -m "docs: add new-feature release note"
|
||||
Timeline component heeft nu link naar release notes:
|
||||
|
||||
```tsx
|
||||
<a href="/releases">
|
||||
<a href="/documentatie">
|
||||
Bekijk gedetailleerde release notes →
|
||||
</a>
|
||||
```
|
||||
@@ -293,7 +293,7 @@ Header navigatie heeft "Releases" link toegevoegd:
|
||||
```json
|
||||
{
|
||||
"links": [
|
||||
{ "label": "Releases", "href": "/releases" },
|
||||
{ "label": "Releases", "href": "/documentatie" },
|
||||
{ "label": "Contact", "href": "/contact" },
|
||||
{ "label": "Login", "href": "/login" }
|
||||
]
|
||||
@@ -25,8 +25,8 @@ Opgelost: Kritieke webpack module resolution error die optrad bij het laden van
|
||||
```
|
||||
TypeError: Cannot read properties of undefined (reading 'call')
|
||||
at eval (webpack-internal:///356:9:118)
|
||||
at 356 (.next/dev/static/chunks/app/(marketing)/releases/layout.js:28:1)
|
||||
at ReleasesLayout (app/(marketing)/releases/layout.tsx:24:11)
|
||||
at 356 (.next/dev/static/chunks/app/(marketing)/documentatie/layout.js:28:1)
|
||||
at ReleasesLayout (app/(marketing)/documentatie/layout.tsx:24:11)
|
||||
```
|
||||
|
||||
### What Was Happening
|
||||
@@ -67,7 +67,7 @@ Maak een tussenlaag die de import isoleert en een default export gebruikt:
|
||||
|
||||
**Bestanden structuur:**
|
||||
```
|
||||
app/(marketing)/releases/
|
||||
app/(marketing)/documentatie/
|
||||
├── layout.tsx # Server Component
|
||||
├── components/
|
||||
│ ├── release-sidebar.tsx # Client Component (named export)
|
||||
@@ -79,7 +79,7 @@ app/(marketing)/releases/
|
||||
```tsx
|
||||
// release-sidebar-wrapper.tsx (NIEUW)
|
||||
import { ReleaseSidebar } from './release-sidebar'
|
||||
import type { ReleaseNote, GroupMetadata, CategoryMetadata } from '@/lib/mdx/releases'
|
||||
import type { ReleaseNote, GroupMetadata, CategoryMetadata } from '@/lib/mdx/documentatie'
|
||||
|
||||
interface ReleaseSidebarWrapperProps {
|
||||
releases: ReleaseNote[]
|
||||
@@ -220,7 +220,7 @@ Dit is een **bekend probleem** in:
|
||||
|
||||
## Testing Checklist
|
||||
|
||||
- [x] `/releases` pagina laadt zonder errors
|
||||
- [x] `/documentatie` pagina laadt zonder errors
|
||||
- [x] Sidebar toont alle groups (Foundation, Features, Infrastructure, Bugs)
|
||||
- [x] Navigatie tussen release pages werkt
|
||||
- [x] Hard refresh werkt correct
|
||||
@@ -233,11 +233,11 @@ Dit is een **bekend probleem** in:
|
||||
## Files Changed
|
||||
|
||||
### Modified
|
||||
1. `app/(marketing)/releases/layout.tsx`
|
||||
1. `app/(marketing)/documentatie/layout.tsx`
|
||||
- Import via wrapper in plaats van direct
|
||||
|
||||
### Added
|
||||
2. `app/(marketing)/releases/components/release-sidebar-wrapper.tsx`
|
||||
2. `app/(marketing)/documentatie/components/release-sidebar-wrapper.tsx`
|
||||
- Nieuwe wrapper component met default export
|
||||
|
||||
3. `docs/troubleshooting/webpack-module-resolution-error.md`
|
||||
@@ -315,7 +315,7 @@ Dit is een **bekend probleem** in:
|
||||
|
||||
**Internal Documentation:**
|
||||
- [Troubleshooting Guide](/docs/troubleshooting/webpack-module-resolution-error.md)
|
||||
- [Release Notes System Docs](/releases/release-notes-system)
|
||||
- [Release Notes System Docs](/documentatie/release-notes-system)
|
||||
|
||||
**External Links:**
|
||||
- [Next.js Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components)
|
||||
@@ -3,7 +3,7 @@
|
||||
"links": [
|
||||
{
|
||||
"label": "Documentatie",
|
||||
"href": "/releases"
|
||||
"href": "/documentatie"
|
||||
},
|
||||
{
|
||||
"label": "Contact",
|
||||
|
||||
@@ -8,7 +8,7 @@ import fs from 'fs'
|
||||
import path from 'path'
|
||||
import matter from 'gray-matter'
|
||||
|
||||
const RELEASES_DIR = path.join(process.cwd(), 'content/nl/releases')
|
||||
const RELEASES_DIR = path.join(process.cwd(), 'content/nl/documentatie')
|
||||
|
||||
export interface ReleaseFrontmatter {
|
||||
title: string
|
||||
|
||||
@@ -50,7 +50,7 @@ export async function middleware(request: NextRequest) {
|
||||
'/update-password',
|
||||
'/auth/callback',
|
||||
'/contact',
|
||||
'/releases',
|
||||
'/documentatie',
|
||||
'/api/leads',
|
||||
'/robots.txt',
|
||||
'/sitemap.xml',
|
||||
|
||||
Reference in New Issue
Block a user