add pathPrefix configuration

This commit is contained in:
Thomas Chen 2019-07-02 17:25:14 -07:00
parent e1f30883fb
commit e877c17f7d
3 changed files with 15 additions and 0 deletions

View File

@ -77,6 +77,19 @@ Open the `blog` directory in your code editor of choice and edit `src/templates/
After clicking that button, youll authenticate with GitHub and choose a repository name. Netlify will then automatically create a repository in your GitHub account with a copy of the files from the template. Next, it will build and deploy the new site on Netlify, bringing you to the site dashboard when the build is complete. Next, youll need to set up Netlifys Identity service to authorize users to log in to the CMS.
## Deploy to Github Pages
To deploy to github pages, simply do the following:
- Ensure that your `package.json` file correctly reflects where this repo lives
- Change the `pathPrefix` in your `config.js`
- Run the standard deploy command
```sh
npm run deploy
```
#### Access Locally
```
$ git clone https://github.com/[GITHUB_USERNAME]/[REPO_NAME].git

View File

@ -2,6 +2,7 @@
module.exports = {
url: 'https://lumen.netlify.com',
pathPrefix: '/',
title: 'Blog by John Doe',
subtitle: 'Pellentesque odio nisi, euismod in, pharetra a, ultricies in, diam. Sed arcu.',
copyright: '© All rights reserved.',

View File

@ -4,6 +4,7 @@ const siteConfig = require('./config.js');
const postCssPlugins = require('./postcss-config.js');
module.exports = {
pathPrefix: siteConfig.pathPrefix,
siteMetadata: {
url: siteConfig.url,
title: siteConfig.title,