Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ Gemfile.lock
*.iml
.jekyll-cache
.project
vendor/bundle
16 changes: 13 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ Follow these steps to set up your local copy of the repository:

1. [Fork this repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo) and clone your fork.

1. Navigate to your cloned repository.
2. Navigate to your cloned repository.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please leave the 1. numbering. Jekyll automatically translates these into numbered lists. And it's easier to reorder/add/delete items this way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted :D


##### Building with locally-installed packages

1. Install [Ruby](https://www.ruby-lang.org/en/) if you don't already have it. We recommend [RVM](https://rvm.io/), but you can use any method you prefer:

Expand All @@ -86,18 +88,26 @@ Follow these steps to set up your local copy of the repository:
ruby -v
```

1. Install [Bundler](https://bundler.io/) if you don't already have it:
2. Install [Bundler](https://bundler.io/) if you don't already have it:

```
gem install bundler
```

1. Install Jekyll and all the dependencies:
3. Install Jekyll and all the dependencies:

```
bundle install
```

##### Building with containerization

1. Assuming you have `docker-compose` installed, execute

```
docker compose -f docker-compose.dev.yml up
```

#### Troubleshooting

Try the following troubleshooting steps if you encounter an error when trying to build the documentation website:
Expand Down
8 changes: 7 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#!/usr/bin/env bash

JEKYLL_LINK_CHECKER=internal bundle exec jekyll serve --host localhost --port 4000 --incremental --livereload --open-url --trace
host="localhost"

if [[ "$DOCKER_BUILD" == "true" ]]; then
host="0.0.0.0"
fi

JEKYLL_LINK_CHECKER=internal bundle exec jekyll serve --host ${host} --port 4000 --incremental --livereload --open-url --trace
14 changes: 14 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: "3"

services:
doc_builder:
image: ruby:3.2.4
volumes:
- .:/app
working_dir: /app
ports:
- "4000:4000"
command: bash -c "bundler install && bash build.sh"
environment:
BUNDLE_PATH: /app/vendor/bundle # Avoid installing gems globally.
DOCKER_BUILD: true # Signify build.sh to bind to 0.0.0.0 for effective doc access from host.
Loading