Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support cname for docs publishing #1442

Merged
merged 2 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/cmds/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ export default {
type: 'string',
describe: 'Where to build the documentation',
default: userConfig.docs.directory
},
cname: {
type: 'string',
describe: 'A custom domain pointed at the gh-pages branch',
default: userConfig.docs.cname
}
})
},
Expand Down
4 changes: 3 additions & 1 deletion src/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
* @property {string} PublishDocsConfig.email
* @property {string} PublishDocsConfig.message
* @property {string} PublishDocsConfig.directory
* @property {string} [PublishDocsConfig.cname]
*/

/**
Expand All @@ -138,7 +139,8 @@
user: {
name: config.user,
email: config.email
}
},
cname: config.cname

Check warning on line 143 in src/docs.js

View check run for this annotation

Codecov / codecov/patch

src/docs.js#L142-L143

Added lines #L142 - L143 were not covered by tests
}
)
}
Expand Down
4 changes: 4 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ interface DocsOptions {
* Where to build the documentation
*/
directory: string
/**
* If set a CNAME file will be written with a custom domain
*/
cname?: string
}

interface DocsVerifierOptions {
Expand Down
Loading