This is the website for Savas Labs.
The site is built using Jekyll and Gulp.
- Bundler:
gem install bundler - Jekyll:
gem install jekyll - node.js and npm. For npm, you should be running at least major version 3. To update npm to the latest version, run
npm install npm@latest -g. - Gulp:
npm install -g gulp - ImageMagick:
brew install imagemagick - Proselint:
pip install proselint - Aspell:
_scripts/aspell.sh. This script will install and configure Aspell.
- Clone the repo (default branch is
source; do not use master.) - Run
git config core.hooksPath hooks. This configures git to use hooks inside thehooksdirectory instead of.git/hooks. - Run
bundle install(orbundle install --path vendor/bundleif preferred) - Run
npm installto install node modules. This takes a few minutes.
Run npm run serve to serve the site locally and watch for file
changes. Initially, or anytime you want to rebuild the _site directory, you
should run npm run serve:rebuild, which will run the local build task before
serving the site.
The serve task uses the test and dev config files for local development.
If needed, run npm install to install any modules that were added since you
last served the site.
Thanks to gulp.watch and BrowserSync, any changes you make will trigger Gulp
to either regenerate the Jekyll site and automatically refresh your browser or,
if they're changes to CSS or images, inject the updated file(s) so a refresh
isn't needed. It's pretty cool!
You can toggle some options in the gulpfile:
- In the
servetask, changeghostModetotrueif you want to mirror clicks, reloads, etc. across browsers. Useful for testing, hard on performance. - In the
servetask, changeopentofalseif you don't want BrowserSync to automatically open a browser window for you when you serve the site.
To avoid optimizing images each time the site is built, locally or in Travis,
we're committing optimized images to the _assets directory. When you add a
new image, be sure to run npm run images to optimize the new image. When
you commit an image, the pre-commit hook will remind you to do this.
Because we're using Travis to build the site and push to master, which is then
deployed by GitHub Pages, the master branch contains the generated _site
directory. The main development branch you should pull from and open pull
requests against is source.
The pre-commit hook located in the hooks directory does the following on all staged HTML and markdown files:
- Checks spelling with Aspell
- Runs markdown-lint (mdl)
- Runs proselint
To add words to the custom dictionary:
- Add the words to
savas_wordlist.txt(one word per line) - Run
_scripts/aspell.shto update the dictionary.
To ignore the tests and commit (only recommended for proselint errors):
- Run
git commit --no-verify
To run the tests:
$ bash _scripts/run-tests.sh
To ensure writing blog posts is accessible to everyone on our team, we draft blog posts in Google Docs:
- Make a copy of the Google Doc template, and create the post.
- Share the draft with reviewers. Reviewers will sign off on content and run the blog post through Grammarly.
After blog content is finalized, a developer will follow instructions in our style guide:
- Convert the Google Doc to markdown.
- Docs to Markdown drive add-on is helpful, but formatting must be confirmed manually.
- Push branch and create a PR
- Stage the post
git push origin [branch-name]:stage1pushes the branch to: https://stage1--savas-staging.netlify.com- Other options:
stage1,stage2, ...stage6
- After PR approval, merge to
sourceto publish the blog post to https://savaslabs.com/blog/
Comments are handled by a Dockerized instance of Squabble. Please refer to that repositories README for notes on usage, and to the wiki page for production deployment information.