Bläddra i källkod

serve locally from root to be clearer

Heydon Pickering 8 år sedan
förälder
incheckning
2aa170366a

+ 1 - 1
content/patterns/serving.md

@@ -8,7 +8,7 @@ While you're creating content for your library, you'll probably want to see what
 
 {{<cmd>}}npm run serve{{</cmd>}}
 
-This will serve your working library from `localhost:1313` (the exact URL will be determined by what's in your `baseURL` and will be revealed to you by your terminal). Whenever you make changes to your library's files, the site will automatically rebuild. No need to refresh the web page!
+This will serve your working library from `localhost:1313`. Whenever you make changes to your library's files, the site will automatically rebuild. No need to refresh the web page!
 
 ## Publishing on Github Pages
 

+ 2 - 1
docs/index.xml

@@ -178,7 +178,8 @@ I can reference the &amp;#x7b;{% pattern &#34;Notes &amp; warnings&#34; %}} patt
       
       <guid>https://heydon.github.io/infusion/patterns/serving/</guid>
       <description>Serving locally While you&amp;rsquo;re creating content for your library, you&amp;rsquo;ll probably want to see what the finished product looks like. Fortunately, Infusion is easy to serve locally using the serve command:
-npm run serve This will serve your working library from localhost:1313 (the exact URL will be determined by what&amp;rsquo;s in your baseURL and will be revealed to you by your terminal). Whenever you make changes to your library&amp;rsquo;s files, the site will automatically rebuild.</description>
+npm run serve This will serve your working library from localhost:1313. Whenever you make changes to your library&amp;rsquo;s files, the site will automatically rebuild. No need to refresh the web page!
+Publishing on Github Pages Infusion creates a /docs folder containing the latest version of your library whenever you do an npm run build or a git commit.</description>
     </item>
     
     <item>

+ 2 - 1
docs/patterns/index.xml

@@ -39,7 +39,8 @@ brew install hugo Alternatively, you can manually install Hugo from a package. Y
       
       <guid>https://heydon.github.io/infusion/patterns/serving/</guid>
       <description>Serving locally While you&amp;rsquo;re creating content for your library, you&amp;rsquo;ll probably want to see what the finished product looks like. Fortunately, Infusion is easy to serve locally using the serve command:
-npm run serve This will serve your working library from localhost:1313 (the exact URL will be determined by what&amp;rsquo;s in your baseURL and will be revealed to you by your terminal). Whenever you make changes to your library&amp;rsquo;s files, the site will automatically rebuild.</description>
+npm run serve This will serve your working library from localhost:1313. Whenever you make changes to your library&amp;rsquo;s files, the site will automatically rebuild. No need to refresh the web page!
+Publishing on Github Pages Infusion creates a /docs folder containing the latest version of your library whenever you do an npm run build or a git commit.</description>
     </item>
     
   </channel>

+ 1 - 1
docs/patterns/serving/index.html

@@ -317,7 +317,7 @@
 <pre class="cmd"><code>npm run serve</code></pre>
 
 
-<p>This will serve your working library from <code>localhost:1313</code> (the exact URL will be determined by what&rsquo;s in your <code>baseURL</code> and will be revealed to you by your terminal). Whenever you make changes to your library&rsquo;s files, the site will automatically rebuild. No need to refresh the web page!</p>
+<p>This will serve your working library from <code>localhost:1313</code>. Whenever you make changes to your library&rsquo;s files, the site will automatically rebuild. No need to refresh the web page!</p>
 
 <h2 id="publishing-on-github-pages">Publishing on Github Pages</h2>
 

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
docs/service-worker.js


+ 1 - 1
package.json

@@ -5,7 +5,7 @@
   "main": "index.js",
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1",
-    "serve": "hugo server",
+    "serve": "hugo server --baseURL http://localhost:1313",
     "clean": "rm -rf content && mkdir content && mkdir content/patterns && hugo new patterns/pattern.md && hugo new _index.md",
     "build": "rm -rfv docs/* && hugo && sw-precache --root=docs && git add -A"
   },

Vissa filer visades inte eftersom för många filer har ändrats