فهرست منبع

updated hosting advice

Heydon Pickering 8 سال پیش
والد
کامیت
50c662077b
2فایلهای تغییر یافته به همراه11 افزوده شده و 15 حذف شده
  1. 6 6
      content/patterns/serving.md
  2. 5 9
      public/patterns/serving/index.html

+ 6 - 6
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
 ## 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.
 
 
-{{<cmd>}}npm run host{{</cmd>}}
+{{<cmd>}}git commit -am "my commit message"{{</cmd>}}
+
+This will ensure changes go through to `gh-pages`. Now you can run:
 
 
-You should now be able to find a "live" version of your library at `github.io/[your username]/[your library repo' name]`.
+{{<cmd>}}npm run host{{</cmd>}}
 
 
-{{% 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]`.

+ 5 - 9
public/patterns/serving/index.html

@@ -192,21 +192,17 @@
 
 
 <h2 id="publishing-on-github-pages">Publishing on Github Pages</h2>
 <h2 id="publishing-on-github-pages">Publishing on Github Pages</h2>
 
 
-<p>The easiest way to host your pattern library so you have a link to share is to run the <code>host</code> command. This will build the library and push it to the local Github repository&rsquo;s <code>gh-pages</code> branch.</p>
+<p>The easiest way to host your pattern library so you have a link to share is to run the <code>host</code> command. This will build the library and push it to the local Github repository&rsquo;s <code>gh-pages</code> branch. Before you can use <code>host</code> you will need to commit any changes you made on the master branch:</p>
 
 
-<pre class="cmd"><code>npm run host</code></pre>
+<pre class="cmd"><code>git commit -am "my commit message"</code></pre>
 
 
 
 
-<p>You should now be able to find a &ldquo;live&rdquo; version of your library at <code>github.io/[your username]/[your library repo' name]</code>.</p>
+<p>This will ensure changes go through to <code>gh-pages</code>. Now you can run:</p>
 
 
-<aside aria-label="warning" class="note warning">
-  <div>
-    <img src="https://heydon.github.io/infusion/images/icon-warning.svg" alt="">
-    <p>The <code>host</code> command <em>force</em> pushes the contents of the <code>public</code> folder to <code>gh-pages</code>. This is not in itself problematic since nothing is overwritten on the <code>master</code> branch. However, be aware that the command does not push your <code>master</code> branch changes to origin. You still have to commit and push any changes you&rsquo;ve made locally.</p>
+<pre class="cmd"><code>npm run host</code></pre>
 
 
-  </div>
-</aside>
 
 
+<p>You should now be able to find a &ldquo;live&rdquo; version of your library at <code>github.io/[your username]/[your library repo  name]</code>.</p>
 
 
   </main>
   </main>