Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Commit d08ad3d

Browse files
authored
Merge pull request #695 from UziTech/cname
add cname to docs
2 parents 0bbdf5f + 4a1ac86 commit d08ad3d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

docs/branding/CNAME

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ldapjs.org

scripts/build-docs.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,13 @@ function createHTML (header, footer, text) {
7272
async function createDocs () {
7373
const docs = path.resolve(__dirname, '..', 'docs')
7474
const dist = path.resolve(__dirname, '..', 'public')
75+
const branding = path.join(docs, 'branding')
7576

7677
await fs.rmdir(dist, { recursive: true })
7778
await fs.mkdir(dist)
7879

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' })
8182
const files = await fs.readdir(docs)
8283
for (const file of files) {
8384
if (!file.endsWith('.md')) {
@@ -90,12 +91,13 @@ async function createDocs () {
9091
}
9192

9293
const dest = path.join(dist, 'media')
93-
const src = path.join(docs, 'branding', 'media')
94+
const src = path.join(branding, 'media')
9495
await fs.mkdir(dest)
9596
await fs.mkdir(path.join(dest, 'css'))
9697
await fs.mkdir(path.join(dest, 'img'))
9798
await fs.copyFile(path.join(src, 'css', 'style.css'), path.join(dest, 'css', 'style.css'))
9899
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'))
99101
}
100102

101103
createDocs().catch(ex => {

0 commit comments

Comments
 (0)