Giter Club home page Giter Club logo

gatsby-test's Introduction

Gatsby

Gatsyby startbootstrap-agency

gatsby version of startbootstrap-agency with i18n supported.

dependencies Status Netlify Status

Preview

startbootstrap-agency

Sample page

https://gatsby-startbootstrap-agency.netlify.app

※ startbootstrap-agency (Original Version)

※ startbootstrap-agency-webpack(Webpack Version)

Note

If you're not interesting in i18n, use StaticQueryVersion instead. StaticQueryVersion gets better performance and better code structure.

How to use

npm install -g gatsby-cli

gatsby 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.

  2. 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

Gatsby lighthouse

Webpack Version

Webpack lighthouse

Original Version

Original lighthouse

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 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.

gatsby-test's People

Contributors

ricklamb avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.