草庐IT

ruby - 在 Windows 本地主机上运行 Jekyll 的问题

首先,我是Ruby新手,使用本地主机。我正在使用:Windows8Pro,Ruby安装到C:\Ruby200,RubyDevkit安装到C:\RubyDEV,config。yml也已正确配置到正确的目录。gem规范似乎存储在C:\username\.gem最后,Jekyllgem根据命令提示符完美安装。bin的正确PATH也已设置。jekyll--server正在运行据说会转到“localhost:4000”,但似乎没有完美设置。它最初在尝试访问/时给我一个Forbidden错误,但现在它似乎根本不想加载。我查阅了一些教程。http://www.testically.org/2012/

ruby - 如何解决在 Cygwin 中找不到 -lcrypt?

我正在尝试使用Cygwin安装Jekyll。我导航到我的项目目录并运行:geminstalljekyll有几个错误,但没有什么是我无法通过安装适当的软件包解决的,但有一个错误是我目前遇到的问题:Buildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingjekyll:ERROR:Failedtobuildgemnativeextension./usr/bin/ruby.exe-r./siteconf20150401-7872-17w9ed4.rbextconf.rbcreatingMakefilemake"DE

ruby-on-rails - 无法在 Windows 上安装 Jekyll..证书验证失败

这个问题在这里已经有了答案:SSL_connectreturned=1errno=0state=SSLv3readservercertificateB:certificateverifyfailed(37个答案)关闭7年前。尝试在Windows上安装Ruby和Jekyllhttp://jekyll-windows.juthilo.com/在我尝试安装jekll之前一切都很顺利...然后我收到以下错误$geminstalljekyllERROR:Couldnotfindavalidgem'jekyll'(>=0),hereiswhy:Unabletodownloaddatafromhtt

windows - GitHub Pages 的 Jekyll 在 Windows 上找不到 rouge

我刚刚在Windows上安装了Jekyll,我正在尝试让语法高亮显示与rouge一起使用。我在_config.yml上设置了highlighter:rouge。在文件_posts\2015-08-13-my-first-post.md中我得到:{%highlightjavascriptlinenos%}vars="JavaScriptsyntaxhighlighting";alert(s);{%endhighlight%}当我运行bundleexecjekyllserve时,它输出:C:\Users\Fred\Documents\Projects\GithubPage>bundleex

windows - Jekyll 服务转换错误 "No such file or directory"

我关注了installationinstructionsforWindows,使用“rouge”语法荧光笔。我用“jekyllnew”创建了新站点并更改为该文件夹。但是,当我尝试运行“bundleexecjekyllserve”时,出现以下错误,我用谷歌搜索却没有结果。Generating...JekyllFeed:GeneratingfeedforpostsConversionerror:Jekyll::Converters::Scssencounteredanerrorwhileconverting'assets/main.scss':Nosuchfileordirectory@r

javascript - Jekyll:JavaScript 中的液体标签

假设我有两个链接:“所有帖子”和“个人”。当用户单击“个人”链接时,他应该只会看到类别为“个人”的帖子。现在,liquid标签是{%forpostinsite.posts%}。我想了解是否有一种方法可以从javascript访问变量site.posts,这样我就可以监听点击事件并动态过滤帖子。如果没有,我该怎么办? 最佳答案 你可以让Jekyll解析任何文件,方法是向它添加一个空的开头内容。例子:assets/js/script.js编辑16/07/28:您可以使用jsonifyfilter对于任何散列或数​​组------{{si

Jekyll kramdown 中的 Php 代码突出显示不起作用

我将Jekyll与kramdown和pygments一起使用,它适用于javascript或python代码,但是当我创建php时:{%highlightphp%}header('Content-Type:application/json');echojson_encode(array('jsonrpc'=>"2.0",'result'=>$result,'id'=>$request->id,'error'=>null));{%endhighlight%}每一行都是一个x类的跨度:header('Content-Type:application/json');echojson_enco

java - 在 Java 中解析 YAML Front matter

我必须解析YAMLFrontMatter在java像jekyll,所以我查看了源代码,foundthis但我不太明白(我不太了解ruby)。所以我的问题是,如何在java中解析YAMLFrontMatter?我有snakeyaml在我的类路径中,我将从Markdown文件中解析YAMLFrontMatter,为此我使用pegdown 最佳答案 voidparse(Readerr)throwsIOException{BufferedReaderbr=newBufferedReader(r);//detectYAMLfrontmatte

seo - 每页 2 个版本

我使用Jekyll创建了我的博客。有人告诉我,我的网站正在为某些页面编制3个URL的索引,这将被归类为Google的重复内容。我注意到我可以访问:https://villaagogo.com/guide/universal-orlando-resort/halloween-horror-nights-2017/,https://villaagogo.com/guide/universal-orlando-resort/halloween-horror-nights-2017以及每个斜线后的index.html扩展名。我不确定如何解决这个问题。我的配置文件中有以下内容:permalink

html - 在元信息中显示博客文章标题

我正在为我的Jekyll网站进行搜索引擎优化,但遇到无法设置元信息的问题。......{%forpostinsite.posts%}{{post.date|date_to_string}}{{assignseo_title=post.title}}{{post.title}}{%endfor%}我正在分配sel_title到帖子标题,但它没有出现在我的元信息中!我刚得到我也试过添加{{assignseo_title=page.title}}在我的里面post.html使用{{page.seo_title}}发布布局无济于事{{post.seo_title}}和{{seo_title}}