How to debug the docs website in local?
Build local jekyll server image
-
Uncomment the following lines in
docker-compose.yml
to build a local jekyll server image:services: jekyll: container_name: "jekyll-${PROJECT_NAME}" build: ./${ROOT_DIR}/docs volumes: - ./${ROOT_DIR}/docs:/site ports: - '4000:4000'
-
Make sure
workspace/docs/_config.yml
’s keybaseurl
is set to""
.# on `local jekyll server`, set like this: baseurl: "" url: "https://localhost"
-
Run command below to build the local jekyll server image:
$ docker-compose up --build -d
-
You know can see the docs website on
http://localhost:4000
Notices
-
Support hot-reload:
After edit and save the markdown file in
workspace/docs/
, jekyll will rebuild the website automatically. -
Once you edit
_config.yml
, you might need to RESTART the local jekyll server container to see the changes.