https://github.com/docksal/boilerplate-gatsby
GatsbyJS boilerplate powered by Docksal
https://github.com/docksal/boilerplate-gatsby
gatsbyjs
Last synced: about 1 year ago
JSON representation
GatsbyJS boilerplate powered by Docksal
- Host: GitHub
- URL: https://github.com/docksal/boilerplate-gatsby
- Owner: docksal
- Created: 2017-12-06T02:59:07.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-03-10T15:35:00.000Z (over 3 years ago)
- Last Synced: 2025-07-01T23:33:39.224Z (about 1 year ago)
- Topics: gatsbyjs
- Language: Shell
- Homepage: https://docksal.io
- Size: 12.7 KB
- Stars: 2
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gatsby boilerplate for Docksal
[GatsbyJS](https://www.gatsbyjs.org/) boilerplate project for Docksal
## Instructions
Run `fin init` to install Gatsby's default starter.
Once the site is installed, Docksal will start Gatsby in the development mode,
allowing you to jump to playing with the installation. Edit pages under `docroot/src/pages`. (Known issue: instant update is not working. You need to hit refresh in the browser.)
**Note:** `fin init` always re-creates the project from scratch. To just (re)start the project development server use `fin develop`.
## Generating Static Site
Create a static build with `fin build-site`.
## Custom commands list
- `fin init` - (re)initialize the project (start fresh, drops `docroot`)
- `fin develop` - starts Gatsby server again (if the server or project stack was stopped). Does NOT do a reset.
- `fin build-site` - Generates production GatsbyJS site build in `./public`
## Appendix
### Gatsby 1.x issue with images when working in Docker
When running Gatsby in develop mode, there is an issue with images imported via `import`, because Gatsby appends port to their URLs by default. [See Gatsby issue](https://github.com/gatsbyjs/gatsby/issues/5264#issuecomment-392947839) for the proper workaround.