Also can be used to setup a local development environment when making changes to openliberty.io
- ruby
- gem
git clone git@github.com:OpenLiberty/openliberty.io.git
cd openliberty.io
gem install jekyll bundler jekyll-feed jekyll-asciidoc coderay uglifier octopress-minify-html octokit
gem install jekyll-assets -v 2.4.0
Note: You can find these two commands in the build scripts here: https://github.com/OpenLiberty/openliberty.io/blob/6d643218e67c1cdf610931964818d431c0c248a2/scripts/build_jekyll_maven.sh#L11 https://github.com/OpenLiberty/openliberty.io/blob/6d643218e67c1cdf610931964818d431c0c248a2/scripts/build_jekyll_maven.sh#L12
In openliberty.io/src/main/content/_config.yml
set these values to false, css
, js
, minify_html
. The result should look like
assets:
compress:
css: false
js: false
env: production
minify_html: false
Run the Jekyll server locally
cd src/main/content
jekyll s --drafts --source src/main/content
The
--drafts
flag is to include the*.adoc
files in the_drafts
folder.- Go to http://localhost:4000/blog/
You can make changes to your *.adoc
. When you make changes, monitor your terminal for messages saying
Regenerating: 1 file(s) changed at 2018-03-16 12:04:56 ...done in 13.638151 seconds.
kueng@Kins-MacBook-Pro ~/work/sandboxes/openliberty.io/src/main/content (blogSpacingAltText)# jekyll s --drafts
Configuration file: /Users/kueng/work/sandboxes/openliberty.io/src/main/content/_config.yml
Source: /Users/kueng/work/sandboxes/openliberty.io/src/main/content
Destination: /Users/kueng/work/sandboxes/openliberty.io/src/main/content/_site
Incremental build: disabled. Enable with --incremental
Generating...
done in 23.506 seconds.
Auto-regeneration: enabled for '/Users/kueng/work/sandboxes/openliberty.io/src/main/content'
Server address: http://127.0.0.1:4000/
Server running... press ctrl-c to stop.
Regenerating: 1 file(s) changed at 2018-03-16 12:04:56
```