0.0.14 • Published 12 months ago

@zyjared/buildpage v0.0.14

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

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' },
    ]
  },
})

!TIP

如果 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

12 months ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.12

1 year ago

0.0.13

12 months ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.1.0-beta.2

1 year ago

0.1.0-beta

1 year ago

0.1.0-beta.1

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago