Skip to content

How to create a staging site for loopback.io

Rand McKinney edited this page Oct 11, 2017 · 8 revisions

In addition to running the loopback.io site locally using Jekyll, you can create a "staging" site so others can see how a given set of changes will look. Follow these steps:

  • Fork the repo into your own personal org, e.g. https://github.com/crandmck. So the new repo will be https://github.com/<username>/loopback.io, where <username> is your GitHub username, e.g. https://github.com/crandmck/loopback.io

  • Edit _config.yml in your fork. In the very last line of this file, change:

    url: http://loopback.io/
    

    To:

    url: https://<username>.github.io/loopback.io
    

    Where <username> is your GitHub username, e.g.

    url: https://crandmck.github.io/loopback.io
    

    IMPORTANT Do not check in your change to _config.yml.

  • Go to Settings in your forked repo, e.g. https://github.com/crandmck/loopback.io/settings.-

  • Under Options > GitHub Pages for the Source setting, choose gh-pages. If you've made changes in a different branch, choose that branch instead.

Now your forked repo/branch will be published at https://<username>.github.io/loopback.io/, e.g. https://crandmck.github.io/loopback.io/

NOTE: Some links in the top-bar (and elsewhere) may not work because the staging site is not published at the root of the domain, i.e. on staging it's in the loopback.io folder not at the root.

Updating your fork

Once you've followed the above procedure, after some time has passed, you may need to update your fork with changes made since you forked.
You can do this with the git CLI or in GitHub, which is a bit easier.