Code Monkey home page Code Monkey logo

jekyll-remote-theme's Introduction

Jekyll Remote Theme

Jekyll plugin for building Jekyll sites with any public GitHub-hosted theme

Gem Version Build Status PRs Welcome

Usage

  1. Add the following to your Gemfile
gem "jekyll-remote-theme"

and run bundle install to install the plugin

  1. Add the following to your site's _config.yml to activate the plugin
plugins:
  - jekyll-remote-theme

Note: If you are using a Jekyll version less than 3.5.0, use the gems key instead of plugins.

  1. Add the following to your site's _config.yml to choose your theme
remote_theme: benbalter/retlab

or 1

remote_theme: http[s]://github.<Enterprise>.com/benbalter/retlab

1 The codeload subdomain needs to be available on your github enterprise instance for this to work.

Declaring your theme

Remote themes are specified by the remote_theme key in the site's config.

For public GitHub, remote themes must be in the form of OWNER/REPOSITORY, and must represent a public GitHub-hosted Jekyll theme. See the Jekyll documentation for more information on authoring a theme. Note that you do not need to upload the gem to RubyGems or include a .gemspec file.

You may also optionally specify a branch, tag, or commit to use by appending an @ and the Git ref (e.g., benbalter/[email protected] or benbalter/retlab@develop). If you don't specify a Git ref, the HEAD ref will be used.

For Enterprise GitHub, remote themes must be in the form of http[s]://GITHUBHOST.com/OWNER/REPOSITORY, and must represent a public (non-private repository) GitHub-hosted Jekyll theme. Other than requiring the fully qualified domain name of the enterprise GitHub instance, this works exactly the same as the public usage.

Debugging

Adding --verbose to the build or serve command may provide additional information.

jekyll-remote-theme's People

Contributors

alxddh avatar ashmaroli avatar benbalter avatar cetinajero avatar dependabot-preview[bot] avatar dirtyf avatar ianlee1521 avatar jallenwork avatar kenman345 avatar mikemcquaid avatar sonicdoe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jekyll-remote-theme's Issues

Error when remote theme doesn't have _sass folder

Describe the bug

When a remote theme doesn't have a _sass directory, the remote theme downloader throws a 404 error.

Steps to reproduce the behavior

Create a new site with a _config.yml with remote_theme: scotte/jekyll-clean. Create a page, and run jekyll build.

Expected behavior

I'd expect the site to build, just without looking in the theme directory for Sass.

Screenshots

No screenshots, but the error I see is:

Invalid theme folder: _sass
      Remote Theme: Using theme scotte/jekyll-clean
             Fatal: Jekyll::RemoteTheme::DownloadError
                    404 - Not Found
Backtrace
/hoosegow/.bundle/ruby/2.5.0/gems/jekyll-remote-theme-0.4.0/lib/jekyll-remote-theme/downloader.rb:67:in `raise_unless_sucess'
/hoosegow/.bundle/ruby/2.5.0/gems/jekyll-remote-theme-0.4.0/lib/jekyll-remote-theme/downloader.rb:44:in `block (2 levels) in download'
/usr/share/rbenv/versions/2.5.3/lib/ruby/2.5.0/net/http.rb:1503:in `block in transport_request'
/usr/share/rbenv/versions/2.5.3/lib/ruby/2.5.0/net/http/response.rb:165:in `reading_body'
/usr/share/rbenv/versions/2.5.3/lib/ruby/2.5.0/net/http.rb:1502:in `transport_request'
/usr/share/rbenv/versions/2.5.3/lib/ruby/2.5.0/net/http.rb:1464:in `request'
/hoosegow/.bundle/ruby/2.5.0/gems/jekyll-remote-theme-0.4.0/lib/jekyll-remote-theme/downloader.rb:43:in `block in download'
/usr/share/rbenv/versions/2.5.3/lib/ruby/2.5.0/net/http.rb:910:in `start'
/usr/share/rbenv/versions/2.5.3/lib/ruby/2.5.0/net/http.rb:609:in `start'
/hoosegow/.bundle/ruby/2.5.0/gems/jekyll-remote-theme-0.4.0/lib/jekyll-remote-theme/downloader.rb:42:in `download'
/hoosegow/.bundle/ruby/2.5.0/gems/jekyll-remote-theme-0.4.0/lib/jekyll-remote-theme/downloader.rb:24:in `run'
/hoosegow/.bundle/ruby/2.5.0/gems/jekyll-remote-theme-0.4.0/lib/jekyll-remote-theme/munger.rb:25:in `munge!'
/hoosegow/.bundle/ruby/2.5.0/gems/jekyll-remote-theme-0.4.0/lib/jekyll-remote-theme.rb:27:in `init'
/hoosegow/.bundle/ruby/2.5.0/gems/jekyll-remote-theme-0.4.0/lib/jekyll-remote-theme.rb:33:in `block in <top (required)>'
/hoosegow/.bundle/ruby/2.5.0/gems/jekyll-3.8.5/lib/jekyll/hooks.rb:103:in `block in trigger'
/hoosegow/.bundle/ruby/2.5.0/gems/jekyll-3.8.5/lib/jekyll/hooks.rb:102:in `each'
/hoosegow/.bundle/ruby/2.5.0/gems/jekyll-3.8.5/lib/jekyll/hooks.rb:102:in `trigger'
/hoosegow/.bundle/ruby/2.5.0/gems/jekyll-3.8.5/lib/jekyll/site.rb:105:in `reset'
/hoosegow/.bundle/ruby/2.5.0/gems/jekyll-3.8.5/lib/jekyll/site.rb:31:in `initialize'

remote_theme fails when _config.yml contains item named `github`

Describe the bug

When a Pages repo contains a _config.yml file specifying a remote_theme and sets a configuration item named github containing a map, the site will not publish on github.com.

Steps to reproduce the behavior

  1. Clone https://github.com/mrmanc/testing-remote-theme.git
  2. Enable Pages on master branch
  3. Wait 15 seconds
  4. Check settings page for error (below)

Your site is having problems building: The minimal-mistakes theme is not currently supported on GitHub Pages. For more information, see https://help.github.com/articles/adding-a-jekyll-theme-to-your-github-pages-site/.

Expected behavior

Site should publish successfully using the remote theme.

Additional context

I have notified [email protected] in case this is an issue with their build process. I should point out that I can not reproduce this locally or using our GitHub Enterprise instance.

Versions of libraries used:

GEM
  remote: https://rubygems.org/
  specs:
    activesupport (4.2.10)
      i18n (~> 0.7)
      minitest (~> 5.1)
      thread_safe (~> 0.3, >= 0.3.4)
      tzinfo (~> 1.1)
    addressable (2.5.2)
      public_suffix (>= 2.0.2, < 4.0)
    coffee-script (2.4.1)
      coffee-script-source
      execjs
    coffee-script-source (1.11.1)
    colorator (1.1.0)
    commonmarker (0.17.9)
      ruby-enum (~> 0.5)
    concurrent-ruby (1.0.5)
    dnsruby (1.60.2)
    em-websocket (0.5.1)
      eventmachine (>= 0.12.9)
      http_parser.rb (~> 0.6.0)
    ethon (0.11.0)
      ffi (>= 1.3.0)
    eventmachine (1.2.7)
    execjs (2.7.0)
    faraday (0.15.2)
      multipart-post (>= 1.2, < 3)
    ffi (1.9.25)
    forwardable-extended (2.6.0)
    gemoji (3.0.0)
    github-pages (187)
      activesupport (= 4.2.10)
      github-pages-health-check (= 1.8.1)
      jekyll (= 3.7.3)
      jekyll-avatar (= 0.5.0)
      jekyll-coffeescript (= 1.1.1)
      jekyll-commonmark-ghpages (= 0.1.5)
      jekyll-default-layout (= 0.1.4)
      jekyll-feed (= 0.9.3)
      jekyll-gist (= 1.5.0)
      jekyll-github-metadata (= 2.9.4)
      jekyll-mentions (= 1.3.0)
      jekyll-optional-front-matter (= 0.3.0)
      jekyll-paginate (= 1.1.0)
      jekyll-readme-index (= 0.2.0)
      jekyll-redirect-from (= 0.13.0)
      jekyll-relative-links (= 0.5.3)
      jekyll-remote-theme (= 0.3.1)
      jekyll-sass-converter (= 1.5.2)
      jekyll-seo-tag (= 2.5.0)
      jekyll-sitemap (= 1.2.0)
      jekyll-swiss (= 0.4.0)
      jekyll-theme-architect (= 0.1.1)
      jekyll-theme-cayman (= 0.1.1)
      jekyll-theme-dinky (= 0.1.1)
      jekyll-theme-hacker (= 0.1.1)
      jekyll-theme-leap-day (= 0.1.1)
      jekyll-theme-merlot (= 0.1.1)
      jekyll-theme-midnight (= 0.1.1)
      jekyll-theme-minimal (= 0.1.1)
      jekyll-theme-modernist (= 0.1.1)
      jekyll-theme-primer (= 0.5.3)
      jekyll-theme-slate (= 0.1.1)
      jekyll-theme-tactile (= 0.1.1)
      jekyll-theme-time-machine (= 0.1.1)
      jekyll-titles-from-headings (= 0.5.1)
      jemoji (= 0.9.0)
      kramdown (= 1.16.2)
      liquid (= 4.0.0)
      listen (= 3.1.5)
      mercenary (~> 0.3)
      minima (= 2.4.1)
      nokogiri (>= 1.8.2, < 2.0)
      rouge (= 2.2.1)
      terminal-table (~> 1.4)
    github-pages-health-check (1.8.1)
      addressable (~> 2.3)
      dnsruby (~> 1.60)
      octokit (~> 4.0)
      public_suffix (~> 2.0)
      typhoeus (~> 1.3)
    html-pipeline (2.8.3)
      activesupport (>= 2)
      nokogiri (>= 1.4)
    http_parser.rb (0.6.0)
    i18n (0.9.5)
      concurrent-ruby (~> 1.0)
    jekyll (3.7.3)
      addressable (~> 2.4)
      colorator (~> 1.0)
      em-websocket (~> 0.5)
      i18n (~> 0.7)
      jekyll-sass-converter (~> 1.0)
      jekyll-watch (~> 2.0)
      kramdown (~> 1.14)
      liquid (~> 4.0)
      mercenary (~> 0.3.3)
      pathutil (~> 0.9)
      rouge (>= 1.7, < 4)
      safe_yaml (~> 1.0)
    jekyll-avatar (0.5.0)
      jekyll (~> 3.0)
    jekyll-coffeescript (1.1.1)
      coffee-script (~> 2.2)
      coffee-script-source (~> 1.11.1)
    jekyll-commonmark (1.2.0)
      commonmarker (~> 0.14)
      jekyll (>= 3.0, < 4.0)
    jekyll-commonmark-ghpages (0.1.5)
      commonmarker (~> 0.17.6)
      jekyll-commonmark (~> 1)
      rouge (~> 2)
    jekyll-default-layout (0.1.4)
      jekyll (~> 3.0)
    jekyll-feed (0.9.3)
      jekyll (~> 3.3)
    jekyll-gist (1.5.0)
      octokit (~> 4.2)
    jekyll-github-metadata (2.9.4)
      jekyll (~> 3.1)
      octokit (~> 4.0, != 4.4.0)
    jekyll-mentions (1.3.0)
      activesupport (~> 4.0)
      html-pipeline (~> 2.3)
      jekyll (~> 3.0)
    jekyll-optional-front-matter (0.3.0)
      jekyll (~> 3.0)
    jekyll-paginate (1.1.0)
    jekyll-readme-index (0.2.0)
      jekyll (~> 3.0)
    jekyll-redirect-from (0.13.0)
      jekyll (~> 3.3)
    jekyll-relative-links (0.5.3)
      jekyll (~> 3.3)
    jekyll-remote-theme (0.3.1)
      jekyll (~> 3.5)
      rubyzip (>= 1.2.1, < 3.0)
    jekyll-sass-converter (1.5.2)
      sass (~> 3.4)
    jekyll-seo-tag (2.5.0)
      jekyll (~> 3.3)
    jekyll-sitemap (1.2.0)
      jekyll (~> 3.3)
    jekyll-swiss (0.4.0)
    jekyll-theme-architect (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-cayman (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-dinky (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-hacker (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-leap-day (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-merlot (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-midnight (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-minimal (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-modernist (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-primer (0.5.3)
      jekyll (~> 3.5)
      jekyll-github-metadata (~> 2.9)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-slate (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-tactile (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-theme-time-machine (0.1.1)
      jekyll (~> 3.5)
      jekyll-seo-tag (~> 2.0)
    jekyll-titles-from-headings (0.5.1)
      jekyll (~> 3.3)
    jekyll-watch (2.0.0)
      listen (~> 3.0)
    jemoji (0.9.0)
      activesupport (~> 4.0, >= 4.2.9)
      gemoji (~> 3.0)
      html-pipeline (~> 2.2)
      jekyll (~> 3.0)
    kramdown (1.16.2)
    liquid (4.0.0)
    listen (3.1.5)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
      ruby_dep (~> 1.2)
    mercenary (0.3.6)
    mini_portile2 (2.3.0)
    minima (2.4.1)
      jekyll (~> 3.5)
      jekyll-feed (~> 0.9)
      jekyll-seo-tag (~> 2.1)
    minitest (5.11.3)
    multipart-post (2.0.0)
    nokogiri (1.8.4)
      mini_portile2 (~> 2.3.0)
    octokit (4.9.0)
      sawyer (~> 0.8.0, >= 0.5.3)
    pathutil (0.16.1)
      forwardable-extended (~> 2.6)
    public_suffix (2.0.5)
    rb-fsevent (0.10.3)
    rb-inotify (0.9.10)
      ffi (>= 0.5.0, < 2)
    rouge (2.2.1)
    ruby-enum (0.7.2)
      i18n
    ruby_dep (1.5.0)
    rubyzip (1.2.1)
    safe_yaml (1.0.4)
    sass (3.5.6)
      sass-listen (~> 4.0.0)
    sass-listen (4.0.0)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
    sawyer (0.8.1)
      addressable (>= 2.3.5, < 2.6)
      faraday (~> 0.8, < 1.0)
    terminal-table (1.8.0)
      unicode-display_width (~> 1.1, >= 1.1.1)
    thread_safe (0.3.6)
    typhoeus (1.3.0)
      ethon (>= 0.9.0)
    tzinfo (1.2.5)
      thread_safe (~> 0.1)
    unicode-display_width (1.4.0)

PLATFORMS
  ruby

DEPENDENCIES
  github-pages

BUNDLED WITH
   1.16.1

Build Warning: Layout 'home' requested in index.md does not exist.

Hello, I tried to use this plugin to switch to monochrome theme,below is the related configuration:

plugins:
  - jekyll-remote-theme

remote_theme: dyutibarma/monochrome

but when I tried to build the site, jekyll print a warning and the generated index.html in _site folder is empty. Here is the output of jekyll build

WARN: Unresolved specs during Gem::Specification.reset:
      listen (~> 3.0)
      rouge (< 4, >= 1.7)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Configuration file: /home/qw/blog/cjqw.github.io/_config.yml
            Source: /home/qw/blog/cjqw.github.io
       Destination: /home/qw/blog/cjqw.github.io/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
      Remote Theme: Using theme dyutibarma/monochrome
     Build Warning: Layout 'home' requested in index.md does not exist.
                    done in 2.709 seconds.
 Auto-regeneration: disabled. Use --watch to enable.

when I run jekyll serve everything seems well except the index page is blank.
I don't have much knowledge about jekyll, is this theme not gem-based or I should
add something in my config?

Theme extension / inheritance

Is your feature request related to a problem? Please describe the problem you're trying to solve.

I’m interested to know the best way to host a tailored version of an existing theme. I would like to add some common style that is still hosted remotely so that it can be maintained in one place.

Describe the solution you'd like

I’m wondering if it is possible / sensible to extend existing themes by chaining remote_theme calls. I don’t know enough about how Jekyll themes work to know if this is even plausible, let alone sensible. This way I could host a theme which referred to mmistakes/minimal-mistakes for example, and overrode or added certain layouts / styles.

Describe alternatives you've considered

  • Git submodules for the common style (feels like voodoo, and would only satisfy some of the requirements)
  • Forking the theme (don’t like the idea of regularly merging changes)
  • External stylesheet (satisfies the common style, but not the extra / overridden layouts etc)

Please release 0.4.2 with #62

Is your feature request related to a problem? Please describe the problem you're trying to solve.

Related to #61
The released version crashes when calling configure_sass

Describe the solution you'd like

Please release 0.4.2 with latest master

Describe alternatives you've considered

I'm currently hot patching with sed -i

Error: No such file or directory - unzip

Guessing this is likely a Windows issue, but wanted to log it just in case I'm doing something wrong.

On a new jekyll new site:

  1. Add gem "jekyll-remote-theme" to Gemfile
  2. Remove theme: minima and replace with remote_theme: mmistakes/jekyll-theme-basically-basic
  3. Add jekyll-remote-theme to plugins array in _config.yml
  4. Run bundle exec jekyll build --verbose
E:\Users\Michael.Rose\Documents\Repositories\remote-theme-test>bundle exec jekyll build --verbose
  Logging at level: debug
Configuration file: E:/Users/Michael.Rose/Documents/Repositories/remote-theme-test/_config.yml
         Requiring: jekyll-feed
         Requiring: jekyll-remote-theme
         Requiring: kramdown
            Source: E:/Users/Michael.Rose/Documents/Repositories/remote-theme-test
       Destination: E:/Users/Michael.Rose/Documents/Repositories/remote-theme-test/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
      Remote Theme: Using theme mmistakes/jekyll-theme-basically-basic
      Remote Theme: Downloading https://codeload.github.com/mmistakes/jekyll-theme-basically-basic/zip/master to E:/Users/MICHAE~1.ROS/AppData/Local/Temp/jekyll-remote-theme-20171020-27928-1x22e5m.zip
      Remote Theme: Unzipping E:/Users/MICHAE~1.ROS/AppData/Local/Temp/jekyll-remote-theme-20171020-27928-1x22e5m.zip to E:/Users/MICHAE~1.ROS/AppData/Local/Temp/jekyll-remote-theme-20171020-27928-4jguu7
jekyll 3.6.1 | Error:  No such file or directory - unzip

Will report back the experience on mac OS when I get a chance to test it.

Is there any support for offline working

Is your feature request related to a problem? Please describe the problem you're trying to solve.

I want to dev a Jekyll site that use a remote theme but will be travelling so there's goingto be no connnectivity

Is it possible?

Describe the solution you'd like

Some sort of caching?

Describe alternatives you've considered

hacking the project to use a local copy

Additional context

Thanks

Support specifying a URL for the remote theme

Is your feature request related to a problem? Please describe the problem you're trying to solve.

I would like to speed up my development builds. Every time I start jekyll, the remote theme must re-download.

Describe the solution you'd like

In addition to User/Repo@Ref, I think it would be nice to support a URL (http/https/file). Being able to specify a local URL (possibly a file:// protocol) would make the start-up quick.

Describe alternatives you've considered

There exist PRs (which have been closed by the bot 😕) which add caching options. This seems like it might help, but I want to be able to have the zip of theme local, and have it use that local file the first time. This would be more useful to me, as I do all of my jekyll building inside of Docker containers, and often I'm working in a new container.

Show progress as remote theme is downloaded

I'm currently trying to use this gem with jekyll serve locally to test out a website before I deploy. But I'm on a slow connection, and the theme is kind of large. I get to the line "Remote Theme: Using theme pavelkomarov/mytheme", and it seems to hang. But if I ctrl+C, I see it's your code in the midst of http requests that was interrupted. I'd have just let it go if I knew it was still working.

Give the user a status bar so we can know when a theme will finish downloading.

All temporary remote theme folders not being removed

Greetings:

I am using Jekyll 4 along with the latest version of this plugin.

When running bundle exec jekyll serve in the command line to preview my site that uses a remote theme, the build process stores the remote theme files in a temporary folder; however, it also creates a folder that is empty. Making changes to the site kicks off the build process again, which creates another empty folder. However, after I finish previewing my site, only the nonempty folder with the remote theme files is deleted; all of the empty folders remain, resulting in many orphan folders like so:

Orphaned folders

After digging into it a little bit, I found that some minor changes in the munger.rb file could fix this issue. Specifically, lines 23-27 of the munge! function:

return theme if munged?
downloader.run
configure_theme
enqueue_theme_cleanup

needs to be changed to this:

if !munged?
  downloader.run
  configure_theme
end
enqueue_theme_cleanup

and this line from the enqueue_theme_cleanup function needs to be removed:

return unless munged? && downloader.downloaded?

Those changes fixed the issue for me on my local machine, resulting in all of the temporary remote theme folders that were created to be removed. I do not know the ins-and-outs of Jekyll, nor do I know ruby, so I do not know if this change has any unintended side effects. I suppose, since the queue of folders to be cleaned up grows as changes a person makes whilst bundle exec jekyll serve is running initiates a rebuild, there will be an increase in memory used. But I assume it will be negligible.

Impossible to update remote theme to a newer version when running locally

There is no way of updating a remote theme to a newer version when running locally.

Things that did not work:

  • Specifying the exact version via tag, e.g. remote_theme: qwtel/[email protected] will still use whatever version was used on the first run (this works on GitHub Pages though)
  • Removing Gemfile, Gemfile.lock, deleting gems and re-installing

What did work:

  • Creating a new jekyll folder

Document theme requirements

There seems to be some assumptions on folder structure for the themes, but this isn't documented anywhere. Could you add some info to the readme about how the theme should be structured?

When to publish a new release?

I am expecting to resolve a potential security vulnerability on my site. It is caused by the low version of rubyzip. I hope that you can quickly publish a new release. Thanks.

#62

Theme updates not reflected on GitHub Pages

Not exactly sure what's at fault here, the plugin or some sort of caching on GitHub Pages.

I recently pushed some updates to my theme Minimal Mistakes, version 4.8.0. For whatever reason changes made to layouts like default.html aren't being applied to the pages hosted on GitHub Pages.

You can see this easily when comparing these lines in _layouts/default.html:

<!--
  Minimal Mistakes Jekyll Theme 4.8.0 by Michael Rose
  Copyright 2017 Michael Rose - mademistakes.com | @mmistakes
  Free for personal and commercial use under the MIT license
  https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE.txt
-->

Against the page source on GH Pages:

<!--
  Minimal Mistakes Jekyll Theme 4.7.0 by Michael Rose
  Copyright 2017 Michael Rose - mademistakes.com | @mmistakes
  Free for personal and commercial use under the MIT license
  https://github.com/mmistakes/minimal-mistakes/blob/master/LICENSE.txt
-->

It did the same thing when I pushed an update for version 4.7.1, but wasn't a big deal since the layouts themself didn't change. This release they did though, which is breaking a few things.

Post content and assets all updated fine with the files on master.

Thoughts?

Cannot use a remote theme on a branch with a "/" in the name

Describe the bug

When attempting to use a branch of a remote theme with a "/" in the name, Jekyll fails to generate the site. I don't have an error message right now, unfortunately.

Steps to reproduce the behavior

  1. Create a branch on any remote theme, and ensure "/" is in the branch name.
  2. Add remote_theme: user/themename@the/branch/name to your site's _config.yml
  3. Generate the site

Expected behavior

The site should be generated normally.

Additional context

Work around this problem by not including slashes in branch names.

Error: Peer certificate cannot be authenticated with given CA certificates

I'm going to go ahead and assume this is an upstream issue with cURL or libcurl on Windows, but figured I'd flag this here in case it's not.

I ran into this doing a test build on a Windows 7 64bit box.

Steps to reproduce on Windows.

  1. Clone this repo
  2. bundle install
  3. bundle exec jekyll build

Here's the verbose output:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

E:\Users\Michael.Rose\Documents\Repositories\mm-remote-theme-test>bundle exec jekyll build --verbose
  Logging at level: debug
Configuration file: E:/Users/Michael.Rose/Documents/Repositories/mm-remote-theme-test/_config.yml
      GitHub Pages: github-pages v168
      GitHub Pages: jekyll v3.6.2
         Requiring: jekyll-seo-tag
         Requiring: jekyll-github-metadata
Dotenv not found. Skipping
         Requiring: jekyll-paginate
         Requiring: jekyll-sitemap
         Requiring: jekyll-gist
         Requiring: jekyll-feed
         Requiring: jemoji
         Requiring: jekyll-remote-theme
         Requiring: jekyll-coffeescript
         Requiring: jekyll-github-metadata
         Requiring: jekyll-relative-links
         Requiring: jekyll-optional-front-matter
         Requiring: jekyll-readme-index
         Requiring: jekyll-default-layout
         Requiring: jekyll-titles-from-headings
         Requiring: kramdown
   GitHub Metadata: Initializing...
            Source: E:/Users/Michael.Rose/Documents/Repositories/mm-remote-theme-test
       Destination: E:/Users/Michael.Rose/Documents/Repositories/mm-remote-theme-test/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
      Remote Theme: Using theme mmistakes/minimal-mistakes
      Remote Theme: Downloading https://codeload.github.com/mmistakes/minimal-mistakes/zip/master to E:/Users/MICHAE~1.ROS/AppData/Local/Temp/jekyll-remote-theme-20171109-11884-1vg93xx.zip
ETHON: Libcurl initialized
Hostname was NOT found in DNS cache
Adding handle: conn: 0x3bfa2a0
Adding handle: send: 0
Adding handle: recv: 0
Curl_addHandleToPipeline: length: 1
- Conn 0 (0x3bfa2a0) send_pipe: 1, recv_pipe: 0
  Trying 192.30.253.120...
Connected to codeload.github.com (192.30.253.120) port 443 (#0)
SSLv3, TLS Unknown, Unknown (22):
▬♥☺☻ SSLv3, TLS handshake, Client hello (1):
☺ ☺�♥♥�r↓L]6с�g�♂�a�¶��♫�h♥↑�ϰ~ ^♂N       ��0�,�(�$�¶�
�♥ � � � k j i h 9 8 7 6 � � � ��2�.�*�&�☼�♣ � = 5 ��/�+�'�#�‼�  � � � � g @ ? > 3 2 1 0 � � � � E D C B�1�-�)�%�♫�♦ � < / � A �◄��♀�☻ ♣ ♦�↕ ▬ ‼ ►
 �☺ ☺'   ↑ ▬  ‼codeload.github.com ♂ ♦♥ ☺☻
 ♂ ♀     ∟ ← ↑ → ▬ ♫
   ▲♠☺♠☻♠♥♣☺♣☻♣♥♦☺♦☻♦♥♥☺♥☻♥♥☻☺☻☻☻♥ ☼ ☺☺ § �
                    SSLv2, Unknown (22):
▬♥♥ ]SSLv3, TLS handshake, Server hello (2):
☻  Y♥♥¶%1�☼drh�xm[[��→K��\!♀⌂�↔�6~(^� �C8��:1♥D��r��**%|~2(גUe�ȻF6���/  ◄�☺ ☺      ♂ ♦♥ ☺☻SSLv2, Unknown (22):
▬♥♥♀‼SSLv3, TLS handshake, CERT (11):
☺☺♂♣ 0p1♂0      ♠♥U♦♠‼☻US1§0‼♠♥U♦
200417120000Z0h1♂0      ♠♥U♦♠‼☻US1‼0◄♠♥‼♦1/0-♠♥U♦♥‼&DigiCert SHA2 High Assurance Server CA0▲↨
San Francisco1§0‼♠♥U♦
☺☺☺♣ ♥�☺☼ 0�☺.1§0‼♠♥U♦♥♀♀*.github.com0�☺"0
☻�☺☺ ���0I-�↕�♀♀��px~♣k���U6�i�♦_���NR�HC§T�
��kφ��>↓�]މ�e☻♥☺ ☺��♥�0�♥�0▼♠♥U↔#♦↑0▬�¶Qh���☻u<��edb�↕�Yr;0↔♠♥U↔♫♦▬♦¶�aR���¶t�姮��,�l��������←��|2�<��▼F�����g+§�ʏp*\�j� JCa}Z♦♀��"�w�6o% ♦>/�☻fx↔��`�`
@�� �07$��lj�0#♠♥U↔◄♦∟0→�♀*.github.com�
github.com0♫♠♥U↔☼☺☺�♦♦♥☻♣�0↔♠♥U↔%♦▬0+♠☺♣♣♥☺+♠☺♣♣♥☻0u♠♥U↔▼♦n0l04�2�0�.http://crl3.digicert.com/sha2-ha-server-g5.crl04�2�0�.http://crl4.digicert.com/sha2-ha-server-g5.crl0L♠♥U↔ ♦E0C07♠ `�H☺��l☺☺0*0(+♠☺♣♣☻☺▬∟https://www.digicert.com/CPS♠♠g�♀☺☻☻0��+♠☺♣♣☺☺♦w0u0$+♠☺♣♣0☺�↑http://ocsp.digicert.com0M+♠☺♣♣0☻�Ahttp://cacerts.digicert.com/DigiCertSHA2HighAssuranceServerCA.crt0♀♠♥U↔‼☺☺�♦☻0 0�☺�♠
+♠☺♦☺�y☻♦☻♦�☺�♦�☺�☺� u ��       ��↑X¶��‼��gp
�►  ☺Y��>K  ♦♥ F0D☻ ▲�♫�ѵSGV�)>��A]4♠�����27��w�♠B☻ ♥�▲*(��g◄:→�4>��§V��H�L�↕�B↑X� v V¶♠�/������D�>�Fv���◄\�U։��  ☺Y��?∟  ♦♥ G0E☻ $�i��(��-|����Eʊǂ�]�� ,T∟�ھ←�☻! �%���e�ܠ�b���♥%�K-~I�1W��V�.�W u �K��u�`��Bi▼��f�☼~_�r؃ �{�z���  ☺Y��@.  ♦♥ F0D☻ r��♫Ho3D↑��6f�p�ܹD�▲��&�4x&\���☻ F↑��iՔn;�Z [ՙđ��_�Ͷ♠��Xߢ$� v ��߼▼�q���#���{G8W�
☺☺♂♣ 0l1♂0      ♠♥U♦♠‼☻US1§0‼♠♥U♦_FD¥���V⌂6߬��n�4Y�¶��◄����!}y&(R��+���Du)∟�,��♥♫����ϵ����*���OY��͚☼����3�1n�x(�˕⌂)� ♦�0�♦�0�♥��♥☻☺☻☻►♦���\��m�+B�]§�0
281022120000Z0p1♂0      ♠♥U♦♠‼☻US1§0‼♠♥U♦1+0)♠♥U♦♥‼"DigiCert High Assurance EV Root CA0▲↨
☺☺☺♣ ♥�☺☼ 0�☺c1↓0↨♠♥U♦♂‼►www.digicert.com1/0-♠♥U♦♥‼&DigiCert SHA2 High Assurance Server CA0�☺"0
☻�☺☺ ��/�$♠�m♦_��
x�{�^q�J���▬▬��#↕M��u����↨�▲D5e⌂S%9�∟�♂@���;r�¶�◄���ȸC:�♂♂�Օ�@��↔�M�_W��Ph������♣▼���ܤ���-ƭ���↓���☼^DX*7��5�'2Z������Q�'��;B3�♣(Ļ(̚�+#
�c←↓�th
7��RH�9Z���]�ݠ �!��&o¶J!A��m��H/�♥��h�S/^�☻♥☺ ☺��☺I0�☺E0↕♠♥U↔‼☺☺�0♠☺☺�☻☺ 0♫♠♥U↔☼☺☺�♦♦♥☻☺�0↔♠♥U↔%♦▬0+♠☺♣♣♥+♠☺♣♣♥☻0+♠☺♣♣☺☺♦(0&0$+♠☺♣♣0☺�↑http://ocsp.digicert.com0K♠♥U↔▼♦D0B0@�>�<�:http://crl4.digicert.com/Di☺☺♂♣ ♥�☺☺ ↑���♥�m�\�↔h�J���Q/�kD▬��c��nl�����q�[�4N��y�)�-�j� �y��♥G‼����Yq}�♦�k�YX=��1%\↑8��柂��[�1N�x�→���I��'��r�>��A♂��6��∟nGI⌂^�H|♥���I��&B@�֒◄�d�0
WT��↔�☻^k��Ā�↕r�V����0�♠0�♂⌂N�W♣�$��+��u��-▬�}y'���♂ꪅ�☺� (AYC(ҁ���{;w�@b�♣AE☺�↨♠>��3�g�a.r��i�↕ W@▲p�▲ɴSSLv2, Unknown (21):
§♥♥ ☻SSLv3, TLS alert, Server hello (2):
☻0SSL certificate problem: unable to get local issuer certificate
Closing connection 0
SSLv2, Unknown (21):
§♥♥ ☻SSLv3, TLS alert, Client hello (1):
☺ ETHON: performed EASY effective_url=https://codeload.github.com/mmistakes/minimal-mistakes/zip/master response_code=0 return_code=ssl_cacert total_time=2.589
jekyll 3.6.2 | Error:  Peer certificate cannot be authenticated with given CA certificates

From the looks of it its a CA certificate issue. I've tried everything I could find related to libcurl and SSL certs and none of them seemed to work.

Refs: http://blog.cloud-mes.com/2014/08/19/how-to-install-gem-curb-in-windows/, taf2/curb#37, taf2/curb#183

I've notice similar issues with Typhoeus/libcurl when trying to get html-proofer up and running. That gem seems to be unaffected by this so not entirely sure what the issue is, other than Windows being notoriously hard to get libcurl installed properly.

Feature: Include _data from theme in sites that use the theme

Not being able to have the _data/ collections in a remote theme be accessible to sites that use the theme is problematic.

There are useful collections that one might consider putting in a remote theme and using across many repositories (the owasp foundation website https://owasp.org is a collection of repositories making up one website). Such data might include a default menu system for all sites that resides in the header or a default set of corporate supporters to display in a footer.

I propose that any collection that exists in a _data folder in the remote theme be accessible via sites that use the theme. Further, in case of name collisions, if the site implementing the remote theme uses a data collection of the same name then the remote theme's version of the collection is replaced by the site's version. This functionality is available in a ruby gem for gem themes and would be useful here.

Currently the alternative to this is to put data in a separate folder in a json file and load the json file via javascript in the remote theme. This workaround assumes the use of javascript and we would like to avoid requiring js.

Gitlab repo support

Is your feature request related to a problem? Please describe the problem you're trying to solve.

Allow users to use a gitlab hosted remote theme

Describe alternatives you've considered

created a connection between Github and GitLab repo and working directly on gitlab repo and the changes are automatically synced on Github repo.

GitHub Pages Dependencies Missing

Hi,

I'm trying to use the GitHub Pages gem to preview my Jekyll site locally. Jekyll Remote Theme is listed as a dependency of the gem. Whenever I try to build my site, I get the following error:

Dependency Error: Yikes! It looks like you don't have jekyll-remote-theme or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'Could not open library 'libcurl': The specified module could not be found. . Could not open library 'libcurl.dll': The specified module could not be found. . Could not open library 'libcurl.so.4': The specified module could not be found. . Could not open library 'libcurl.so.4.dll': The specified module could not be found. ' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!

I'm using Git Bash on Windows 10. I've tried manually listing this plugin in my Gemfile. I've also ran gem install jekyll-remote-theme, neither of which helped. I'm not sure if this is an issue with my system or with the gem, so assistance would be appreciated.

Document the impact of jekyll-remote-theme more clearly

Is your feature request related to a problem? Please describe the problem you're trying to solve.

I am new to Jekyll and using jekyll-remote-theme currently with the excellent Minimal Mistakes theme. But - while following instructions - I am confused about the actual impact of having a remote theme.

What does it do? Do I get automatic updates when the upstream theme changes? How about the customizations I made to it.. will they be overwritten. I cloned the Minimal Mistakes repo, so do I actually need remote theme? Can I leave out a bunch of files in the cloned repo when having it?

Describe the solution you'd like

It seems the only way to answer the questions above is to go through the code and figure out what it does exactly.

Would be great if the README gave a clear description of this instead, saving lots of time for me and other potential users of your project.

Allow non-github remote themes to be specified

It is nice to be able to specify a custom theme without having to add a git subrepo or similar, but not all of my projects can or want to have their themes hosted on Github.

It would be great to specify a git or http url (e.g. git://gitlab.example.com/user/mytheme).

Right now it is necessary for me to either embed the theme in my project, add it as a subrepo or add complexity to my build process by downloading the theme during build time.

Thanks for creating this very useful addon and thanks for considering this request :)

Pages are not included from the remote theme

This might not be a bug but I couldn't figure out how to include some pages from remote theme.

aksakalli/jekyll-doc-theme#37

Steps to reproduce the behavior

  1. Use remote_theme: aksakalli/jekyll-doc-theme@gh-pages
  2. Some pages like allposts.html are not included from the remote theme.

How can I include such default remote theme pages?

The local "jekyll serve" seizes with v0.3.1 but "jekyll build" is okay

We have been happily using jekyll-remote-theme v0.2 version. Then recently upgraded all dependencies, which included moving to v0.3.1 version.

Now the 'jekyll build' is okay. Also the local 'jekyll serve' starts okay, and it renders all pages okay.

This is the relevant part of the startup:

      Generating... 
Invalid theme folder: _sass
      Remote Theme: Using theme balancingrock/classic-jekyll-theme
                    done in 11.365 seconds.
 Auto-regeneration: enabled for '/Users/me/Documents/git/github/folio/folio-org'
    Server address: http://127.0.0.1:5000/
  Server running... press ctrl-c to stop.

(Do not know what the Invalid theme folder: _sass is about, but the site seems to work fine.)

However when we edit a page, then this happens:

      Regenerating: 1 file(s) changed at 2018-06-12 17:05:45
                    index.md
Invalid theme folder: _sass
      Remote Theme: Using theme balancingrock/classic-jekyll-theme
             Error: The classic-jekyll-theme theme could not be found.
             Error: Run jekyll build --trace for more information.

The changes are not rendered. Edit another page, the same set of messages.

Now while the local jekyll server is still running, we can still do 'bundle exec jekyll build' in another shell window, and those edited pages are properly rendered into the _site directory. So the theme files cannot be actually missing.

Now when Ctrl-C the jekyll server, then this happens:

.../vendor/bundle/ruby/2.4.0/gems/jekyll-remote-theme-0.3.1/lib/jekyll-remote-theme/munger.rb:61:
in `block in enqueue_theme_cleanup': unexpected return (LocalJumpError)

Using jekyll-3.8.3

Downgraded to jekyll-remote-theme v0.2.4 and all is well.

Github Enterprise Support

Currently, all the themes can only be downloaded from a public github. It works great except in the case of enterprise GitHub...would it be possible to use the github.hostname provided by jekyll-github-metadata to resolve the HOST there?

Theme updates not propagating to other GitHub Pages

So, I've been experimenting with the idea of keeping public resources and documents in public repos and using GitHub Pages to make them more accessible. I created a new theme repo to contain the formatting info and refer to the theme on the content repositories, but updates to the theme repo don't seem to be reflected on the other ones. The theme seems to be captured only when an update is made to the content repo. Is that expected or is there something else that I need to do in order to have it auto-update?

The theme repo doesn't really have releases, so I was hoping to just point it to the HEAD of the master branch to have it auto-update from that.

Unable to use plugins from remote theme

Describe the bug

We have a few custom tag plugins in the _plugins folder in a remote theme. Using the theme in another repository makes jekyll build fail as the plugins aren't found:

Liquid Exception: Liquid syntax error (line 2): Unknown tag 'icon' in payments/index.md
bundler: failed to load command: jekyll (/Users/aul/gems/bin/jekyll)
Liquid::SyntaxError: Liquid syntax error (line 2): Unknown tag 'icon'
  /Users/aul/gems/gems/liquid-4.0.3/lib/liquid/document.rb:23:in `unknown_tag'
  /Users/aul/gems/gems/liquid-4.0.3/lib/liquid/document.rb:11:in `block in parse'
  /Users/aul/gems/gems/liquid-4.0.3/lib/liquid/block_body.rb:32:in `parse'
  /Users/aul/gems/gems/liquid-4.0.3/lib/liquid/document.rb:10:in `parse'
  /Users/aul/gems/gems/liquid-4.0.3/lib/liquid/document.rb:5:in `parse'
  /Users/aul/gems/gems/liquid-4.0.3/lib/liquid/template.rb:132:in `parse'
  /Users/aul/gems/gems/liquid-4.0.3/lib/liquid/template.rb:116:in `parse'
  /Users/aul/gems/gems/jekyll-4.0.0/lib/jekyll/liquid_renderer/file.rb:13:in `block in parse'
  /Users/aul/gems/gems/jekyll-4.0.0/lib/jekyll/liquid_renderer/file.rb:60:in `measure_time'
  /Users/aul/gems/gems/jekyll-4.0.0/lib/jekyll/liquid_renderer/file.rb:12:in `parse'
  /Users/aul/gems/gems/jekyll-4.0.0/lib/jekyll/renderer.rb:122:in `render_liquid'
  /Users/aul/gems/gems/jekyll-4.0.0/lib/jekyll/renderer.rb:80:in `render_document'
  /Users/aul/gems/gems/jekyll-4.0.0/lib/jekyll/renderer.rb:63:in `run'
  /Users/aul/gems/gems/jekyll-4.0.0/lib/jekyll/site.rb:523:in `render_regenerated'
  /Users/aul/gems/gems/jekyll-4.0.0/lib/jekyll/site.rb:516:in `block in render_pages'
  /Users/aul/gems/gems/jekyll-4.0.0/lib/jekyll/site.rb:515:in `each'
  /Users/aul/gems/gems/jekyll-4.0.0/lib/jekyll/site.rb:515:in `render_pages'
  /Users/aul/gems/gems/jekyll-4.0.0/lib/jekyll/site.rb:202:in `render'
  /Users/aul/gems/gems/jekyll-4.0.0/lib/jekyll/site.rb:76:in `process'
  /Users/aul/gems/gems/jekyll-4.0.0/lib/jekyll/command.rb:28:in `process_site'
  /Users/aul/gems/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:65:in `build'
  /Users/aul/gems/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:36:in `process'
  /Users/aul/gems/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `block in process_with_graceful_fail'
  /Users/aul/gems/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `each'
  /Users/aul/gems/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `process_with_graceful_fail'
  /Users/aul/gems/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
  /Users/aul/gems/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
  /Users/aul/gems/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
  /Users/aul/gems/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
  /Users/aul/gems/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
  /Users/aul/gems/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
  /Users/aul/gems/gems/jekyll-4.0.0/exe/jekyll:15:in `<top (required)>'
  /Users/aul/gems/bin/jekyll:23:in `load'
  /Users/aul/gems/bin/jekyll:23:in `<top (required)>'

Steps to reproduce the behavior

  1. Clone this repository
  2. git checkout feature/dx-803_docker
  3. bundle exec jekyll build
  4. See error

Expected behavior

I expect plugins within the _plugins folder of a remote theme to work in Jekyll sites using said remote theme.

Additional context

$ bundle list
Gems included by the bundle:
  * activesupport (6.0.2.1)
  * addressable (2.7.0)
  * colorator (1.1.0)
  * concurrent-ruby (1.1.6)
  * em-websocket (0.5.1)
  * eventmachine (1.2.7)
  * faraday (0.17.3)
  * fastimage (1.8.1)
  * ffi (1.12.2)
  * forwardable-extended (2.6.0)
  * gemoji (3.0.1)
  * hike (1.2.3)
  * html-pipeline (2.12.3)
  * http_parser.rb (0.6.0)
  * i18n (1.8.2)
  * jekyll (4.0.0)
  * jekyll-assets (1.0.0)
  * jekyll-github-metadata (2.13.0)
  * jekyll-remote-theme (0.4.2)
  * jekyll-sass-converter (2.1.0)
  * jekyll-watch (2.2.1)
  * jemoji (0.12.0)
  * kramdown (2.1.0)
  * kramdown-parser-gfm (1.1.0)
  * liquid (4.0.3)
  * listen (3.2.1)
  * mercenary (0.3.6)
  * mini_magick (4.10.1)
  * mini_portile2 (2.4.0)
  * minitest (5.14.0)
  * multi_json (1.14.1)
  * multipart-post (2.1.1)
  * nokogiri (1.10.9)
  * octokit (4.17.0)
  * pathutil (0.16.2)
  * public_suffix (4.0.3)
  * rack (1.6.13)
  * rb-fsevent (0.10.3)
  * rb-inotify (0.10.1)
  * rouge (3.17.0)
  * rubyzip (2.3.0)
  * safe_yaml (1.0.5)
  * sass (3.7.4)
  * sass-listen (4.0.0)
  * sassc (2.2.1)
  * sawyer (0.8.2)
  * sprockets (2.12.5)
  * sprockets-helpers (1.2.1)
  * sprockets-sass (1.3.1)
  * terminal-table (1.8.0)
  * thread_safe (0.3.6)
  * tilt (1.4.1)
  * tzinfo (1.2.6)
  * unicode-display_width (1.7.0)
  * zeitwerk (2.3.0)

Custom CSS not being applied

I'm using jekyll-remote-theme to load the Alembic theme on a GitHub Pages website. Within <project>/assets/css/style.scss I have @import "custom" ;. When I run bundle exec jekyll serve, the CSS which I have specified in <project>/_sass/_custom.scss is automatically loaded to <project>/_site/assets/css/style.css. But that stylesheet is not applied. Only <project>/_site/assets/styles.css is applied, as far as I can tell. How can I get the other CSS file to be applied to the site? I suppose I could put a stylesheet link into every individual page, but I'd rather not do something so awkward.

Not working with Jekyll 4.0.0

I've added jekyll-remote-theme as a plugin in my site's _config.yml. I've set remote_theme: pavelkomarov/hyde. If I push up to github pages, it works fine. If I jekyll serve --verbose --trace locally, the theme downloads, unzips, and then fails with this error message about a missing method.

undefined method `configure_sass'; for #<Jekyll::RemoteTheme::Theme:0x...> NoMethodError

There is another thread about this (#60), and you answered it was a work in progress, and then it looks from the discussion like it was solved. But I'm on jekyll-remote-theme-0.4.1, and it's not solved. Is this actually a Jekyll issue? Whatever the case it's making development with a remote theme really inconvenient. I don't want to have to completely deploy to see what my changes look like.

Shortcomings of automatically requiring theme-dependencies

Unlike automatically requiring runtime-dependencies of a theme-gem, porting the behavior over to remote-themes have the following shortcomings when the plugin is used outside GitHub Pages (locally or virtual container):

  • The remote-theme dependencies are computed separately from the current bundle context.
    • bundle install doesn't install the remote-theme dependencies.
    • bundle exec jekyll build won't be able to require gem_name unless gem_name was already available in the current bundle context.
  • The remote-theme dependencies are not versioned. Therefore, even if the remote-theme's physical gemspec locks a dependency to a certain version-range, jekyll-remote-theme (via jekyll build) would instead load whatever is the latest version of the dependency installed in the user's environment.

Site using remote_theme with sass_dir set doesn’t build

Describe the bug

As far as I can tell it is not possible to build a site which uses a remote theme which uses @import to load sass that is not in the default location. I’ve set sass.sass_dir in the site to the same setting as the theme. The theme builds fine, but the site using it doesn’t. Pretty weird use-case here but this behaviour seems confusing so I thought I’d ask in case there’s a fix.

Steps to reproduce the behaviour

  1. Clone https://github.com/mrmanc/remote-theme-sass-test
  2. Run bundle install && bundle exec jekyll build
  3. Theme builds okay
  4. Clone https://github.com/mrmanc/remote-theme-sass-test-site which uses theme via remote_theme
  5. Run bundle install && bundle exec jekyll build
  6. Get below error:
Configuration file: /Users/mark.crossfield/Documents/workspace/remote-theme-sass-test-site/_config.yml
            Source: /Users/mark.crossfield/Documents/workspace/remote-theme-sass-test-site
       Destination: /Users/mark.crossfield/Documents/workspace/remote-theme-sass-test-site/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
      Remote Theme: Using theme mrmanc/remote-theme-sass-test
  Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/main.scss':
                    File to import not found or unreadable: theme. Load path: /Users/mark.crossfield/.gem/ruby/2.5.3/gems/jekyll-theme-primer-0.5.3/_sass on line 1
jekyll 3.7.4 | Error:  File to import not found or unreadable: theme.
Load path: /Users/mark.crossfield/.gem/ruby/2.5.3/gems/jekyll-theme-primer-0.5.3/_sass on line 1

Expected behaviour

The repo should build, as the remote theme builds okay.

`configure_theme': undefined method `configure_sass' (NoMethodError)

Describe the bug

Can't build or serve with jekyll-remote-theme due to a NoMethodError.

Steps to reproduce the behavior

  1. Generate a new Jekyll site
  2. Add jekyll-remote-theme under plugins in _config.yml
  3. Add gem "jekyll-remote-theme", github: "benbalter/jekyll-remote-theme", branch: "master" in Gemfile (refer to #58 if needed)
  4. Run bundle install
  5. Add a remote_theme in _config.yml, for instance pmpinto/jekyll-mero
  6. Run bundle exec jekyll serve --trace

Expected behavior

I expected the site to build with the mentioned theme.

Screenshots

Trace
$ bundle exec jekyll build --trace
Configuration file: /Users/pmpinto/Git/my-awesome-site/_config.yml
            Source: /Users/pmpinto/Git/my-awesome-site
       Destination: /Users/pmpinto/Git/my-awesome-site/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
      Remote Theme: Using theme pmpinto/jekyll-mero
/Users/pmpinto/.rvm/gems/ruby-2.4.0/bundler/gems/jekyll-remote-theme-bb9eecf879c0/lib/jekyll-remote-theme/munger.rb:55:in `configure_theme': undefined method `configure_sass' for # (NoMethodError)
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/bundler/gems/jekyll-remote-theme-bb9eecf879c0/lib/jekyll-remote-theme/munger.rb:26:in `munge!'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/bundler/gems/jekyll-remote-theme-bb9eecf879c0/lib/jekyll-remote-theme.rb:27:in `init'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/bundler/gems/jekyll-remote-theme-bb9eecf879c0/lib/jekyll-remote-theme.rb:33:in `block in '
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/hooks.rb:102:in `block in trigger'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/hooks.rb:101:in `each'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/hooks.rb:101:in `trigger'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:114:in `reset'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/site.rb:73:in `process'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:28:in `process_site'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:65:in `build'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:36:in `process'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `block in process_with_graceful_fail'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `each'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/command.rb:89:in `process_with_graceful_fail'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/gems/jekyll-4.0.0/exe/jekyll:15:in `'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/bin/jekyll:23:in `load'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/bin/jekyll:23:in `'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:24:in `eval'
	from /Users/pmpinto/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:24:in `'  

Use regex to parse Gemspec and require any whitelisted dependencies

via #1 (comment):

how are theme dependencies handled?

Right now, they're not. Since we're allowing any user-supplied theme, we have to treat the theme as untrusted, arbitrary user input. In order to determine dependencies, we'd have to parse/eval the Gemspec, which could lead to arbitrary code execution.

In a subsequent version, we could theoretically use e.g., regex to determine dependencies, and auto require any whitelisted dependency. We likely won't be able to support arbitrary plugins given our current setup.

For now, you'll have to add the dependencies to the config file.

Theme could not be found

Describe the bug

I can see that the theme is downloaded but afterwards the theme cant be found. I get following info when running bundle exec jekyll serve with --verbose flag:

...:/mnt/m/dev/homepage/mflisar.github.io$ bundle exec jekyll serve --verbose
	  Logging at level: debug
	Configuration file: /mnt/m/dev/homepage/mflisar.github.io/_config.yml
	  Logging at level: debug
		  Remote Theme: Using theme benbalter/retlab
		  Remote Theme: Downloading https://codeload.github.com/benbalter/retlab/zip/master to /tmp/jekyll-remote-theme-20181003-23851-jfp81i.zip
		  Remote Theme: Unzipping /tmp/jekyll-remote-theme-20181003-23851-jfp81i.zip to /tmp/jekyll-remote-theme-20181003-23851-xjr5zg
			 Requiring: github-pages
			 Requiring: jekyll-avatar
			 Requiring: jekyll-feed
			 Requiring: jekyll-github-metadata
	Dotenv not found. Skipping
			 Requiring: jekyll-seo-tag
		  GitHub Pages: github-pages v192
		  GitHub Pages: jekyll v3.7.4
	jekyll 3.7.4 | Error:  The retlab theme could not be found.
	/mnt/m/dev/homepage/mflisar.github.io/vendor/bundle/ruby/2.3.0/gems/jekyll-remote-theme-0.3.1/lib/jekyll-remote-theme/munger.rb:61:in `block in enqueue_theme_cleanup': unexpected return (LocalJumpError)

Additional context

I'm using windows bash with bundle, not sure if this makes a difference? Any ideas why the downloaded theme can't be found?

Directory?

Is there a directory for these remote themes?

I can only find the official ones.

Feature request: Caching mechanism for remote theme

I am not sure if this gem already has this feature or not, but with the current implementation, it takes a lot of time to build a website by downloading the entire theme. It would be great if we have some caching mechanism such that building the jekyll site using remote theme speeds up.

add support for version wildcards?

Is your feature request related to a problem? Please describe the problem you're trying to solve.

We have a theme for academic courses that we update minorly during a semester and majorly after a semester, and we'd like to lock courses to specific major releases, while still allowing them to get minor updates. (The courses' websites remain online after semester's ends as archives, so locking them to specific major releases ensures they don't accidentally get rebuilt and suddenly look like the newest semester.)

This is easy to do via a gem and Gemfile, but GitHub Pages does require that we make it available to teachers as a remote theme instead.

While we can lock a website to a specific tag or branch, that's not quite as versatile as locking it to a specific major release (implemented as a GitHub tag).

Describe the solution you'd like

No strong feelings, but perhaps the below, a la Bundler?

  • remote_theme: foo/bar, ~> 2.0.3
  • remote_theme: foo/bar, ~> 2.1
  • remote_theme: foo/bar, ~> 2.2.beta

Or, perhaps more simply?

Describe alternatives you've considered

We could version our theme as x.y.z, and then continually re-release "virtual" versions on GitHub, whereby we point x.y to the latest x.y.z and x to the latest x.y, but that feels a bit like reinventing this wheel!

Additional context

Thank you for considering!

Feature: Theme with default 404 page

In order to display a default 404 page, the 404 page cannot reside in the remote theme; it has to be in every repository that uses the theme. For sites like https://owasp.org that use multiple repositories for a single cohesive website, this is less than ideal.

It would be nice if the 404.html or 404.md file in the remote theme is used across sites that use the theme, perhaps being over-ridden if the 404 file exists in the site repository.

Error unzipping when under VPN

Hello,
it is not really a bug report, when I active VPN and I run

bundle exec jekyll serve

the theme starts to be downloaded, once done it is unzipped with the following error:

Generating... 
      Remote Theme: Using theme mmistakes/minimal-mistakes
      Remote Theme: Downloading https://codeload.github.com/mmistakes/minimal-mistakes/zip/master to /var/folders/lt/4k9qvzbx7p5b0sv501s1s3_00000gn/T/jekyll-remote-theme-20181002-21853-1o3uh7j.zip
      Remote Theme: Unzipping /var/folders/lt/4k9qvzbx7p5b0sv501s1s3_00000gn/T/jekyll-remote-theme-20181002-21853-1o3uh7j.zip to /private/var/folders/lt/4k9qvzbx7p5b0sv501s1s3_00000gn/T/jekyll-remote-theme-20181002-21853-bb0yli
jekyll 3.7.4 | Error:  Zip end of central directory signature not found

any idea why it happens? zip file currupted?

Thanks in advance.

Showing blank screen

Describe the bug

Using siteleaf with the remote_theme gem and getting the blank screen.

Steps to reproduce the behaviour

Not getting any error, here the link to repo: https://mittalyashu.github.io/jekyllsiteleaf/

I have tried it with different themes too.

Expected behavior

It should show something on the screen.

Testing feedback

Hi 👋, I created the theme Alembic. I was copied in on a thread from @DirtyF to test out this plugin. Here's what I found:

Installation

  1. Created a new site using jekyll new
  2. Followed the installation steps of this plugin (added the plugin to the jekyll_plugins group in the Gemfile)
  3. Tried serving the site with bundle exec jekyll serve, but due to my theme using jekyll-seo-tag the site failed to build. I've hit problems before with the specific {% seo %} so maybe this is more of an issue with that gem? It would be nice if it caused a warning instead?
  4. Added the jekyll-seo-tag plugin and tried again and it worked as expected 🎉

Parting notes

  • Works exactly as expected 👍
  • Issue with theme dependancies, but as seen here there are problems with catering for this
  • Should plugins error more gracefully? Open question 💬
  • The resulting site is quite blank, maybe my theme isn't working hard enough 😳

Discussion thread on the Jekyll forums if people want to chat further https://talk.jekyllrb.com/t/plugin-jekyll-remote-theme/1089/5

Support for private repos

My use case is for access to themes like the PRO (paid) version of @qwtel’s excellent Hydejack theme, wherein he supplies an ssh key to access a private repo.

In combination with platforms like Netlify, automating updates from private theme repos is very tricky. Solving this problem would seem to open up the opportunity for more seamless updates by commercial developers.

Currently, I mirror the repo locally and push it to my Gitlab repo, along with the gemspec and the necessary changes to _config.yml and Gemfile. Workable, but manual.

Windows Error: Could not open library 'libcurl.so.4.dll'

On Windows 7, I'm unable to to run Github Pages locally. Is this expected? Does jekyll-remote-theme still have a dependency on libcurl?

Config.yml

remote_theme: benbalter/retlab

plugins:
   - jekyll-feed
   - jekyll-remote-theme

Gem file

gem 'jekyll-remote-theme', github: 'benbalter/jekyll-remote-theme', branch: 'master'

group :jekyll_plugins do
  gem "jekyll-feed", "~> 0.6"
end

I run $ bundle exec jekyll serve

Configuration file: C:/Users/Daniel.Ling/source/repos/dotnetdan-github-io/_config.yml
Dependency Error: Yikes! It looks like you don't have jekyll-remote-theme or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is: 'Could not open library 'libcurl': The specified module could not be found. . Could not open library 'libcurl.dll': The specified module could not be found. . Could not open library 'libcurl.so.4': The specified module could not be found. . Could not open library 'libcurl.so.4.dll': The specified module could not be found. ' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.