Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Commit ac8d2fc

Browse files
committed
feat: improve the templates using the new columns (slug and title)
- Added columns slug and title to replace prior references to id(s) - The column "item" was renamed to "decription"
1 parent 3b9a73e commit ac8d2fc

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

scripts/populate-details.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ const addContent = (content) => {
1414
standards.forEach((item, index) => {
1515
const fileContent = `---
1616
sidebar_position: ${index + 1}
17-
id: ${item.id}
18-
title: ${item.id.charAt(0).toUpperCase() + item.id.slice(1)}
19-
slug: /details/${item.id}
17+
id: ${item.slug}
18+
title: ${item.title}
19+
slug: /details/${item.slug}
2020
---
2121
22-
# ${item.id.charAt(0).toUpperCase() + item.id.slice(1)}
22+
# ${item.title}
2323
2424
## Use Case
2525
@@ -29,7 +29,7 @@ slug: /details/${item.id}
2929
3030
## Description
3131
32-
${item.item}
32+
${item.description}
3333
3434
## Details
3535
@@ -40,6 +40,6 @@ ${item.item}
4040
- How To: ${addContent(item['how to'])}
4141
4242
`
43-
const detination = path.join(process.cwd(), `docs/details/${item.id}.mdx`)
43+
const detination = path.join(process.cwd(), `docs/details/${item.slug}.mdx`)
4444
writeFileSync(detination, fileContent)
4545
})

scripts/populate-implementations.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ standards.forEach(item =>
3030
const addHeader = () => `
3131
| Section | Item | Priority Group | Details |
3232
| --- | --- | --- | --- |`
33-
const addRow = (item) => `| ${item.section} | ${item.item} | ${item['priority group']} | [details](/details/${item.id}) |`
33+
const addRow = (item) => `| ${item.section} | ${item.title} | ${item['priority group']} | [details](/details/${item.slug}) |`
3434

3535
// Prepare the markdown files
3636
projectStatus.forEach((status, index) => {

0 commit comments

Comments
 (0)