百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
J

jekyll-compose

> 编程语言
开源

:memo: 使用这些命令在 Jekyll 中简化您的写作。

736 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

:memo: 使用这些命令在 Jekyll 中简化您的写作。

Jekyll::Compose

使用一些命令来简化 Jekyll 中的编写工作。

安装

将以下行添加到您应用程序的 Gemfile 中: gem 'jekyll-compose', 组: [:jekyll_plugins] 然后执行: $ bundle

使用方法

安装完毕后(见上文),运行 bundle exec jekyll help 即可看到: 在帮助中,您将看到可供您使用的新命令:

bash
  draft      # Creates a new draft post with the given NAME
  post       # Creates a new post with the given NAME
  publish    # Moves a draft into the _posts directory and sets the date
  unpublish  # Moves a post back into the _drafts directory
  page       # Creates a new page with the given NAME
  rename     # Moves a draft to a given NAME and sets the title
  compose    # Creates a new file with the given NAME

使用以下内容创建新页面:

bash
    $ bundle exec jekyll page "My New Page"

使用以下内容创建新帖子:

bash
    $ bundle exec jekyll post "My New Post"
    # or specify a custom format for the date attribute in the yaml front matter
    $ bundle exec jekyll post "My New Post" --timestamp-format "%Y-%m-%d %H:%M:%S %z"
bash
    # or by using the compose command
    $ bundle exec jekyll compose "My New Post"
bash
    # or by using the compose command with post specified
    $ bundle exec jekyll compose "My New Post" --post
bash
    # or by using the compose command with the posts collection specified
    $ bundle exec jekyll compose "My New Post" --collection "posts"

使用以下内容创建新的草稿:

bash
    $ bundle exec jekyll draft "My new draft"
bash
    # or by using the compose command with draft specified
    $ bundle exec jekyll compose "My new draft" --draft
bash
    # or by using the compose command with the drafts collection specified
    $ bundle exec jekyll compose "My new draft" --collection "drafts"

使用以下方法重命名您的草稿:

bash
$ bundle exec jekyll rename _drafts/my-new-draft.md "My Renamed Draft"
bash
# 或者将其重新命名
$ bundle exec jekyll rename _draf

[][travis]
[][appveyor]
[travis]: https://travis-ci.org/jekyll/jekyll-compose
[appveyor]: https://ci.appveyor.com/project/jekyll/jekyll-compose

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rubyjekyll-plugin

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言