Swap out rbenv below for rvm if you prefer. RVM was giving me installation issues, so I found rbenv - Travis
- Create and run from a fresh VM instance:
gcloud compute instances create jekyll --image-project=ubuntu-os-cloud --image-family=ubuntu-1404-lts --machine-type=n1-standard-1gcloud compute ssh jekyll --ssh-flag="-L 4000:localhost:4000"
- Install
rbenvandruby-build. Add these to$PATH:sudo apt-get install -y git bzip2 build-essential libssl-dev libreadline-dev zlib1g-devgit clone https://github.com/rbenv/rbenv.git ~/.rbenvgit clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-buildecho 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrcecho 'eval "$(rbenv init -)"' >> ~/.bashrc. ~/.bashrc
- Install and use ruby 2.4.1
rbenv install 2.4.1rbenv global 2.4.1
- Fork and clone your forked repo:
GITHUB_USER=$USER # or something else heregit clone https://github.com/$GITHUB_USER/spinnaker.github.io.git
- Install
bundlegemcd spinnaker.github.iogem install bundlebundle install
- Start Jekyll server
bundle exec jekyll serve --watch
- (Optional): Add
--incrementalto speed up page generation when working on one pagebundle exec jekyll serve --watch --incremental
- Navigate to http://localhost:4000 to see your locally generated page.
A page named foo.md will be transformed to foo/index.html and links to foo will result in an HTTP 301
to foo/. This has two implications:
- It is more efficient to include the trailing
/in links. - If you anticipate including resources like images or subpages, create
foo/index.mdinstead offoo.md.
During local development, see what's actually generated by browsing the
_sitedirectory.
Sequence diagrams can be generated with the mermaid.js library by adding {% include mermaid %} near the bottom of the page. See some of the
security docs
for an example.
Each page has a breadcrumb trail at the top that is based on the URL structure. You should ensure that there is at
least an index.md file within each URL directory, otherwise the links will break.
Keep the "broken window theory" at bay by ensuring all links work with HTML Proofer
Run link checker before committing:
rake test
(TODO: enforce this via CI build?)