reworded library setup

This commit is contained in:
Heydon Pickering 2017-07-03 20:02:40 +01:00
parent 8e350f1711
commit 2c7dc7f7bb
2 changed files with 13 additions and 5 deletions

View File

@ -18,7 +18,7 @@ This will leave your `content` folder with just an `_index.md` file and a `patte
## The `setup` command
There's another command, `setup`, which you need to run to create an initial build and make sure git is aware of the `public` folder it generates.
There's another command, `setup`, which you need to run to create an initial build and make sure git is aware of the `/docs` folder it generates.
{{<cmd>}}npm run setup{{</cmd>}}
@ -37,8 +37,8 @@ theme = "infusion"
codePenUser = "Heydon"
{{</codeBlock>}}
* **title** — This is the library's name, like "Megacorp 5000 Pattern Library". You don't have to include the term "pattern library" if you don't want to. For **Infusion's** version of **Infusion**, the `title` is, naturally, _Infusion_ :-)
* **baseURL** — This is the root of the live site. Typically you will publish the site to Github Pages, so this should be the base URL for your Github Pages site.
* **title** — This is the library's name, like "Megacorp 5000 Pattern Library". You don't have to include the term "pattern library" if you don't want to. For **Infusion's** own version of **Infusion**, the `title` is, naturally, _Infusion_ :-)
* **baseURL** — This is the root of the live site. Typically you will publish the site to Github Pages, so this should be the base URL for your Github Pages site.
* **theme** — This is the theme the library is using. Don't change this from "infusion".
* **description** — This is a short description of the library and comes under the logo. You can include HTML like `<em>` and `<strong>`.
* **codePenUser** — If you want to embed codePens in your pattern files, you need to supply a codePen username here.

View File

@ -12,8 +12,16 @@ This will serve your working library from `localhost:1313` (the exact URL will b
## Publishing on Github Pages
**Infusion** creates a `/docs` folder containing the latest version of your library whenever you run `npm run build` or do a `git commit`. This folder can be made the source for your Github Pages site by selecting it under **Settings → Github Pages → Source** in the web interface.
**Infusion** creates a `/docs` folder containing the latest version of your library whenever you do an `npm run build` or a `git commit`. This folder can be made the source for your Github Pages site by selecting it under **Settings → Github Pages → Source** in the web interface.
![The publishing source dropdown menu on Github](/images/serve_from_docs.png)
Then, whenever you push to master, you will also be updating the site found at your Github Pages URL, in the format `[your user name].github.io/[your library repo name]`. You'll also need to add this URL to your `config.toml` file. See {{ pattern "Library setup" }} for more information.
Then, whenever you push to master, you will also be updating the site found at your Github Pages URL.
This URL will be in the following format:
```
[your user name].github.io/[your library repo name]`
```
You'll also need to add it to your `config.toml` file. See {{% pattern "Library setup" %}} for more information.