this
一个。它在新选项卡中打开链接,默认情况下,在
Markdown
.
myusername.github.io
repo,将其克隆到本地,并使用
jekyll new .
按指示
here
然后,为了安装上述插件,我遵循了帮助部分中提到的步骤,即以下内容:
Add the following to your site's Gemfile
gem 'jekyll-target-blank'
and add the following to your site's _config.yml
plugins:
- jekyll-target-blank
另外,请注意,默认情况下
Gemfile
包含以下部分和说明:
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 3.8.3"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.0"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
所以我换了
Gemfile公司
bundle update github-pages
.
Gemfile公司
看起来是这样的:
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
# gem "jekyll", "~> 3.8.3"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.0"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
gem 'jekyll-target-blank'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.0" if Gem.win_platform?
注意,我已经注释/取消注释了正确的部分。
还有我的
_config.yml
看起来像这样:
title: xxxxxx
email: xxxxxx
description: >- # this means to ignore newlines until "baseurl:"
xxxxxx.
baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
github_username: xxxxxx
instagram_username: xxxxxx
# Build settings
markdown: kramdown
theme: minima
plugins:
- jekyll-feed
- jekyll-target-blank
然后我做了一个
bundle exec jekyll serve
在本地运行
http://127.0.0.1:4000/
这个插件工作得很好。通过单击下面编写的链接,它将按原样在新选项卡中打开链接。
[LinkText](link)
但是,当我把它全部推到GitHub时,插件不起作用。它仍然打开同一选项卡上的链接。
我做错什么了?