fix: use slug from frontmatter if present in document migration
- Previously the migration script always generated slugs from titles - Now checks metadata.slug first before auto-generating - Allows explicit slug control via frontmatter (e.g., glossary-de, glossary-fr) - Required for language-specific document API fallback to work correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
8c09943659
commit
79da253265
1 changed files with 2 additions and 2 deletions
|
|
@ -140,8 +140,8 @@ async function processMarkdownFile(filePath, sourcePath) {
|
|||
// Extract table of contents
|
||||
const tableOfContents = extractTOC(content);
|
||||
|
||||
// Generate slug from title
|
||||
const slug = generateSlug(metadata.title);
|
||||
// Use slug from frontmatter if present, otherwise generate from title
|
||||
const slug = metadata.slug || generateSlug(metadata.title);
|
||||
|
||||
// Determine if document should be public
|
||||
// Internal document patterns (should NOT be public)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue