Workshop SDK allows building Workshop docker images using Markdown based contents. Additionally Workshop SDK allows features such as:
- Running a custom validation logic.
- Asking quizzes.
- Conducting user surveys.
When UI changes are needed, the CSS and JS assets under
gitbook/gitbook-plugin-theme-splunk
should be updated.
For JavaScript source code, we are using JavaScript Standard Style.
Running. Running npm standard
under app
directory will display lines of code
that violates the coding standard.
For text editor plugins, please read the README page from JavaScript Standard Style repository on Github.
The build the SDK, run the following command on your terminal:
make build
Once the SDK is built correctly, it can be used with doc-hub
CLI utility.
To pick up the locally built SDK, --dev
option should be used with doc-hub
utility.
Sometiemes, developers quickly want to test out changes in UI without going through the process of building a Workshop image and running it.
To start the development mode, run the following command on your terminal:
make build-dev
The development mode does the followings:
- Builds a docker image for development-mode.
- Install Gitbook using Gitbook builder image.
- Copy package.json files from
/scripts
,/app
,plugins/gitbook
, andplugins/gitbook/gitbook-plugin-theme-splunk
. - Build npm dependencies.
- Copy
/scripts/dev.js
- Create a new container using the docker image from the previous step.
- Mount files from
doc-hub-kit
as/src
. - Expose port 4000.
- Mount files from
- Copy files under
/src/scripts
,/src/app
,/src/app_sub
,/src/plugins
to/kit
. - Build JS & CSS assets for Gitbook Theme.
- Copy a sample doc from
/src/tests/test-doc
to/mount
. - Build a sample doc from
tests/test-doc
. - Create a test auth token.
- Launch App Server to serve the doc.