diff --git a/content/patterns/serving.md b/content/patterns/serving.md index 883a044..42c85f0 100644 --- a/content/patterns/serving.md +++ b/content/patterns/serving.md @@ -14,4 +14,6 @@ This will serve your working library from `localhost:1313` (the exact URL will b **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/). +![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. diff --git a/package.json b/package.json index 4581b5e..4e91354 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,11 @@ "test": "echo \"Error: no test specified\" && exit 1", "serve": "hugo server", "clean": "rm -rf content && mkdir content && mkdir content/patterns && hugo new patterns/pattern.md && hugo new _index.md", - "build": "hugo", - "precommit": "npm run build" + "build": "hugo" }, + "pre-commit": [ + "build" + ], "repository": { "type": "git", "url": "git+https://github.com/Heydon/inclusive-pattern-library.git" @@ -19,5 +21,8 @@ "bugs": { "url": "https://github.com/Heydon/inclusive-pattern-library/issues" }, - "homepage": "https://github.com/Heydon/inclusive-pattern-library#readme" + "homepage": "https://github.com/Heydon/inclusive-pattern-library#readme", + "devDependencies": { + "pre-commit": "^1.2.2" + } } diff --git a/themes/infusion/static/css/styles.css b/themes/infusion/static/css/styles.css index 45982b9..57c88fe 100644 --- a/themes/infusion/static/css/styles.css +++ b/themes/infusion/static/css/styles.css @@ -44,7 +44,7 @@ img { } p img { - margin-top: 0.75rem; + margin: 0.75rem 0; } figure p img {