问题标签 [jekyll-extensions]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ruby - 在 Jekyll 模板中包含外部文件
是否可以在 Jekyll 模板中包含来自另一个域的 html 文件?如果是这样,语法是什么?
我不是 Ruby 或 Jekyll 开发人员,或多或少是代表另一个人提问,所以如果答案很明显,请原谅我!至少我无法通过一些初步研究找到答案。
本质上,我们试图从另一个域中提取页脚的标记,这就是生产的工作方式,所以我们实际上只是试图在我们的模板可交付成果中模拟它。
干杯
jekyll - 在 Octopress 的 blockquote 插件中嵌入 Markdown
我喜欢 Octopress ( http://octopress.org/docs/blogging/plugins/ ) 的 blockquote 插件的功能。这会给我一个很好的方式来将引用归因于作者。
但是,我不知道如何阻止引用降价中的内容。
这是我尝试过的一个例子:
有什么建议吗?似乎这样的事情可能有效:Embedding Markdown in Jekyll HTML
我在这里的 github octopress 部署上有这个:http ://www.railsonmaui.com ,你可以在这里找到这篇文章的源代码:https ://github.com/justin808/justin808.github.io/blob /source/source/_posts/2013-04-27-octopress-setup-with-github-and-org-mode.markdown
(在 github 上自由部署的 Octopress 非常酷,尤其是使用 org-mode)
syntax-highlighting - Jekyll 中基于 YAML 变量的语法高亮显示
当使用 Jekyll 读取的代码编写 markdown 时,您可以启用语法高亮
但是,如果您经常在代码和文本之间切换,这会变得有点冗长。是否可以在标头中引入 YAML 变量,例如
这样这个页面上的每个代码块都会像python一样突出显示,但只需要缩进,而不是围栏?
jekyll - rdiscount 在块 html 中启用解析降价?
rdiscount 是否有任何全局选项可以在块 html 标记中启用解析降价?以及在 Octopress/Jekyll 中使用该选项的任何方式?这是 Kramdown 支持的选项:
parse_block_html 处理块 HTML 标记中的 kramdown 语法 如果此选项为真,kramdown 解析器将块 HTML 标记的内容处理为包含块级元素的文本。由于这通常不需要,因此默认值为 false。通常最好通过 markdown 属性选择性地启用 kramdown 处理。
默认值:假
不幸的是,Jekyll 没有将这个 kramdown 标志传递给 kramdown。我打开了一个问题:https ://github.com/mojombo/jekyll/issues/1095
jekyll - 在 Jekyll 的一个文件夹下显示页面?
我认为管理 Jekyll 页面的本地方式,即在根文件夹下创建 .md 文件/文件夹,有点混乱。
因此,我想将要显示的每一页放入名为“pages”的文件夹中。此外,我希望这些页面具有级联结构:假设我的文件夹具有以下结构:
然后在 pages-listing 页面中,它应该是这样的:
此外,不在 pages 文件夹下的其他 *.html 文件不应显示在此页面列表页面中。
我该怎么做?
非常感谢。
ruby - 用于标记的 Jeklly 插件
我为 Jeklly 编写了一个简单的插件,它基本上采用了我site.owner.email
在其中定义的我的内容_config.yml
并对其进行了混淆,然后将其放在我的关于页面上。我有以下代码:
_plugins/obfuscate_email.rb
在这种情况下使用它:
{% obfuscate_email site.owner.email %}
会给出这样的结果:site[dot]owner[dot]email
,但我期待这样的东西会返回owner[dot]something[at]gmail[dot]com
我该怎么称呼这个?
谢谢
ruby - 如何在转换器插件中访问页面属性(YAML 前端)
我正在为 Jekyll 编写一个转换器插件,并且需要访问一些页眉(YAML 前端)属性。只有内容被传递给主转换器方法,似乎无法访问上下文。
例子:
任何想法如何访问转换器插件中的页眉数据?
jekyll - 如何将 {% capture %} 变量从视图传递到 Jekyll/Liquid 中的布局?
我正在尝试在 Jekyll 中重建一个博客,但我偶然发现了一个简单的任务。
如果我有以下一组模板:
默认.html:
frontpage.html:
索引.html:
我期待这{% capture head %}
会将变量传递给布局。但似乎只有来自 Front Matter 的变量实际上被传递为page.variable_name
.
有没有办法将capture
-d var 传递给 Jekyll 中的布局?
猜猜我可以为它制作 2 种不同的布局frontpage
,normal_page
这将替换布局中的整个{{head}}{{content}}
块。capture
但这就像 html 的两倍,所以如果可能的话,我宁愿用它来解决它。
jekyll - 如何在“jekyll build”的生命周期内存储哈希?
我正在将自定义 Liquid 标签编码为 Jekyll 插件,我需要为其保留一些值,直到在当前运行的命令中下一次调用该标签。jekyll build
是否有一些全局位置/命名空间可用于存储和检索值(最好是键值对/哈希)?
ruby - Pandoc citation in figure caption and alt text
I am using jekyll with pandoc markdown plugin to render citations in static html pages. This works well with markdown text, but does not seem to work in figure captions that are transformed into alt-text in the final html.
Markdown example with a figure that needs citation in its caption (bibliography keys such as bibkey2013 are stored in a bibtex file that is specified in jekyll configuration options):
My attempts to include latex commands inside the caption did not work either. Any suggestions on how to have pandoc process citations inside the caption?