new publishing docs
This commit is contained in:
parent
e335e1d308
commit
11c1ba7096
|
@ -38,7 +38,7 @@ theme = "infusion"
|
||||||
{{</codeBlock>}}
|
{{</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_ :-)
|
* **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. More information is available in {{% pattern "Serving" %}}.
|
* **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".
|
* **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>`.
|
* **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.
|
* **codePenUser** — If you want to embed codePens in your pattern files, you need to supply a codePen username here.
|
||||||
|
|
|
@ -35,3 +35,21 @@ On the (default) master branch run:
|
||||||
{{<cmd>}}npm run host{{</cmd>}}
|
{{<cmd>}}npm run host{{</cmd>}}
|
||||||
|
|
||||||
You should now be able to find a "live" version of your library at `[your user name].github.io/[your library repo name]`.
|
You should now be able to find a "live" version of your library at `[your user name].github.io/[your library repo name]`.
|
||||||
|
|
||||||
|
+++
|
||||||
|
title = "Serving"
|
||||||
|
+++
|
||||||
|
|
||||||
|
## Serving locally
|
||||||
|
|
||||||
|
While you're creating content for your library, you'll probably want to see what the finished product looks like. Fortunately, **Infusion** is easy to serve locally using the `serve` command:
|
||||||
|
|
||||||
|
{{<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!
|
||||||
|
|
||||||
|
## 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.
|
||||||
|
|
||||||
|
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]`. See {{% pattern "Library setup" %}} for adding this URL to your `config.toml` file. If you are having trouble working out your Github Pages URL, [this tool may help](https://drastudio.github.io/url-generator/).
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
{
|
{
|
||||||
"name": "inclusive-pattern-library",
|
"name": "infusion",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "An inclusive pattern library builder for documenting inclusive interface design",
|
"description": "An inclusive pattern library builder for documenting inclusive interface design",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"getURL": "git remote -v | sed -n '/push/p' | awk '{print $2}' | sed 's/.*:\\(.*\\).git/\\1/' | awk -F\"/\" '{print $1\".github.io/\"$2}'",
|
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "echo \"Error: no test specified\" && exit 1",
|
||||||
"serve": "hugo server",
|
"serve": "hugo server",
|
||||||
"clean": "rm -rf content && mkdir content && mkdir content/patterns && hugo new patterns/pattern.md && hugo new _index.md",
|
"clean": "rm -rf content && mkdir content && mkdir content/patterns && hugo new patterns/pattern.md && hugo new _index.md",
|
||||||
"build": "hugo"
|
"build": "hugo",
|
||||||
|
"precommit": "npm run build"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user