0.0.14 • Published 11 months ago
@zyjared/buildpage v0.0.14
buildpage
根据 markdown 文件生成个人单页 html。
使用
确保根目录存在 README.md
,使用以下命令得到 index.html
:
npx @zyjared/buildpage
如果需要特定的样式,src/themes
内的 README.md
为示例文件。
配置
如果不需要默认行为,也可以创建 buildpage.config.js
进行配置。
const { defineConfig } = require('@zyjared/buildpage')
module.exports = defineConfig({
input: 'README.md',
output: 'index.html',
assets: {
dir: '.',
outDir: '.',
clean: false,
overwrite: true,
include: [],
ignore: ['README.md'],
},
// https://unhead.unjs.io/usage/composables/use-head#input
head: {
link: [
// { rel: 'stylesheet', href: 'custom.css' },
],
meta: [
// { name: 'description', content: 'some description' },
// { name: 'keywords', content: 'keywords1, keywords2' },
]
},
})
如果
public
目录中存在style.css
文件,这将会自动添加到<head>
中。
其他
pnpm buildpage -h
# Usage: buildpage [options]
#
# Options:
# -V, --version output the version number
# -c, --config <config> Path to the configuration file
# -o, --output <output> Path to the output HTML file
# -i, --input <input> Path to the input Markdown file
# -a, --assets <assets> Path to the assets directory
# -d, --dist <dist> Output directory for the generated files
# -h, --help display help for command
0.0.14
11 months ago
0.0.10
11 months ago
0.0.11
11 months ago
0.0.12
11 months ago
0.0.13
11 months ago
0.0.9
12 months ago
0.0.8
12 months ago
0.0.7
12 months ago
0.1.0-beta.2
12 months ago
0.1.0-beta
12 months ago
0.1.0-beta.1
12 months ago
0.0.6
12 months ago
0.0.5
12 months ago
0.0.4
12 months ago
0.0.3
12 months ago
0.0.2
12 months ago
0.0.1
12 months ago