尝试使用插件在 GitHub Jekyll 页面上嵌入推特提要时出现 Liquid 错误
Liquid error when trying to embed twitter feed on GitHub Jekyll page using plugin
我正在尝试将我的 Twitter 时间线嵌入到我在 Github 上托管的 Jekyll 博客中。
这是我要安装的插件:https://github.com/rob-murray/jekyll-twitter-plugin
这些是我用来安装插件的一般说明:https://jekyllrb.com/docs/plugins/
以上站点包含警告:
Plugins on GitHub Pages
GitHub Pages is powered by Jekyll. However, all Pages sites are generated using the --safe option to disable custom plugins for security reasons. Unfortunately, this means your plugins won’t work if you’re deploying to GitHub Pages.
You can still use GitHub Pages to publish your site, but you’ll need to convert the site locally and push the generated static files to your GitHub repository instead of the Jekyll source files."
这是否意味着我正在尝试做的事情是不可能的,因为我使用的是 Github 页面,所以如果不静态构建网站?我不相信,因为即使在我的笔记本电脑上本地提供网站时我也会遇到错误。
但是,当我将示例 {% twitter https://twitter.com/jekyllrb maxwidth=500 limit=5 %}
放入我的 index.md 文件时,出现以下错误。当我在本地执行 jekyll serve --watch
时,出现错误:
Liquid Exception: Liquid syntax error (line 7): Unknown tag 'twitter' in index.md
不知道是我安装的jekyll-twitter-plugin有问题,还是我使用的方式有问题。作为参考,为了安装插件,我执行了以下操作:
- 将
jekyll-twitter-plugin
放入我的 _config.yml 文件中 gems:
header
- 将
gem 'jekyll-twitter-plugin'
放入我的 Gemfile
- 在我自己的机器上本地
sudo gem install jekyll-twitter-plugin
。
谁能帮我找出我做错了什么?
Github 页面不支持该插件,因此无法在其中运行。使用它的唯一可能性是在将您的网站推送到 Github 页面之前在本地构建您的网站。
如果你想在本地安装它,在将 gem 添加到 Gemfile
之后,安装 Gemfile 中指定的 gems:
bundle install
然后继续在您的帖子中使用插件标签。
我正在尝试将我的 Twitter 时间线嵌入到我在 Github 上托管的 Jekyll 博客中。
这是我要安装的插件:https://github.com/rob-murray/jekyll-twitter-plugin
这些是我用来安装插件的一般说明:https://jekyllrb.com/docs/plugins/
以上站点包含警告:
Plugins on GitHub Pages GitHub Pages is powered by Jekyll. However, all Pages sites are generated using the --safe option to disable custom plugins for security reasons. Unfortunately, this means your plugins won’t work if you’re deploying to GitHub Pages.
You can still use GitHub Pages to publish your site, but you’ll need to convert the site locally and push the generated static files to your GitHub repository instead of the Jekyll source files."
这是否意味着我正在尝试做的事情是不可能的,因为我使用的是 Github 页面,所以如果不静态构建网站?我不相信,因为即使在我的笔记本电脑上本地提供网站时我也会遇到错误。
但是,当我将示例 {% twitter https://twitter.com/jekyllrb maxwidth=500 limit=5 %}
放入我的 index.md 文件时,出现以下错误。当我在本地执行 jekyll serve --watch
时,出现错误:
Liquid Exception: Liquid syntax error (line 7): Unknown tag 'twitter' in index.md
不知道是我安装的jekyll-twitter-plugin有问题,还是我使用的方式有问题。作为参考,为了安装插件,我执行了以下操作:
- 将
jekyll-twitter-plugin
放入我的 _config.yml 文件中gems:
header - 将
gem 'jekyll-twitter-plugin'
放入我的 Gemfile - 在我自己的机器上本地
sudo gem install jekyll-twitter-plugin
。
谁能帮我找出我做错了什么?
Github 页面不支持该插件,因此无法在其中运行。使用它的唯一可能性是在将您的网站推送到 Github 页面之前在本地构建您的网站。
如果你想在本地安装它,在将 gem 添加到 Gemfile
之后,安装 Gemfile 中指定的 gems:
bundle install
然后继续在您的帖子中使用插件标签。