refactor: update content structure and layout templates

- Updated author format in content files
- Added section field to content files
- Simplified categories format
- Removed no-category.html layout
- Updated list.html and single.html layouts
- Updated index.html layout
- Updated generate-content.js script
- Do not index content with git
This commit is contained in:
kbe
2025-08-18 17:41:33 +02:00
parent 2135420573
commit fced4930c1
267 changed files with 805 additions and 584 deletions

View File

@@ -37,21 +37,10 @@ function generateContent() {
wordpress_id: post.id,
excerpt: post.excerpt.rendered.replace(/<[^>]*>/g, ''),
featured_image: post._embedded?.['wp:featuredmedia']?.[0]?.source_url || '',
author: {
id: post.author,
name: post._embedded?.author?.[0]?.name || 'Unknown'
},
categories: post._embedded?.['wp:term']?.[0]?.map(cat => ({
id: cat.id,
name: cat.name,
slug: cat.slug
})) || [],
tags: post._embedded?.['wp:term']?.[1]?.map(tag => ({
id: tag.id,
name: tag.name,
slug: tag.slug
})) || [],
// section: categorySlug
author: post._embedded?.author?.[0]?.name || 'Unknown',
categories: (post._embedded?.['wp:term']?.[0] || []).map(cat => cat.name || 'Non classé'),
tags: (post._embedded?.['wp:term']?.[1] || []).map(cat => cat.name || 'Non classé'),
section: categorySlug
};
const content = `---