Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何在使用Jekyll和Liquid布局生成的站点中使用mustache.js_Javascript_Ruby_Mustache_Jekyll_Liquid Layout - Fatal编程技术网

Javascript 如何在使用Jekyll和Liquid布局生成的站点中使用mustache.js

Javascript 如何在使用Jekyll和Liquid布局生成的站点中使用mustache.js,javascript,ruby,mustache,jekyll,liquid-layout,Javascript,Ruby,Mustache,Jekyll,Liquid Layout,我有一个内置于Jekyll的网站,用于快速制作我正在从事的JavaScript项目的原型: 现在我决定将其引入到项目中,显然我遇到了液体布局{{}语法与mustache语法冲突的问题 有人知道我可以简单地使用mustache的特性来改变mustache在我的项目中的工作方式吗?如何将write语法放入由Jekyll/Liquid生成的JS中?我在一年前发现它有缺陷,但我记得必须在实际模板中包含分隔符设置。例如: {{=[[ ]]=}} <div>There have been &l

我有一个内置于Jekyll的网站,用于快速制作我正在从事的JavaScript项目的原型:

现在我决定将其引入到项目中,显然我遇到了液体布局{{}语法与mustache语法冲突的问题


有人知道我可以简单地使用mustache的特性来改变mustache在我的项目中的工作方式吗?如何将write语法放入由Jekyll/Liquid生成的JS中?

我在一年前发现它有缺陷,但我记得必须在实际模板中包含分隔符设置。例如:

{{=[[ ]]=}}

<div>There have been <strong>[[numVisits]]</strong> visits to this site!</div>

[[={{ }}=]]

虽然我不确定初始{{是否会被正确解释,因为其他库正在查看同一模板。

我在一年前发现它有缺陷,但我记得必须在实际模板中包含分隔符设置。例如:

{{=[[ ]]=}}

<div>There have been <strong>[[numVisits]]</strong> visits to this site!</div>

[[={{ }}=]]

尽管我不确定初始{{是否会被正确解释,因为其他库正在查看相同的模板。

在我放在_posts文件夹默认jekyll设置中的页面中,我有以下内容:

---
layout:      test
categories:  tests
comments:    false
date:        2013-02-02 21:15:30
title:       Version 0.1.1 - geoJSON From Google Docs
subtitle:    Grab the Data from Google Docs Spreadsheet

mustacheSetDelimiter: "{{={u{ }u}=}}"
---
下面我有下面的测试线:

// Testing mustache template: use this to set new delimiter tags {{page.mustacheSetDelimiter}}
console.log(Mustache.render("{{page.mustacheSetDelimiter}} County name: {u{countyname}u}", masterGeoJSON.features[0].properties));

它就像一个符咒。

在我的页面中,我把它放在_posts文件夹默认的jekyll设置中,我有以下内容:

---
layout:      test
categories:  tests
comments:    false
date:        2013-02-02 21:15:30
title:       Version 0.1.1 - geoJSON From Google Docs
subtitle:    Grab the Data from Google Docs Spreadsheet

mustacheSetDelimiter: "{{={u{ }u}=}}"
---
下面我有下面的测试线:

// Testing mustache template: use this to set new delimiter tags {{page.mustacheSetDelimiter}}
console.log(Mustache.render("{{page.mustacheSetDelimiter}} County name: {u{countyname}u}", masterGeoJSON.features[0].properties));

它就像一个符咒。

hind site:20/20我应该将变量setMustacheDelimiter命名为setMustacher对于今天之后看到这个的所有人,我只想让你们知道我花了5个多小时寻找Mustache没有呈现我的视图数据的原因。我真是太感谢你们了,@Jeremy,为了这个保存!!!hind site 20/20我应该将va命名为setMustachedelimiterriable SetMustacheDelimiter对于今天之后看到这个的所有人,我只想让你们知道,我花了5个多小时寻找Mustache没有呈现我的视图数据的原因。我真是太感谢你们了,@Jeremy,谢谢你们的这次保存!!!