/dojo.io

Dojo - source for the dojo.io website

Primary LanguageTypeScriptOtherNOASSERTION

dojo.io

Build Status

This repository is the source of the dojo.io website, including the documentation, tutorials, and the blog.

Published to GitHub Pages and Dojo.io.

Quick Start to run the Dojo.io website locally

  1. npm install
  2. npm run build
  3. npm run serve
  4. open http://localhost:8888

Development

To have hexo and the docviewer rebuild when files change:

  1. npm run watch

Adding Content

Writing a Blog

Blogs are built using hexo and are located in site/source/_posts

Adding a static page

Static pages are built from markdown located in site/source. Please see site/source/tutorials for examples of static content.

Writing a Tutorial

Tutorials are located in site/source/tutorials and are similar to static pages. They use the tutorial layout (layout: tutorial) and have code content provided in the demo subdirectory that is archived during the tutorials build process (grunt tutorials).

If the finished directory of the tutorial should be built and tested as part of the CI build, it needs to be added to the list of TUTORIAL values in .travis.yml

API Documentation

API documentation is generated in each package using the intern-dev-api from @theintern/dev. A viewer application in this site loads API information from the package repos and renders it live.

Deployment

This site is built for continuous deployment via Travis-ci. This requires Travis to have write access to this repository so it can automatically deploy to the gh-pages branch.

On a Master Branch Commit:

  1. A change is checked in to the master branch
  2. Travis decrypts the deploy_key.enc file to deploy_key
  3. Travis begins a build by running grunt
  4. The build syncs the origin's gh-pages branch to a temporary directory
  5. Hexo builds against the gh-pages branch
  6. Tutorial files are packaged and added
  7. On master, travis runs grunt publish and pushes changes to gh-pages

On a Non-Master Branch Commit:

The same steps as above are followed except Travis does not decrypt the deploy_key and does not attempt to publish any changes. Automated scripts should not take any action requiring authentication to git or GitHub because credentials will not exist.

Automated Deploy to Production

Travis automatically builds and deploys the master branch to gh-pages on each push.

NOTE: pushing a commit with [skip ci] will disable the Travis build and prevent the site from updating. A maintainer can instruct Travis to manually build latest.