New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-plugin-github-pages

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-plugin-github-pages - npm Package Compare versions

Comparing version 0.0.0 to 0.1.0

10

package.json
{
"name": "gatsby-plugin-github-pages",
"version": "0.0.0",
"version": "0.1.0",
"description": "Gatsby plugin that deploys to Github Pages post-build.",

@@ -15,2 +15,3 @@ "main": "index.js",

"bluebird": "^3.5.1",
"gatsby-cli": "^1.1.23",
"gh-pages": "^1.1.0"

@@ -30,3 +31,8 @@ },

"lint"
]
],
"standard": {
"ignore": [
"/example"
]
}
}

47

README.md
# Gatsby Plugin GitHub Pages
A Gatsby plugin that deploys your build to Github Pages.
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

@@ -8,17 +14,16 @@ `$ npm install gatsby-plugin-github-pages`

## Usage
In your `gatsby-config.js` file:
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', // optional
publishOptions: { // defaults
src: '**/*',
branch: 'gh-pages',
dest: '.',
repo: 'https://example.com/other/repo.git'
// ...
customDomain: 'mycustomdomain.com'
publishOptions: {
/* ... */
}

@@ -31,3 +36,25 @@ }

#### **[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).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc