From 50c662077bc557555953dd8a817695149825b9a7 Mon Sep 17 00:00:00 2001 From: Heydon Pickering Date: Thu, 29 Jun 2017 09:19:24 +0100 Subject: [PATCH] updated hosting advice --- content/patterns/serving.md | 12 ++++++------ public/patterns/serving/index.html | 18 +++++++----------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/content/patterns/serving.md b/content/patterns/serving.md index 1066a5d..3baf7e4 100644 --- a/content/patterns/serving.md +++ b/content/patterns/serving.md @@ -12,12 +12,12 @@ This will serve your working library on `localhost:1313`. Whenever you make chan ## Publishing on Github Pages -The easiest way to host your pattern library so you have a link to share is to run the `host` command. This will build the library and push it to the local Github repository's `gh-pages` branch. +The easiest way to host your pattern library so you have a link to share is to run the `host` command. This will build the library and push it to the local Github repository's `gh-pages` branch. Before you can use `host` you will need to commit any changes you made on the master branch. Otherwise there's nothing new to push over to the `gh-pages` branch. + +{{}}git commit -am "my commit message"{{}} + +This will ensure changes go through to `gh-pages`. Now you can run: {{}}npm run host{{}} -You should now be able to find a "live" version of your library at `github.io/[your username]/[your library repo' name]`. - -{{% warning %}} -The `host` command *force* pushes the contents of the `public` folder to `gh-pages`. This is not in itself problematic since nothing is overwritten on the `master` branch. However, be aware that the command does not push your `master` branch changes to origin. You still have to commit and push any changes you've made locally. -{{% /warning %}} +You should now be able to find a "live" version of your library at `github.io/[your username]/[your library repo name]`. diff --git a/public/patterns/serving/index.html b/public/patterns/serving/index.html index a2c2d50..da19e29 100644 --- a/public/patterns/serving/index.html +++ b/public/patterns/serving/index.html @@ -192,21 +192,17 @@

Publishing on Github Pages

-

The easiest way to host your pattern library so you have a link to share is to run the host command. This will build the library and push it to the local Github repository’s gh-pages branch.

+

The easiest way to host your pattern library so you have a link to share is to run the host command. This will build the library and push it to the local Github repository’s gh-pages branch. Before you can use host you will need to commit any changes you made on the master branch:

+ +
git commit -am "my commit message"
+ + +

This will ensure changes go through to gh-pages. Now you can run:

npm run host
-

You should now be able to find a “live” version of your library at github.io/[your username]/[your library repo' name].

- - - +

You should now be able to find a “live” version of your library at github.io/[your username]/[your library repo name].