@@ -72,12 +72,13 @@ function createHTML (header, footer, text) {
72
72
async function createDocs ( ) {
73
73
const docs = path . resolve ( __dirname , '..' , 'docs' )
74
74
const dist = path . resolve ( __dirname , '..' , 'public' )
75
+ const branding = path . join ( docs , 'branding' )
75
76
76
77
await fs . rmdir ( dist , { recursive : true } )
77
78
await fs . mkdir ( dist )
78
79
79
- const header = await fs . readFile ( path . join ( docs , ' branding' , 'header.html.in' ) , { encoding : 'utf8' } )
80
- const footer = await fs . readFile ( path . join ( docs , ' branding' , 'footer.html.in' ) , { encoding : 'utf8' } )
80
+ const header = await fs . readFile ( path . join ( branding , 'header.html.in' ) , { encoding : 'utf8' } )
81
+ const footer = await fs . readFile ( path . join ( branding , 'footer.html.in' ) , { encoding : 'utf8' } )
81
82
const files = await fs . readdir ( docs )
82
83
for ( const file of files ) {
83
84
if ( ! file . endsWith ( '.md' ) ) {
@@ -90,12 +91,13 @@ async function createDocs () {
90
91
}
91
92
92
93
const dest = path . join ( dist , 'media' )
93
- const src = path . join ( docs , ' branding' , 'media' )
94
+ const src = path . join ( branding , 'media' )
94
95
await fs . mkdir ( dest )
95
96
await fs . mkdir ( path . join ( dest , 'css' ) )
96
97
await fs . mkdir ( path . join ( dest , 'img' ) )
97
98
await fs . copyFile ( path . join ( src , 'css' , 'style.css' ) , path . join ( dest , 'css' , 'style.css' ) )
98
99
await fs . copyFile ( path . join ( src , 'img' , 'logo.svg' ) , path . join ( dest , 'img' , 'logo.svg' ) )
100
+ await fs . copyFile ( path . join ( branding , 'CNAME' ) , path . join ( dist , 'CNAME' ) )
99
101
}
100
102
101
103
createDocs ( ) . catch ( ex => {
0 commit comments