Using a theme
Using a theme is almost the same as using a plugin.
Using a theme from a dependency
Themes can be published on npm in raw Kdu SFC format as kdupress-theme-xxx
.
// .kdupress/config.js
module.exports = {
theme: 'kdupress-theme-xx'
}
Theme Shorthand
If you prefix the theme with kdupress-theme-
, you can use a shorthand to leave out that prefix:
// .kdupress/config.js
module.exports = {
theme: 'xxx'
}
Same with:
// .kdupress/config.js
module.exports = {
theme: 'kdupress-theme-xxx'
}
This also works with Scoped Packages (opens new window):
// .kdupress/config.js
module.exports = {
theme: '@org/kdupress-theme-xxx', // or an official theme: '@kdupress/theme-xxx'
}
Shorthand:
// .kdupress/config.js
module.exports = {
theme: '@org/xxx', // or an official theme: '@kdupress/xxx'
}
Note
The theme whose name starts with @kdupress/theme-
is an officially maintained theme.