在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):benjycui/bisheng开源软件地址(OpenSource Url):https://github.com/benjycui/bisheng开源编程语言(OpenSource Language):JavaScript 87.3%开源软件介绍(OpenSource Introduction):Bi Sheng
Sites built with BiShengYou can create a PR to extend this list with your amazing website which is built with BiSheng. Features
Big pictureArticlesUsageInstallation: npm install --save-dev bisheng Then, add {
"scripts": {
"start": "bisheng start"
}
} Create module.exports = {
source: './posts',
output: './_site',
theme: './_theme',
port: 8000,
}; Note: please make sure that Now, just run DocumentationCLIWe can install $ npm install -g bisheng
$ bisheng -h
Usage: bisheng [command] [options]
Commands:
start [options] to start a server
build [options] to build and write static files to `config.output`
gh-pages [options] to deploy website to gh-pages
help [cmd] display help for [cmd]
Options:
-h, --help output usage information
-V, --version output the version number Configuration
The content of module.exports = {
port: 8000,
source: './posts',
output: './_site',
theme: './_theme',
htmlTemplate: path.join(__dirname, '../template.html'),
devServerConfig: {},
webpackConfig(config) {
return config;
},
hash: false,
entryName: 'index',
root: '/',
}; port: Number
To set the port which will be listened when we start a local server. source: String | Array[String] | Object{ [category]: String | Array[String]}
To set directory/directories where we place Markdown files. And all the Markdown files in posts
└── dir1
├── a.md
└── b.md Will output a Markdown data tree: {
dir1: {
a: {...},
b: {...},
},
} And each Markdown file will be parsed as a Markdown data. Actually, a Markdown data is the returned value of mark-twain, and it could be preprocessed by plugins. exclude: RegExp
If you want to exclude some files in your output: String
To set directory where theme: String
To set directory where we put the theme of website, and it also can be a npm package name. themeConfig: any
A set of configuration that your theme provides, and then your theme can read it from
htmlTemplate: String
The HTML template which will be use to generate HTML files which will be sent to users. Note: template will be parsed by nunjucks, and you can use the following variables in this template:
htmlTemplateExtraData: Object
The Extra Data which will be used to render htmlTemplate. devServerConfig: Object
You can consult webpack-dev-server's documentation. postcssConfig: Objectdefault: {
plugins: [
rucksack(),
autoprefixer({
browsers: ['last 2 versions', 'Firefox ESR', '> 1%', 'ie >= 8', 'iOS >= 8', 'Android >= 4'],
}),
],
} You can consult webpack postcss-loader's documentation. webpackConfig: (config) => config
To modify the webpack config, you can extend the config like this. transformers: Object[]
A list of transformers that will be used to transform static files. entryName: String
The name of files which will be generated by webpack, such as root: String
If the website will be deployed under a sub-directory of a domain (something like LicenseMIT |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论