Closed asbjornu closed 4 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
WONTFIX? 😢
The goal of this plugin is to allow downloading remote themes in a safe manner for GitHub pages. Downloading arbitrary (and possibly malicious) Ruby code as plugins is probably outside the scope of this project. I wouldn't get my hopes up that this would be implemented.
I understand. For Jekyll sites built by GitHub Pages, _plugins
isn't supported regardless. But jekyll-remote-theme
works for Jekyll sites that have custom builds, where only the resulting HTML is published to gh-pages
. In that situation, the current behaviour is a bit unexpected.
It is a bit strange that a theme can load its own plugins to provide some neat functionality and then that functionality breaks when the theme is used by another Jekyll website. Perhaps _plugins
in a remote theme can be supported under a new configuration property in _config.yml
?
I have not tried this myself but in my mind changing one line in your remote theme's gemspec may work. Specifically, this line:
spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r!^(assets|_layouts|_includes|_sass|LICENSE|README)!i) }
would need to be changed to include the _plugins
folder like so:
spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r!^(assets|_layouts|_includes|_sass|_plugins|LICENSE|README)!i) }
(And if that works, then #69 may be fixed in a like manner.)
@orchardcc, thanks for the tip! That may just work, but it seems like plugins need to be aware of the fact that they are installed via jekyll-remote-theme
somehow, as pathing at least seems to be an issue. My spec.files
assignment now looks like this:
spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(/^(assets|_layouts|_includes|_sass|_plugins|_assets|LICENSE|README)/i) }
Any ideas how a plugin from the remote theme can access files from the _assets
folder of the remote theme? Currently, __dir__
within the plugin seems to return the base path of the jekyll site (not the remote theme) appended with _plugins
and I'm not clear on where the remote theme's files are ending up and where to look for them.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug
We have a few custom tag plugins in the
_plugins
folder in a remote theme. Using the theme in another repository makesjekyll build
fail as the plugins aren't found:Steps to reproduce the behavior
git checkout feature/dx-803_docker
bundle exec jekyll build
Expected behavior
I expect plugins within the
_plugins
folder of a remote theme to work in Jekyll sites using said remote theme.Additional context