jekyll-target-blank icon indicating copy to clipboard operation
jekyll-target-blank copied to clipboard

_config file must have the url entry

Open keithmifsud opened this issue 4 years ago • 1 comments

In the documentation for jekyll-target-blank, you might want to add a note that "url="https://some.site.name/" must exist within the site's "_config.yml" file, otherwise it crashes when trying to compile with bundle (null value).

keithmifsud avatar Dec 02 '20 05:12 keithmifsud

When using github-metadata plugin for extracting site.url from the GitHub repository for hosting with GitHub pages, this plugin crashes.

rohandebsarkar avatar Sep 28 '21 05:09 rohandebsarkar

Bumping this. This is what caused the CloudFlare Pages build to fail: I didn't define url in _config.yml and the build would crash with an error whose root cause is as follows:

17:40:45.705 | /opt/buildhome/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/uri/rfc3986_parser.rb:15:in `split': undefined method `to_str' for nil:NilClass (NoMethodError)
-- | --
17:40:45.705 |  
17:40:45.706 | uri = uri.to_str
17:40:45.706 | ^^^^^^^
17:40:45.706 | from /opt/buildhome/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/uri/rfc3986_parser.rb:71:in `parse'
17:40:45.706 | from /opt/buildhome/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/uri/common.rb:193:in `parse'
17:40:45.706 | from /opt/buildhome/.asdf/installs/ruby/3.2.2/lib/ruby/gems/3.2.0/gems/jekyll-target-blank-2.0.2/lib/jekyll-target-blank.rb:196:in `external?'

The error went away after I added the production url to _config.yml. It even made the Preview deployment pass, which actually has a different url than the one I specified in _config.yml.

peter1357908 avatar Aug 01 '23 22:08 peter1357908

Hi guys.

The URL in the config is required for this plugin to work.

Thanks

keithmifsud avatar Aug 02 '23 04:08 keithmifsud