keithmifsud / jekyll-target-blank

Automatically opens external links in a new browser for Jekyll Pages, Posts and Docs.
MIT License
105 stars 19 forks source link

Not working (with Github Pages) #64

Open bittlingmayer opened 2 years ago

bittlingmayer commented 2 years ago

The plugin is not working on https://machinetranslate.org, even though we apparently set it up correctly.

Thanks in advance for any help


To repro

For example, see https://machinetranslate.org/wmt22

statmt.org/wmt22

Expected: <a href="https://statmt.org/wmt22/" target="_blank" rel="noopener noreferrer">statmt.org/wmt22/</a>
Actual: <a href="https://statmt.org/wmt22/">statmt.org/wmt22/</a>


Our setup

AFAICT, we're setting up jekyll-target-blank correctly:

https://github.com/machinetranslate/machinetranslate.org/search?q=jekyll-target-blank

Gemfile:

group :jekyll_plugins do
 ...
 gem 'jekyll-target-blank'
 ...
end

_config.yml:

url: https://machinetranslate.org
...
plugins:
 ...
 - jekyll-target-blank
 ...

Here's our setup:


Questions

Are we setting up jekyll-target-blank correctly?

Is there a known issue with Just The Docs?

Or maybe one of the other plugins or our CSS is interfering?

rturquier commented 2 years ago

I have the same issue. After a bit of searching, I've found this on a jekyll docs page:

GitHub Pages is powered by Jekyll. All GitHub Pages sites are generated using the --safe option to disable plugins (with the exception of some whitelisted plugins) for security reasons. Unfortunately, this means your plugins won't work if you’re deploying via GitHub Pages.

You can still use GitHub Pages to publish your site, but you’ll need to build the site locally and push the generated files to your GitHub repository instead of the Jekyll source files.