Skip to content

Commit 69e369b

Browse files
committed
Adding code highlighting and fix typos in readme
1 parent 7e004ba commit 69e369b

File tree

8 files changed

+121
-53
lines changed

8 files changed

+121
-53
lines changed

README.md

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,71 @@ The GatsbyJS Starter to build your next Saas product on gatsby! See [demo](https
44

55
![zauberware technologies](https://github.com/zauberware/gatsby-starter-redux-saas/raw/master/static/website-preview.jpg)
66

7-
87
## Quick start
98

10-
1. **Create a Gatsby site.**
11-
12-
Use the Gatsby CLI to create a new site, specifying the default starter.
9+
Use the Gatsby CLI to create a new site, specifying the default starter:
1310

1411
```sh
1512
gatsby new my-saas-product https://github.com/zauberware/gatsby-starter-redux-saas
1613
cd my-saas-product
17-
cp env_sample .env.development
14+
```
15+
16+
Clone `env_sample` file:
17+
18+
```sh
19+
cp env_sample .env.development && cp env_sample .env.production
20+
```
21+
22+
Install packages and run the server:
23+
24+
```sh
1825
yarn && npm start
1926
```
2027

21-
**Backend:** Make sure that you have a GraphQL Backend with a working JSON Web Token authentication running on http://0.0.0.0:3000/. You don't have a backend? Clone this repo [this](https://github.com/zauberware/rails-devise-graphql).
28+
29+
**Backend:** Make sure that the `.env.development` file is included in the root of your project with an GraphQL endpoint defined with `APOLLO_API_URL=https://...` We connected our demo backend as a sample. You can bring your own backend and when it works with JSON Web Token the changes will be trivial. You don't have a backend? Clone this repo [this](https://github.com/zauberware/rails-devise-graphql).
2230

2331

2432
## What's included?
2533

26-
1. **Handle business logic**: This starter uses [react-redux](https://github.com/reduxjs/react-redux) to hold data and fire actions in the application.
34+
### 1. **Redux**
35+
This starter uses [react-redux](https://github.com/reduxjs/react-redux) to hold business data and fire actions in the application. Read more abour [redux](https://redux.js.org/basics/usage-with-react) and [combinedReducers](https://redux.js.org/api/combinereducers).
2736

28-
2. **Apollo Client**: To communicate with the application server the starter uses [apollo-client](https://github.com/apollographql/apollo-client). Set the GraphQL endpoint in `.env.development` and `.env.production`.
37+
### 2. Apollo Client
38+
To communicate with the application server this starter uses [apollo-client](https://github.com/apollographql/apollo-client). Set the GraphQL endpoint with `APOLLO_API_URL` in `.env.development` and `.env.production`.
2939

30-
3. **Authentication**: Ready to go authentication with [JSON Web Tokens](https://jwt.io/introduction/). The starter saves the current user in the redux store. We have implemented a demo backend with RubyOnRails, but you can connect any other graphQL backend. If the backend uses JWT the changes in the code will be trivial.
40+
### 3. Authentication:
41+
Ready to go authentication with [JSON Web Tokens](https://jwt.io/introduction/). The starter saves the current user in the redux store. We have implemented a demo backend with RubyOnRails, but you can connect any other graphQL backend. If the backend uses JWT the changes in the code will be trivial.
3142

32-
4. **Optimized Images**: No more large, unoptimized images which dramatically slow down your site. The starter uses [gatsby-image](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-image) for optimized image loading.
43+
### 4. Optimized Images
44+
No more large, unoptimized images which dramatically slow down your site. The starter uses [gatsby-image](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-image) for optimized image loading.
3345

34-
5. **SEO friendly**: The starter uses [react-helmet](https://github.com/nfl/react-helmet) and [gatsby-plugin-sitemap](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-sitemap) to make search engines happy.
46+
### 5. SEO friendly
47+
The starter uses [react-helmet](https://github.com/nfl/react-helmet) and [gatsby-plugin-sitemap](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-sitemap) to make search engines happy.
3548

36-
6. **Google Wemaster Tools**: Define your google *webmaster key* to confirm the ownership in Google Webmaster Tools. Choose *Meta-Tag* when the Google asks you for the confirmation method. Set the key here in `gatsby-config.js`. The starter **does not** integrate Google Analytics so if you need it [install it by yourself](https://www.gatsbyjs.org/packages/gatsby-plugin-google-analytics/).
49+
### 6. Google Wemaster Tools
50+
Define your google *webmaster key* to confirm the ownership in Google Webmaster Tools. Choose *Meta-Tag* when the Google asks you for the confirmation method. Set the key here in `gatsby-config.js`. The starter **does not** integrate Google Analytics so if you need it [install it by yourself](https://www.gatsbyjs.org/packages/gatsby-plugin-google-analytics/).
3751

38-
7. **Responsive UIs**: This starter uses the base component library [magicsoup.io/stock](https://github.com/magicsoup-io/magicsoup-stock). magicsoup.io gives you are rapid start to create wonderful UIs with [styled-components](https://github.com/styled-components/styled-components) and [styled-system](https://github.com/jxnblk/styled-system).
52+
### 7. Responsive UIs
53+
This starter uses the base component library [magicsoup.io/stock](https://github.com/magicsoup-io/magicsoup-stock). magicsoup.io gives you are rapid start to create wonderful UIs with [styled-components](https://github.com/styled-components/styled-components) and [styled-system](https://github.com/jxnblk/styled-system).
3954

40-
8. **Static content with JSON and Markdown**:
55+
### 8. Static content with JSON and Markdown
4156
This starter is combining those benefits with GatsbyJS' automatic slug and page creation via [gatsby-transform-remark](https://www.styled-components.com/) or setting static page data with [gatsby-transform-json](https://www.styled-components.com/).
4257

43-
9. **Markdown to StyledComponents**: When you love `styled-components` you will come to the point where you have to define styling for Markdown or other HTML output from a CMS. The starter uses `marksy` to map the generated HTML to custom defined `styled-components`. Not all are set, so do it by yourself under `src/templates/default-page.js`.
58+
### 9. Convert Markdown to StyledComponents
59+
When you love `styled-components` and `styled-system` we have good news: Map your styled-components to markdown or other HTML output from a file system or any other external API. The starter uses `marksy` to map the generated HTML to custom defined `styled-components`. Not all are set, so do it by yourself under `src/templates/default-page.js`.
4460

45-
10. **Web-Fonts**: Every modern website or web app has a custom font. The starter uses [gatsby-plugin-web-font-loader](https://github.com/escaladesports/gatsby-plugin-web-font-loader) to load fonts from any server: Custom, Fontdeck, Fonts.com, Google, Typekit. Read more about the [webfontloader](https://github.com/typekit/webfontloader).
61+
### 10. Web-Fonts
62+
Every modern website or web app has a custom font. The starter uses [gatsby-plugin-web-font-loader](https://github.com/escaladesports/gatsby-plugin-web-font-loader) to load fonts from any server: Custom, Fontdeck, Fonts.com, Google, Typekit. Read more about the [webfontloader](https://github.com/typekit/webfontloader).
4663

47-
11. **SSR**: The starter is SSR ready. Make `npm run build` to create the production resources. Choose your favorite deploment method.
64+
### 11. SSR
65+
The starter is SSR ready. Make `npm run build` to create the production resources. Choose your favorite [deployment method](https://www.gatsbyjs.org/docs/deploying-and-hosting/) and prepare your app for production.
4866

49-
12. **Testing**: The starter includes everything you need to test your components with [jest](https://jestjs.io/docs/en/getting-started). Run `npm test` and see the run the first tests we have implemented.
67+
### 12. Testing
68+
The starter includes everything you need to test your components with [jest](https://jestjs.io/docs/en/getting-started). Run `npm test` and see the run the first tests we have implemented.
5069

51-
13. **Backend**: If you need a demo backend than have a look at this basic [RubyOnRails boilerplate](https://github.com/zauberware/rails-devise-graphql). It implements authentication with [devise](https://github.com/plataformatec/devise) + [graphql-ruby](https://graphql-ruby.org/getting_started).
70+
### 13. Backend
71+
If you need a demo backend than have a look at this basic [RubyOnRails boilerplate](https://github.com/zauberware/rails-devise-graphql). It implements authentication with [devise](https://github.com/plataformatec/devise) + [graphql-ruby](https://graphql-ruby.org/getting_started).
5272

5373

5474
## Author

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"react-apollo": "^2.4.1",
4343
"react-dom": "^16.7.0",
4444
"react-helmet": "^5.2.0",
45+
"react-highlight.js": "^1.0.7",
4546
"react-i18next": "^10.0.0",
4647
"react-redux": "^6.0.0",
4748
"redux": "^4.0.1",

src/components/Header/Header.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ const Header = ({ siteTitle, props }) => (
2525
</Link>
2626
</Heading>
2727
<P color='white' mt={0}>
28-
<Link to='/' style={{color: '#d3d2d1', paddingRight: '20px' }}>Home</Link>
29-
<Link to='/app/plans' style={{color: '#d3d2d1', paddingRight: '20px' }}>Pricing</Link>
30-
<Link to='/app/profile' style={{color: '#d3d2d1', paddingRight: '20px' }}>Profile</Link>
28+
<Link to='/' style={{color: '#E9EEFE', paddingRight: '20px' }}>Home</Link>
29+
<Link to='/app/plans' style={{color: '#E9EEFE', paddingRight: '20px' }}>Pricing</Link>
30+
<Link to='/app/profile' style={{color: '#E9EEFE', paddingRight: '20px' }}>Profile</Link>
3131
</P>
32-
<Box mb={[2,0]}><Status color='white' linkColor='#d3d2d1' /></Box>
32+
<Box mb={[2,0]}><Status color='white' linkColor='#E9EEFE' /></Box>
3333
</Flex>
3434
</Container>
3535
</Menu>

src/components/Seo/Seo.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ function SEO({ description, lang, meta, keywords, title, image }) {
9090
/>
9191
<Helmet>
9292
<script async defer src="https://buttons.github.io/buttons.js"></script>
93+
<link rel="stylesheet" href="https://highlightjs.org/static/demo/styles/railscasts.css" />
9394
</Helmet>
9495
</Fragment>
9596
)

src/data/pages/README.md

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,79 @@
1+
---
2+
slug: readme
3+
title: "Readme.md"
4+
date: "2017-08-10"
5+
---
16
# gatsby-starter-redux-saas
27

38
The GatsbyJS Starter to build your next Saas product on gatsby! See [demo](https://gatsby-redux.zauberware.com)
49

510
![zauberware technologies](https://github.com/zauberware/gatsby-starter-redux-saas/raw/master/static/website-preview.jpg)
611

7-
812
## Quick start
913

10-
1. **Create a Gatsby site.**
11-
12-
Use the Gatsby CLI to create a new site, specifying the default starter.
14+
Use the Gatsby CLI to create a new site, specifying the default starter:
1315

1416
```sh
1517
gatsby new my-saas-product https://github.com/zauberware/gatsby-starter-redux-saas
1618
cd my-saas-product
17-
cp env_sample .env.development
19+
```
20+
21+
Clone `env_sample` file:
22+
23+
```sh
24+
cp env_sample .env.development && cp env_sample .env.production
25+
```
26+
27+
Install packages and run the server:
28+
29+
```sh
1830
yarn && npm start
1931
```
2032

21-
**Backend:** Make sure that you have a GraphQL Backend with a working JSON Web Token authentication running on http://0.0.0.0:3000/. You don't have a backend? Clone this repo [this](https://github.com/zauberware/rails-devise-graphql).
33+
34+
**Backend:** Make sure that the `.env.development` file is included in the root of your project with an GraphQL endpoint defined with `APOLLO_API_URL=https://...` We connected our demo backend as a sample. You can bring your own backend and when it works with JSON Web Token the changes will be trivial. You don't have a backend? Clone this repo [this](https://github.com/zauberware/rails-devise-graphql).
2235

2336

2437
## What's included?
2538

26-
1. **Handle business logic**: This starter uses [react-redux](https://github.com/reduxjs/react-redux) to hold data and fire actions in the application.
39+
### 1. **Redux**
40+
This starter uses [react-redux](https://github.com/reduxjs/react-redux) to hold business data and fire actions in the application. Read more abour [redux](https://redux.js.org/basics/usage-with-react) and [combinedReducers](https://redux.js.org/api/combinereducers).
2741

28-
2. **Apollo Client**: To communicate with the application server the starter uses [apollo-client](https://github.com/apollographql/apollo-client). Set the GraphQL endpoint in `.env.development` and `.env.production`.
42+
### 2. Apollo Client
43+
To communicate with the application server this starter uses [apollo-client](https://github.com/apollographql/apollo-client). Set the GraphQL endpoint with `APOLLO_API_URL` in `.env.development` and `.env.production`.
2944

30-
3. **Authentication**: Ready to go authentication with [JSON Web Tokens](https://jwt.io/introduction/). The starter saves the current user in the redux store. We have implemented a demo backend with RubyOnRails, but you can connect any other graphQL backend. If the backend uses JWT the changes in the code will be trivial.
45+
### 3. Authentication:
46+
Ready to go authentication with [JSON Web Tokens](https://jwt.io/introduction/). The starter saves the current user in the redux store. We have implemented a demo backend with RubyOnRails, but you can connect any other graphQL backend. If the backend uses JWT the changes in the code will be trivial.
3147

32-
4. **Optimized Images**: No more large, unoptimized images which dramatically slow down your site. The starter uses [gatsby-image](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-image) for optimized image loading.
48+
### 4. Optimized Images
49+
No more large, unoptimized images which dramatically slow down your site. The starter uses [gatsby-image](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-image) for optimized image loading.
3350

34-
5. **SEO friendly**: The starter uses [react-helmet](https://github.com/nfl/react-helmet) and [gatsby-plugin-sitemap](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-sitemap) to make search engines happy.
51+
### 5. SEO friendly
52+
The starter uses [react-helmet](https://github.com/nfl/react-helmet) and [gatsby-plugin-sitemap](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-sitemap) to make search engines happy.
3553

36-
6. **Google Wemaster Tools**: Define your google *webmaster key* to confirm the ownership in Google Webmaster Tools. Choose *Meta-Tag* when the Google asks you for the confirmation method. Set the key here in `gatsby-config.js`. The starter **does not** integrate Google Analytics so if you need it [install it by yourself](https://www.gatsbyjs.org/packages/gatsby-plugin-google-analytics/).
54+
### 6. Google Wemaster Tools
55+
Define your google *webmaster key* to confirm the ownership in Google Webmaster Tools. Choose *Meta-Tag* when the Google asks you for the confirmation method. Set the key here in `gatsby-config.js`. The starter **does not** integrate Google Analytics so if you need it [install it by yourself](https://www.gatsbyjs.org/packages/gatsby-plugin-google-analytics/).
3756

38-
7. **Responsive UIs**: This starter uses the base component library [magicsoup.io/stock](https://github.com/magicsoup-io/magicsoup-stock). magicsoup.io gives you are rapid start to create wonderful UIs with [styled-components](https://github.com/styled-components/styled-components) and [styled-system](https://github.com/jxnblk/styled-system).
57+
### 7. Responsive UIs
58+
This starter uses the base component library [magicsoup.io/stock](https://github.com/magicsoup-io/magicsoup-stock). magicsoup.io gives you are rapid start to create wonderful UIs with [styled-components](https://github.com/styled-components/styled-components) and [styled-system](https://github.com/jxnblk/styled-system).
3959

40-
8. **Static content with JSON and Markdown**:
60+
### 8. Static content with JSON and Markdown
4161
This starter is combining those benefits with GatsbyJS' automatic slug and page creation via [gatsby-transform-remark](https://www.styled-components.com/) or setting static page data with [gatsby-transform-json](https://www.styled-components.com/).
4262

43-
9. **Markdown to StyledComponents**: When you love `styled-components` you will come to the point where you have to define styling for Markdown or other HTML output from a CMS. The starter uses `marksy` to map the generated HTML to custom defined `styled-components`. Not all are set, so do it by yourself under `src/templates/default-page.js`.
63+
### 9. Convert Markdown to StyledComponents
64+
When you love `styled-components` and `styled-system` we have good news: Map your styled-components to markdown or other HTML output from a file system or any other external API. The starter uses `marksy` to map the generated HTML to custom defined `styled-components`. Not all are set, so do it by yourself under `src/templates/default-page.js`.
4465

45-
10. **Web-Fonts**: Every modern website or web app has a custom font. The starter uses [gatsby-plugin-web-font-loader](https://github.com/escaladesports/gatsby-plugin-web-font-loader) to load fonts from any server: Custom, Fontdeck, Fonts.com, Google, Typekit. Read more about the [webfontloader](https://github.com/typekit/webfontloader).
66+
### 10. Web-Fonts
67+
Every modern website or web app has a custom font. The starter uses [gatsby-plugin-web-font-loader](https://github.com/escaladesports/gatsby-plugin-web-font-loader) to load fonts from any server: Custom, Fontdeck, Fonts.com, Google, Typekit. Read more about the [webfontloader](https://github.com/typekit/webfontloader).
4668

47-
11. **SSR**: The starter is SSR ready. Make `npm run build` to create the production resources. Choose your favorite deploment method.
69+
### 11. SSR
70+
The starter is SSR ready. Make `npm run build` to create the production resources. Choose your favorite [deployment method](https://www.gatsbyjs.org/docs/deploying-and-hosting/) and prepare your app for production.
4871

49-
12. **Testing**: The starter includes everything you need to test your components with [jest](https://jestjs.io/docs/en/getting-started). Run `npm test` and see the run the first tests we have implemented.
72+
### 12. Testing
73+
The starter includes everything you need to test your components with [jest](https://jestjs.io/docs/en/getting-started). Run `npm test` and see the run the first tests we have implemented.
5074

51-
13. **Backend**: If you need a demo backend than have a look at this basic [RubyOnRails boilerplate](https://github.com/zauberware/rails-devise-graphql). It implements authentication with [devise](https://github.com/plataformatec/devise) + [graphql-ruby](https://graphql-ruby.org/getting_started).
75+
### 13. Backend
76+
If you need a demo backend than have a look at this basic [RubyOnRails boilerplate](https://github.com/zauberware/rails-devise-graphql). It implements authentication with [devise](https://github.com/plataformatec/devise) + [graphql-ruby](https://graphql-ruby.org/getting_started).
5277

5378

5479
## Author

src/styled/theme.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11

2-
const primary = '#236167'
3-
const primaryDark = '#044046'
4-
const greyLight = '#DAE7E8'
5-
const greyDark = '#AAB7B8'
2+
const primary = '#7D97E5'
3+
const primaryDark = '#323D5C'
4+
const greyLight = '#E9EEFE'
5+
const greyDark = '#6F6069'
66
const fontSizes = [
7-
12, 16, 18, 22, 26, 36, 48, 58
7+
14, 18, 22, 26, 32, 42, 52, 58
88
]
99
const space = [
1010
0, 4, 8, 16, 32, 64, 128, 256
@@ -76,7 +76,8 @@ export default {
7676
}
7777
},
7878
Heading: {
79-
fontFamily: serif
79+
fontFamily: serif,
80+
color: primaryDark,
8081
},
8182
headings: {
8283
h1: {

0 commit comments

Comments
 (0)