【问题标题】:Grunt Read YAML FrontmatterGrunt 阅读 YAML Frontmatter
【发布时间】:2014-11-26 13:24:44
【问题描述】:

我有一个使用 YAML Front Matter 的 Handlebars 模板 (index.hbs)。

---
title: "Hello World"
whatever: "Something else"
---

<div>etc.....</div>

使用 Grunt,我想返回可以在我的 grunt 文件中使用的“标题”。我一开始只使用grunt.file.read('index.hbs'),但不知道下一步该做什么。

【问题讨论】:

    标签: gruntjs yaml


    【解决方案1】:

    请参阅grunt-matter,这将满足您的需求。

    【讨论】:

      猜你喜欢
      • 2021-08-30
      • 2015-09-25
      • 1970-01-01
      • 2023-03-16
      • 1970-01-01
      • 2016-08-25
      • 2020-12-16
      • 2015-03-29
      • 1970-01-01
      相关资源
      最近更新 更多