Skip to content

Commit

Permalink
Merge branch 'master' into gatsbyjs-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews committed Aug 23, 2017
2 parents 4522e62 + 60d25bc commit b42c8b9
Show file tree
Hide file tree
Showing 60 changed files with 1,506 additions and 263 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Websites built with Gatbsy:
* [Damir.io](http://damir.io/) [(source)](https://github.com/dvzrd/gatsby-sfiction)
* [Ruben's Blog](https://vagr9k.me/) [(source)](https://github.com/Vagr9K/Blog)
* [Kostas Bariotis' Blog](https://kostasbariotis.com/) [(source)](https://github.com/kbariotis/kostasbariotis.com)
* [Travellers.cafe](https://travellers.cafe/)

## Docs

Expand Down
2 changes: 1 addition & 1 deletion docs/blog/2017-07-19-creating-a-blog-with-gatsby/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ An important note to make at this point is that the GraphQL query takes place at

## Creating the static pages

Gatsby exposes a powerful Node API, which allows for functionality such as creating dynamic pages (blog posts!), extending the babel or webpack configs, modifying the created nodes or pages, etc. This API is exposed in the `gatsby-node.js` file in the root directory of your project--e.g. at the same level as `gatsby-config.js`. Each export found in this file will be parsed by Gatsby, as detailed in its [Node API specification][node-spec]. However, we only care about one particular API in this instance, `createPages`.
Gatsby exposes a powerful Node API, which allows for functionality such as creating dynamic pages (blog posts!), extending the babel or webpack configs, modifying the created nodes or pages, etc. This API is exposed in the `gatsby-node.js` file in the root directory of your projecte.g. at the same level as `gatsby-config.js`. Each export found in this file will be parsed by Gatsby, as detailed in its [Node API specification][node-spec]. However, we only care about one particular API in this instance, `createPages`.

```javascript
const path = require('path');
Expand Down
18 changes: 16 additions & 2 deletions docs/docs/deploy-gatsby.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ You can deploy sites on Github Pages with or without a custom domain. If you cho

### Use the NPM package `gh-pages` for deploying

First add **gh-pages** as a `devDependency` of your site and create an npm script command to **deploy** your project by running `npm install gh-pages --save-dev` or `yarn add gh-pages --dev` (if you have yarn installed).
First add **gh-pages** as a `devDependency` of your site and create an npm script to **deploy** your project by running `npm install gh-pages --save-dev` or `yarn add gh-pages --dev` (if you have yarn installed).

Then add a **deploy** command in your `package.json` file.
Then add a `deploy` script in your `package.json` file.

```
"scripts": {
Expand All @@ -41,6 +41,20 @@ module.exports = {

Now run `yarn deploy` or `npm run deploy`. Preview changes in your github page `https://username.github.io/project-name/`. You also can also find the link to your site on Github under `Settings` > `Github Pages`.

### Deploying a user/organization site

Unlike project pages, user/organization sites on Github live in a special repository dedicated to files for the site. The sites must be published from the `master` branch of the repository which means the site source files should be kept in a branch named `source` or something similar. We also don't need to prefix links like we do with project sites.

The repository for these sites requires a special name. See https://help.github.com/articles/user-organization-and-project-pages/ for documentation on naming your site's repository.

Like with project sites, add `gh-pages` as a `devDependency` and add a `deploy` script to your site's `package.json` file:

```
"scripts": {
"deploy": "gatsby build && gh-pages -d public --branch master",
}
```

## Debugging tips

### Don't minify HTML
Expand Down
1 change: 1 addition & 0 deletions docs/docs/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,4 @@ you can place the files in a `src` subfolder and build them to the plugin folder
## Community Plugins

* [gatsby-plugin-antd](https://github.com/bskimball/gatsby-plugin-antd)
* [gatsby-plugin-yandex-metrika](https://github.com/viatsko/gatsby-plugin-yandex-metrika)
Binary file added docs/tutorial/part-four/allfile-query.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial/part-four/blog-post.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial/part-four/data-in-console.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial/part-four/fake-title-graphql.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial/part-four/filesystem-query.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial/part-four/frontpage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/tutorial/part-four/graphiql-filesystem.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b42c8b9

Please sign in to comment.