Skip to content

Latest commit

 

History

History
 
 

docs-website

Developer website

The build process in this folder generates the developer website for Sketch, that is hosted on Netlify at developer.sketch.com.

Alternatively, the website content is contained in the sibling docs folder.

Contribute!

We've made this public so you can contribute to it. If you find a typo, or an error, or want to improve the content, feel free to send us a pull request. Also, if there's anything you'd like to see covered or documented, file an issue and we'll do it for you.

In order to make a change open a PR branching off develop. You should see a Netlify deploy preview appear in the PR, which is a convenient way to see how your changes will impact the live site.

It may take some time to see your changes live on developer.sketch.com, since production deployments only happen alongside Sketch releases.

We use Jekyll as our content backend, so make sure to read their docs if you need help understanding how the system works.

Starting a local dev server

If you want to get the site working locally to preview your changes, you'll need to have node and bundler installed. On OS X you'll also need to have Xcode's command-line tools installed (xcode-select --install).

Once you have them, to start a local dev server invoke the run script in this folder,

./run

The run script will take care of installing all the needed dependencies if they’re not installed, so it may take a while if it’s the first time you’re running it.

Once the dev server is running, making changes to website content in the sibling docs folder should trigger a live reload.

Note: you may find issues with nokogiri when running run. If that's the case, try the following:

bundle config build.nokogiri \
  --use-system-libraries \
  --with-xml2-include=/usr/include/libxml2/

If that doesn't work, check the troubleshooting tips on Nokogiri's page

Generated sections

As well as the normal Jekyll processing, there are some areas of the site where the source files are themselves generated by other tools. In particular:

  • The API documentation that is stored in docs/api
  • The reference file pages that is stored in docs/pages

Therefore take care not to waste time hand-editing this generated content, as it will just get replaced next time the scripts are run. Instead, file pull-requests to change the things that the scripts generate the content from - eg the SketchAPI repo or the repos for the example plugins (all of which are open-source).