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

Gatsby plugin that deploys to Github Pages post-build.

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
increased by125%
Maintainers
1
Weekly downloads
 
Created
Source

Gatsby Plugin 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.

Install

$ npm install gatsby-plugin-github-pages

Usage

Place the plugin last in your plugins array.

User and Organization Pages

If you are using a custom domain for your page you must specify it in the gatsby-config.js file like so:

module.exports = {
  plugins: [
    /* other plugins */
    {
      resolve: 'gatsby-plugin-github-pages'
      options: {
        customDomain: 'mycustomdomain.com'
        publishOptions: {
          /* ... */
        }
      }
    }
  ]
}
Project Pages

You must build with the prefix-paths flag like so:
$ gatsby build --prefix-paths

You must also specify a pathPrefix in your gatsby-config.js file:

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.

FAQs

Package last updated on 26 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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