Skip to content

Commit

Permalink
Add 'webrick' gem if website is being built locally
Browse files Browse the repository at this point in the history
Webrick used to be part of the Ruby standard library in version 2. It
was removed in Ruby version 3.

Jekyll lists webrick as a dependency. It does not install it by
default, however. Jekyll can be used to simply build a website and
then a different program can serve it. Webrick is only needed if
Jekyll will need to serve files. The command run in the podman
container is 'jekyll serve' and will require webrick.

As webrick is not needed if Jekyll is only building the website, the
gem statement is conditional upon an environment variable set by the
podman command.
  • Loading branch information
NitrogenPointBlue committed Nov 17, 2023
1 parent b14331e commit b4e14f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
gem 'json', '~> 2.0'
install_if -> { ENV["LOCAL_QUBES_DOCS"] == '1' } do
gem 'webrick'
end
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ clean:
$(RM) -r _site

rootless:
podman run --rm --interactive --tty --publish 4000:4000 --volume .:/srv/jekyll:Z --env JEKYLL_ROOTLESS=1 jekyll/jekyll:pages jekyll serve
podman run --rm --interactive --tty --publish 4000:4000 --volume .:/srv/jekyll:Z --env JEKYLL_ROOTLESS=1 --env LOCAL_QUBES_DOCS=1 jekyll/jekyll:pages jekyll serve

.PHONY: all clean rootless

0 comments on commit b4e14f1

Please sign in to comment.