https://github.com/jcstein/sequoia-vans
Gatsby version of startbootstrap-agency with i18n supported
https://github.com/jcstein/sequoia-vans
Last synced: 2 months ago
JSON representation
Gatsby version of startbootstrap-agency with i18n supported
- Host: GitHub
- URL: https://github.com/jcstein/sequoia-vans
- Owner: jcstein
- License: mit
- Created: 2021-05-31T00:47:58.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-20T16:39:02.000Z (almost 4 years ago)
- Last Synced: 2024-10-29T07:41:39.935Z (8 months ago)
- Language: JavaScript
- Size: 32.1 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Gatsyby startbootstrap-agencygatsby version of startbootstrap-agency with i18n supported.
[](https://david-dm.org/thundermiracle/gatsby-startbootstrap-agency)
[](https://app.netlify.com/sites/gatsby-startbootstrap-agency/deploys)__This project is migrated to Gatsby@v3, check the latest Gatsby@v2 version [here](https://github.com/thundermiracle/gatsby-startbootstrap-agency/tree/gatsby-2.0).__
## Preview

## Sample page
[https://gatsby-startbootstrap-agency.netlify.app](https://gatsby-startbootstrap-agency.netlify.app)
[※ startbootstrap-agency (Original Version)](https://github.com/BlackrockDigital/startbootstrap-agency)
[※ startbootstrap-agency-webpack(Webpack Version)](https://github.com/thundermiracle/startbootstrap-agency-webpack/)
## Note
__If you're not interesting in i18n, use [StaticQueryVersion](https://github.com/thundermiracle/gatsby-startbootstrap-agency/tree/StaticQueryVersion) instead. StaticQueryVersion gets better performance and better code structure.__
## How to use
This project is using `yarn` as the package manager. You have to set yarn as Gatsby-cli's package manager first.
[https://www.gatsbyjs.com/docs/glossary/yarn/#using-yarn-as-your-gatsby-package-manager](https://www.gatsbyjs.com/docs/glossary/yarn/#using-yarn-as-your-gatsby-package-manager)
```sh
npm install -g gatsby-cligatsby new my-blog-folder https://github.com/thundermiracle/gatsby-startbootstrap-agency
```## Why Gatsby Version
1. > Original version is great but have to load too many unnecessary contents from CDN including all components in `bootstrap`, all solid & brands icons in `fontawesome`. That dramatically slows down the FCP(first contentful paint) in 3G environment.
Using Gatsby could tree-shaking unnecessary code, optimizing images which make first contentful paint very fast.
1. > Implementation of i18n in original version is not easy and will make a lot of redundant code.
i18n is really easy in Gatsby and i18n is more maintainable.
## Comparison of Original, Webpack and Gatsby version
### Gatsby Version

### Webpack Version

### Original Version

## Basic Configuration
- `iconName` in Services.md MUST be defined in `'config/CustomIcons.jsx'`.
- `imageFileName` in markdown MUST be added in `'content/assets'`.
- all configurable contents are saved in markdown files in `'content'` folder.
- change `file name's number` in `'content/sections'` folder to change the sort order.
- nullable items (if defined):
- `anchor` in section markdown: display in menu if defined in sections' markdown
- items in `social`: `twitter, facebook, linkedin, github, medium`
- `jumpToAnchor, jumpToAnchorText` in Top.md: add button in Top section## i18n Configuration
- set defaultLang in `'config/site.js'`
- add langTextMap to `'config/site.js'` (LanguageSelector won't display if langTextMap is not defined. Consider using [StaticQueryVersion](#note) if i18n is not necessary)
- copy markdown files in `'content'` folder, rename it to `xxxx.[langKey].md` and translate the contents
## License
This project is licensed under the terms of the [MIT license](/LICENSE).