This repository was archived by the owner on Jan 20, 2025. It is now read-only.
File tree 2 files changed +26
-17
lines changed
2 files changed +26
-17
lines changed Original file line number Diff line number Diff line change @@ -54,27 +54,34 @@ const renderDetails = (check) => {
54
54
55
55
// Prepare the markdown files
56
56
checks . forEach ( ( check , index ) => {
57
- const fileContent = `---
57
+ const metadata = `---
58
58
sidebar_position: ${ index + 1 }
59
59
id: ${ check . id }
60
60
title: ${ check . title }
61
61
slug: /details/${ check . code_name }
62
- ---
63
-
64
- ## Use Case
65
- <!-- LEVELS:START -->
62
+ ---` . trim ( )
63
+ const levelsContent = `
66
64
- Incubating: ${ check . level_incubating_status }
67
65
- Active: ${ check . level_active_status }
68
66
- Retiring: ${ check . level_retiring_status }
67
+ ` . trim ( )
68
+ const descriptionContent = `## Description
69
+ ${ check . description } `. trim ( )
70
+ const detailsContent = renderDetails ( check )
71
+
72
+ const fileContent = `${ metadata }
73
+
74
+ ## Use Case
75
+ <!-- LEVELS:START -->
76
+ ${ levelsContent }
69
77
<!-- LEVELS:END -->
70
78
71
79
<!-- DESCRIPTION:START -->
72
- ## Description
73
- ${ check . description }
80
+ ${ descriptionContent }
74
81
<!-- DESCRIPTION:END -->
75
82
76
83
<!-- DETAILS:START -->
77
- ${ renderDetails ( check ) }
84
+ ${ detailsContent }
78
85
<!-- DETAILS:END -->
79
86
`
80
87
const detination = path . join ( process . cwd ( ) , `docs/details/${ check . code_name } .mdx` )
Original file line number Diff line number Diff line change @@ -39,27 +39,29 @@ const addRow = (item) => `| ${item.section_number}. ${capitalizeWords(item.secti
39
39
40
40
// Prepare the markdown files
41
41
projectStatus . forEach ( ( status , index ) => {
42
- let fileContent = `---
42
+ const metadata = `---
43
43
sidebar_position: ${ index + 1 }
44
44
id: ${ status }
45
45
title: ${ status . charAt ( 0 ) . toUpperCase ( ) + status . slice ( 1 ) }
46
46
slug: /implementations/${ status }
47
- ---
48
-
49
- <!-- LIST:START -->
50
- `
51
-
52
- fileContent += implementationPriority . map ( priority => {
47
+ ---` . trim ( )
48
+ const listContent = implementationPriority . map ( priority => {
53
49
if ( data [ status ] [ priority ] . length === 0 ) return ''
54
50
55
51
return `
56
52
## ${ priority . charAt ( 0 ) . toUpperCase ( ) + priority . slice ( 1 ) }
57
53
${ addHeader ( ) }
58
54
${ data [ status ] [ priority ] . map ( addRow ) . join ( '\n' ) }
59
- `
55
+ `
60
56
} ) . join ( '\n' )
61
57
62
- fileContent += '\n<!-- LIST:END -->'
58
+ const fileContent = `${ metadata }
59
+ <!-- LIST:START -->
60
+
61
+ <!-- LIST:END -->
62
+ ${ listContent }
63
+ <!-- LIST:END -->
64
+ `
63
65
64
66
const destination = path . join ( process . cwd ( ) , `docs/implementation/${ status } .mdx` )
65
67
writeFileSync ( destination , fileContent )
You can’t perform that action at this time.
0 commit comments