Skip to content

Commit bb8c969

Browse files
docs: use jekyll-rtd-theme from a ruby gem
1 parent 8529175 commit bb8c969

File tree

4 files changed

+22
-9
lines changed

4 files changed

+22
-9
lines changed

Diff for: Makefile

+9-7
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ CONTAINER_RUN_CMD ?= docker run -u "`id -u`:`id -g`"
1111
# Use host networking because 'jekyll serve' is stupid enough to use the
1212
# same site url than the "host" it binds to. Thus, all the links will be
1313
# broken if we'd bind to 0.0.0.0
14-
JEKYLL_VERSION := 3.8
14+
RUBY_IMAGE_VERSION := 3.1
1515
JEKYLL_ENV ?= development
16-
SITE_BUILD_CMD := $(CONTAINER_RUN_CMD) --rm -i \
16+
SITE_BUILD_CMD := $(CONTAINER_RUN_CMD) --rm -i -u "`id -u`:`id -g`" \
17+
$(shell [ -t 0 ] && echo '-t') \
1718
-e JEKYLL_ENV=$(JEKYLL_ENV) \
18-
--volume="$$PWD/docs:/srv/jekyll":Z \
19-
--volume="$$PWD/docs/vendor/bundle:/usr/local/bundle":Z \
20-
--network=host jekyll/jekyll:$(JEKYLL_VERSION)
19+
--volume="$$PWD/docs:/work" \
20+
--volume="$$PWD/docs/vendor/bundle:/usr/local/bundle" \
21+
-w /work \
22+
--network=host ruby:$(RUBY_IMAGE_VERSION)
2123
SITE_BASEURL ?=
2224
SITE_DESTDIR ?= _site
2325
JEKYLL_OPTS := -d '$(SITE_DESTDIR)' $(if $(SITE_BASEURL),-b '$(SITE_BASEURL)',)
@@ -209,11 +211,11 @@ push-debug:
209211

210212
site-build:
211213
@mkdir -p docs/vendor/bundle
212-
$(SITE_BUILD_CMD) sh -c '/usr/local/bin/bundle install && "$$BUNDLE_BIN/jekyll" build $(JEKYLL_OPTS)'
214+
$(SITE_BUILD_CMD) sh -c "bundle plugin install bundler-override && bundle install && jekyll build $(JEKYLL_OPTS)"
213215

214216
site-serve:
215217
@mkdir -p docs/vendor/bundle
216-
$(SITE_BUILD_CMD) sh -c '/usr/local/bin/bundle install && "$$BUNDLE_BIN/jekyll" serve $(JEKYLL_OPTS) -H 127.0.0.1'
218+
$(SITE_BUILD_CMD) sh -c "bundle plugin install bundler-override && bundle install && jekyll serve $(JEKYLL_OPTS) -H 127.0.0.1"
217219

218220
# Download controller-gen locally if necessary
219221
CONTROLLER_GEN = $(PROJECT_DIR)/bin/controller-gen

Diff for: docs/Gemfile

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
source "https://rubygems.org"
22

3+
# Use override plugin to drop incorrect dependency of jekyll-rtd-them on github-pages (~> 209)
4+
# The original dep would allow github-pages v209.x but not v210 or later.
5+
plugin 'bundler-override'
6+
require File.join(Bundler::Plugin.index.load_paths("bundler-override")[0], "bundler-override") rescue nil
7+
override 'jekyll-rtd-theme', :drop => "github-pages"
8+
39
# Hello! This is where you manage which Jekyll version is used to run.
410
# When you want to use a different version, change it below, save the
511
# 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?
2733
# kramdown v2 ships without the gfm parser by default. If you're using
2834
# kramdown v1, comment out this line.
2935
#gem "kramdown-parser-gfm"
36+
37+
gem "webrick", "~> 1.8"
38+
gem 'jekyll-rtd-theme', '~> 2.0', '>= 2.0.10'

Diff for: docs/Gemfile.lock

+3-1
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ GEM
155155
jekyll (>= 3.5, < 5.0)
156156
jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0)
157157
rubyzip (>= 1.3.0, < 3.0)
158+
jekyll-rtd-theme (2.0.10)
158159
jekyll-sass-converter (1.5.2)
159160
sass (~> 3.4)
160161
jekyll-seo-tag (2.6.1)
@@ -278,9 +279,10 @@ PLATFORMS
278279
DEPENDENCIES
279280
github-pages (~> 209)
280281
jekyll (~> 3.9.0)
282+
jekyll-rtd-theme (~> 2.0, >= 2.0.10)
281283
tzinfo (~> 1.2)
282284
tzinfo-data
283285
wdm (~> 0.1.1)
284286

285287
BUNDLED WITH
286-
2.0.2
288+
2.3.27

Diff for: docs/_config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ markdown: kramdown
2727
kramdown:
2828
toc_levels: 1..3
2929

30-
remote_theme: rundocs/jekyll-rtd-theme@v2.0.10
30+
theme: jekyll-rtd-theme
3131

3232
# Exclude from processing.
3333
# The following items will not be processed, by default. Create a custom list

0 commit comments

Comments
 (0)