This is a Jekyll site configured to be build and served through GitHub Pages.
Because we let GitHub Pages do the Jekyll builds the website will be updated automatically after pushing commits or merging pull requests.
- The homepage for the site is index.html.
- The guides are a Jekyll collection in the _guides folder.
- To archive (or draft) a guide move it to _archives/*/.
- Use the main file of each guide for the intro.
- Use the
sectionsfront matter to include additional content from files relative to the guide, preferably in a subfolder with the same name. Make sure to start these files with_to prevent Jekyll for outputting them as stand-alone pages. - Store guide assets in the same folder as the markdown you need it in and include them by their filename. You can also use relative paths to re-use images from other guides.
- Start links to other guides with
/and the/docsbaseurl will be prepended for you. - Start links to site assets with
/assetsand the/docsbaseurl will be prepended for you. - Use blockquotes (
>) to create callouts for important notes. - If you do a lot of edits please use a local build to preview.
-
Install Bundler:
$ gem install bundler
-
Install Jekyll using Bundler:
$ bundle install
-
Install Node.js and NPM.
-
Install front-end and development dependencies:
$ npm install
-
Run Webpack, build the local Jekyll site and watch for changes:
$ npm run dev
NOTE: Running
npm installwill overwrite the git pre-commit hook to execute npm run webpack and append the production version of js/bundle.js it produces.
- Require and use any JS libraries you need in _app/main.js.
- Import any Sass files you need in css/main.scss.
- Override Bootstrap variables in _sass/_variables.scss.
- Edit styles in _sass/_base.scss or break out to additional Sass files to keep it organized.
- Store layout assets in assets folder.
- Edit layouts in the _layouts folder.
- All layouts should inherit the default layout.
- Any meta data should be stored in the _data folder, not _config.yml.
Some content we source directly from elsewhere, e.g. the MQTT API Reference.
-
Follow the previous section to install NPM and dependencies.
-
sudo npm i --global gulp
-
Run the
pulltask:gulp pull
To source more content from elsewhere edit gulpfile.js.