Built with Node, Github Pages & Gatsby (including 'Gatsby React Boilerplate' template).
- Basic configuration and folder structure.
- Uses postcss and sass (with autoprefixer and pixrem).
- Uses data from local json files.
- Contains Node.js server code for easy, secure, and fast hosting.
- SVG sprites: Add your SVG icons in
components/icon
as .icon files and use them.
First, clone this repository with git clone https://github.com/jjaburke91/figurefigure
.
Before all stages, make sure you've installed the required dependencies with npm install
in the root directory.
- Run
npm run dev
, this will try execute the development process and local server. - You should see a message saying your local server has started at
http://localhost:8000/
. Open this URL in the browser to view. - Start coding, the development process will automatically rebuild the local project on any code changes.
Note, this build is slightly different to the build that'll be used on the live site. To test a build matching how it'd be live, follow the next guide Build
.
This will locally build the application, in the same way it'll be built for the live site.
- Run
npm run build
. You should see aDone building
message. This will build the application into apublic
folder. - Now you can test this build locally using
npm run serve
. This will create a local server running from thepublic
folder. - You should see a message saying the server is running locally at
http://localhost:9000
. Open this URL in the browser to test.
The live website is served via Github pages, routing figurefigure.fr to the Github pages host. Follow the next steps to deploy:
- Locally test your build process with the above
Build
guide, and ensure everything is working there before deploying. - To deploy live, run
npm run deploylive
. This will build the app, and commit the build files to agh-pages
branch in the repository - Github pages will serve the website from this branch. - Done! You can view the site at figurefigure.fr. Remember, it can take a few minutes for changes to become visible.
Please work on a feature branch, and to put a change live, create a pull request going into master
. A code owner can sign it off, allow it to be merged into master and deployed.
- RTL: The usual method of generating different css file for RTL pages (as seen in static-html-boilerplate) will not work out of the box here since Gatsby pulls all the css together, this means the RTL css will override the LTR one.