问题标签 [jekyll-theme]
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.
liquid - Liquid for 循环可以在 Jekyll 中使用 frontmatter 为集合页面条目创建维度数组吗?
循环填充的不仅仅是我写给循环的特定集合。我试过Can A Liquid For Loop 是否包含页面变量
页面头条
这是我的 config.yml 设置集合:
配置.yml
刑事收集
外星人:/legal/collections/_criminal
- 家庭暴力.html
- 毒品犯罪.html
- dui.html
- xxx
实践集合
外星人:/legal/collections/_practices
- 民法.html
- 刑法.html
- xxx
我正在访问的文件/practice-law/criminal-defense/index.html
有一个front matter
定义collection: criminal
JSON+LD包含定义了一个CollectionPage
结果
相反,循环的是 FS: 的数组,/legal/collections/_practices
而不是_criminal。JSON 循环目标在包含项目列表的任何集合的每个页面上都会发生变化。对于_criminal
. 我将继续使 `JSON+LD 有效。我只是卡在 for 循环中。Google 结构化数据测试工具显示来自_practices集合而不是_criminal的文章循环。https://search.google.com/structured-data/testing-tool#url=https%3A%2F%2Flegaldemo.strikehawk.com%2Fpractice-law%2Fcriminal-defense%2Findex.html
jekyll - Jekyll 中的迭代 JSON 数据文件产生双重输出
我尝试使用 Jekyll 构建文档站点,并认为将主要链接存储在 JSON 数据文件中可能是个好主意。
这是 JSON 文件:
这是我的模板(部分):
这实际上产生了这个输出:
您会看到输出加倍,一次是外循环的空变量,其次是内循环的正确值。
有什么提示吗?这是一个错误还是我只是用错了?还没有看到任何关于 for 循环仅用于一个级别的建议。例如 Jinja2 可以做到这一点。我使用的 Jekyll 版本是 4.0(最新)。
提前谢谢了。
问候,托马斯
ruby - 在一个网站上使用多个主题 jeykll
我最近发现了jekyll,并想用它制作一个项目登录页面。我想有一个使用一个主题(例如ubuild )的主页,并有另一个使用不同主题(例如just-the-docs )的文档页面(通过顶部的导航栏访问)。我该怎么做呢?
编辑:我想为此使用 Github Pages。
html - Can a github page made using default templates ALSO render a custom html file AS IS from the same repository?
I have setup a Github page successfully using Jekyll and the default Minimal theme on the gh-pages
branch. It acts as a nice documentation for my code in the master
branch. However I now want it to also render a custom html page.
What do I mean by that?
The html is a completely finished page that doesn't need a template but still needs to be output.
Usually we write in markdown and Github takes care of everything. But this custom html file can't be prepared that way. It has some interactive elements, scripts etc that can't be put down in markdown and expected to be prepared correctly by Github (OR is it actually possible to hack the template to do that?). I don't really care the endpoint of the page, it can be any thing.
If it can be done, please let me know how.
EDIT:
Using the current solution of -
I am able to partially render the HTML file i.e the formatting of the template is still applied even though I do not want any formatting from the theme at all.
How do I make Github ignore all formatting from the theme for just this html file ?
EDIT2:
I also tried with the following in assets/css/style.scss
file based on customizing your theme's css help -
But nothing happened.
EDIT3
I haven't tried with customizing your html layout yet, but that also seems to be a solution.
I also tried with the following directly in the index.md
file -
Where doom
is NOT defined anywhere.
This seems to work !!
ruby - 将jekyll与gitlab页面一起使用,它说当它使用gitlab CI部署网站时找不到主题,我已经安装了它
我的目标
要拥有一个包含 jekyll 站点配置文件(但不是 _site)的存储库,并且每次我推送到存储库时,都会运行一个 gitlab 管道。使用该管道,该站点是使用 Jekyll 构建的(我正在使用这个主题https://github.com/mmistakes/jekyll-theme-basically-basic)
快速查看我遇到的重要文件
宝石文件
也许您想知道为什么那里有这么多评论。那是因为我在 gitlab 中部署时遇到了问题,我发现如果我将它们安装在 .gitlab-ci.yml 中,我就不会遇到这些问题。
_config.yml
.gitlab-ci.yml
此外,您在这里有公共存储库
https://gitlab.com/unveiled_adri/jekyll_project
当然还有在gitlab的docker vm上部署的全过程,显示报错
结论
我已经尝试了一切,但在部署的最后一点,我完全迷失了。我可以解决安装问题,但现在我不知道如何解决。
jekyll - 如何在 Jekyll 的 Minima 主题中更改页面顺序?
我是一个全新的 Jekyll 用户,所以我很欣赏这些信息可能在其他地方,但我似乎无法弄清楚。我刚刚建立了一个新的 Jekyll 站点,并且正在使用默认的 Minima 主题。
我想更改导航中的默认页面顺序,并尝试nav-order: 1
在每个页面的 YAML 前端输入等。
这似乎不起作用,所以我想我需要做其他事情来覆盖默认设置?
提前致谢。
jekyll - 站点或页面变量的 Jekyll 定义?
我是 Jekyll 的新手(实际上我不是前端开发人员)。在很多情况下,当使用 Jekyll 时,我应该使用site.pages
or page.title
ect。
在官方文档中,这些变量是有含义的。然而,读完之后,我还是一头雾水。
例如:
site.pages
:所有页面的列表;page.title
:页面的标题;
我仍然想知道“所有页面”是什么意思:我项目根目录中的所有页面?还是我项目任何深度的所有页面?除了页面的定义是什么?
我认为文档对我来说不够清楚。任何人都知道更具体的细节,例如代码中的定义位置site.pages
?如果我知道定义在哪里,也许我可以得到更多。
和更多:
site
:站点范围的信息+配置设置来自_config.yml
。
那么关于所有“站点范围信息”的更多信息,或这些“站点范围信息”的定义位置?
任何帮助都将不胜感激。
github - 在 github-pages 上的博客文章中添加评论
我使用Jekyll Theme制作了一个基于 Github 页面的网站。目前我也可以在该网站上发布博客。但是,我想在博客文章的末尾添加一个评论部分。
有关于如何使用Disqus添加评论部分的教程。但我认为要使用 Disqus,需要付费订阅。所以我正在寻找 Disqus 的替代品来添加评论部分。
分享任何关于它的想法将不胜感激。
ruby - jekyll 最小错误主题抛出“未初始化常量 Faraday::Error::ClientError (NameError)”
我是使用 jekyll 的新手,并尝试将minimal-mistakes-jekyll
主题安装为 gem。将 gem 添加minimal-mistakes-jekyll
到我的 gemfile 中,使用 bundle 命令更新它,并将其设置为 _config.yml 创建的目录中的主题,jekyll new mywebsite
但是当我尝试运行 bundle exec jekyll serve 时,它给了我这个错误:
/home/theo/gems/gems/octokit-4.14.0/lib/octokit/middleware/follow_redirects.rb:14:in
`': 未初始化的常量 Faraday::Error::ClientError (NameError) 你的意思是?法拉第::ClientError
当我尝试使用不同版本的 jekyll 时,这种情况仍然存在。我不知道如何解决这个问题,任何帮助将不胜感激!运行 Ubuntu 19.04 和 ruby 2.5.5,如果有用的话。