Skip to content

Releases: darcyjoven/tools

npost 基本功能已实现

03 Jul 03:44
f7d1d6e
Compare
Choose a tag to compare

CLI

  1. npost generate -f ./config.yaml 生成配置文件
  2. npost new -d blog-posts -p 'golang is very fun' 在项目blog的posts下生成'golang is very fun'标题的文章

默认配置文件

logdir: ./temp # 日志文件,需要先建立文件夹
loginterval: one # 日志记录位置
logname: newpost # 日志名称
projects:
    blog:
        languagedir: false # 多语言是否不同文件区分
        languages:
            - destination: D:/app/github.io/blog/content  # 文章目录位置
              name: en # 语言名称
              template: D:/app/github.io/blog/archetypes # 模板位置
            - destination: D:/app/github.io/blog/content 
              name: zh-cn
              template: D:/app/github.io/blog/archetypes
        order: true  # 是否设置weight
        source: D:/app/github.io/blog # 项目位置
    book:
        languagedir: true
        languages:
            - destination: D:/app/github.io/blog/content.en
              name: en
              template: D:/app/github.io/blog/archetypes
            - destination: D:/app/github.io/blog/content.zh
              name: zh
              template: D:/app/github.io/blog/archetypes
        order: false
        source: D:/app/github.io/book