Skip to content

Commit

Permalink
feat: add support tags in implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
UlisesGascon committed Dec 8, 2024
1 parent 89ebe28 commit ec47ee6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/populate-implementations.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ projectStatus.forEach(status => {

// Populate the data object
checks
// @TODO: Remove this sort when the checks.json is sorted when generated in the dashboard script
// @TODO: Remove this sort when the checks.json is sorted when generated in the dashboard script
.sort((a, b) => a.id - b.id)
.forEach(item =>
projectStatus.forEach(status => {
Expand All @@ -40,12 +40,15 @@ const addRow = (item) => `| ${item.section_number}. ${capitalizeWords(item.secti
// Prepare the markdown files
projectStatus.forEach((status, index) => {
let fileContent = `---
<!-- METADATA:START -->
sidebar_position: ${index + 1}
id: ${status}
title: ${status.charAt(0).toUpperCase() + status.slice(1)}
slug: /implementations/${status}
<!-- METADATA:END -->
---
<!-- LIST:START -->
`

fileContent += implementationPriority.map(priority => {
Expand All @@ -58,6 +61,8 @@ ${data[status][priority].map(addRow).join('\n')}
`
}).join('\n')

fileContent += '<!-- LIST:END -->'

const destination = path.join(process.cwd(), `docs/implementation/${status}.mdx`)
writeFileSync(destination, fileContent)
})

0 comments on commit ec47ee6

Please sign in to comment.