diff --git a/Makefile b/Makefile index d376aa48..c7cfa61c 100644 --- a/Makefile +++ b/Makefile @@ -11,13 +11,15 @@ CONTAINER_RUN_CMD ?= docker run -u "`id -u`:`id -g`" # Use host networking because 'jekyll serve' is stupid enough to use the # same site url than the "host" it binds to. Thus, all the links will be # broken if we'd bind to 0.0.0.0 -JEKYLL_VERSION := 3.8 +RUBY_IMAGE_VERSION := 3.1 JEKYLL_ENV ?= development -SITE_BUILD_CMD := $(CONTAINER_RUN_CMD) --rm -i \ +SITE_BUILD_CMD := $(CONTAINER_RUN_CMD) --rm -i -u "`id -u`:`id -g`" \ + $(shell [ -t 0 ] && echo '-t') \ -e JEKYLL_ENV=$(JEKYLL_ENV) \ - --volume="$$PWD/docs:/srv/jekyll":Z \ - --volume="$$PWD/docs/vendor/bundle:/usr/local/bundle":Z \ - --network=host jekyll/jekyll:$(JEKYLL_VERSION) + --volume="$$PWD/docs:/work" \ + --volume="$$PWD/docs/vendor/bundle:/usr/local/bundle" \ + -w /work \ + --network=host ruby:$(RUBY_IMAGE_VERSION) SITE_BASEURL ?= SITE_DESTDIR ?= _site JEKYLL_OPTS := -d '$(SITE_DESTDIR)' $(if $(SITE_BASEURL),-b '$(SITE_BASEURL)',) @@ -209,11 +211,11 @@ push-debug: site-build: @mkdir -p docs/vendor/bundle - $(SITE_BUILD_CMD) sh -c '/usr/local/bin/bundle install && "$$BUNDLE_BIN/jekyll" build $(JEKYLL_OPTS)' + $(SITE_BUILD_CMD) sh -c "bundle plugin install bundler-override && bundle install && jekyll build $(JEKYLL_OPTS)" site-serve: @mkdir -p docs/vendor/bundle - $(SITE_BUILD_CMD) sh -c '/usr/local/bin/bundle install && "$$BUNDLE_BIN/jekyll" serve $(JEKYLL_OPTS) -H 127.0.0.1' + $(SITE_BUILD_CMD) sh -c "bundle plugin install bundler-override && bundle install && jekyll serve $(JEKYLL_OPTS) -H 127.0.0.1" # Download controller-gen locally if necessary CONTROLLER_GEN = $(PROJECT_DIR)/bin/controller-gen diff --git a/docs/Gemfile b/docs/Gemfile index 129a2e64..a4aa8303 100644 --- a/docs/Gemfile +++ b/docs/Gemfile @@ -1,5 +1,11 @@ source "https://rubygems.org" +# Use override plugin to drop incorrect dependency of jekyll-rtd-them on github-pages (~> 209) +# The original dep would allow github-pages v209.x but not v210 or later. +plugin 'bundler-override' +require File.join(Bundler::Plugin.index.load_paths("bundler-override")[0], "bundler-override") rescue nil +override 'jekyll-rtd-theme', :drop => "github-pages" + # 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: @@ -27,3 +33,6 @@ gem "wdm", "~> 0.1.1", :install_if => Gem.win_platform? # kramdown v2 ships without the gfm parser by default. If you're using # kramdown v1, comment out this line. #gem "kramdown-parser-gfm" + +gem "webrick", "~> 1.8" +gem 'jekyll-rtd-theme', '~> 2.0', '>= 2.0.10' diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 511bce57..155ccec4 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -155,6 +155,7 @@ GEM jekyll (>= 3.5, < 5.0) jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) rubyzip (>= 1.3.0, < 3.0) + jekyll-rtd-theme (2.0.10) jekyll-sass-converter (1.5.2) sass (~> 3.4) jekyll-seo-tag (2.6.1) @@ -278,9 +279,10 @@ PLATFORMS DEPENDENCIES github-pages (~> 209) jekyll (~> 3.9.0) + jekyll-rtd-theme (~> 2.0, >= 2.0.10) tzinfo (~> 1.2) tzinfo-data wdm (~> 0.1.1) BUNDLED WITH - 2.0.2 + 2.3.27 diff --git a/docs/_config.yml b/docs/_config.yml index 18b3c7e9..f02110bf 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -27,7 +27,7 @@ markdown: kramdown kramdown: toc_levels: 1..3 -remote_theme: rundocs/jekyll-rtd-theme@v2.0.10 +theme: jekyll-rtd-theme # Exclude from processing. # The following items will not be processed, by default. Create a custom list