Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/youfoundron/gatsby-plugin-github-pages
Gatsby plugin that deploys to Github Pages post-build.
https://github.com/youfoundron/gatsby-plugin-github-pages
build gatsby gh-pages github github-pages pages plugin
Last synced: about 2 months ago
JSON representation
Gatsby plugin that deploys to Github Pages post-build.
- Host: GitHub
- URL: https://github.com/youfoundron/gatsby-plugin-github-pages
- Owner: youfoundron
- Created: 2017-11-24T22:20:20.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-14T20:31:08.000Z (over 5 years ago)
- Last Synced: 2024-03-28T00:04:21.002Z (10 months ago)
- Topics: build, gatsby, gh-pages, github, github-pages, pages, plugin
- Language: CSS
- Size: 1.41 MB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gatsby Plugin GitHub Pages
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![npm version](https://badge.fury.io/js/gatsby-plugin-github-pages.svg)](https://badge.fury.io/js/gatsby-plugin-github-pages) [![dependencies Status](https://david-dm.org/rongierlach/gatsby-plugin-github-pages/status.svg)](https://david-dm.org/rongierlach/gatsby-plugin-github-pages) [![devDependencies Status](https://david-dm.org/rongierlach/gatsby-plugin-github-pages/dev-status.svg)](https://david-dm.org/rongierlach/gatsby-plugin-github-pages?type=dev)
A Gatsby plugin that deploys your public folder to Github Pages on build.With no configuration the destination is root to a `gh-pages` branch on the current repository.
The branch, directory, and repository my all be changed via the `publishOptions` config.
The Gatsby site in the example directory is hosted at [https://rongierlach.github.io/gatsby-plugin-github-pages](https://rongierlach.github.io/gatsby-plugin-github-pages).
## Install
`$ npm install gatsby-plugin-github-pages`## Usage
Place the plugin *last* in your plugins array.#### **[User and Organization Pages](https://help.github.com/articles/user-organization-and-project-pages/#project-pages)**
If you are using a custom domain for your page you must specify it in the `gatsby-config.js` file like so:
```javascript
module.exports = {
plugins: [
/* other plugins */
{
resolve: 'gatsby-plugin-github-pages'
options: {
customDomain: 'mycustomdomain.com'
publishOptions: {
/* ... */
}
}
}
]
}
```#### **[Project Pages](https://help.github.com/articles/user-organization-and-project-pages/#project-pages)**
You must build with the prefix-paths flag like so:
`$ gatsby build --prefix-paths`You must also specify a [`pathPrefix`](https://www.gatsbyjs.org/docs/path-prefix/) in your `gatsby-config.js` file:
```javascript
module.exports = {
pathPrefix: '/name-of-your-repo',
plugins: [
/* other plugins */
{
resolve: 'gatsby-plugin-github-pages'
options: {
publishOptions: {
/* ... */
}
}
}
]
}
```## Publish Options
The plugin uses `gh-pages` internally, publish options can be found in greater detail [here](https://github.com/tschaub/gh-pages#options).