├── .gitignore ├── .prettierignore ├── .prettierrc ├── LICENSE ├── README.md ├── gatsby-browser.js ├── gatsby-config.js ├── gatsby-node.js ├── gatsby-ssr.js ├── package.json ├── src ├── components │ ├── header.js │ ├── image.js │ ├── layout.css │ ├── layout.js │ └── seo.js ├── images │ ├── gatsby-astronaut.png │ └── gatsby-icon.png └── pages │ ├── 404.js │ ├── index.js │ ├── page-2.js │ └── using-typescript.tsx ├── static └── favicon.ico └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (http://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # Typescript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # dotenv environment variable files 55 | .env* 56 | 57 | # gatsby files 58 | .cache/ 59 | public 60 | 61 | # Mac files 62 | .DS_Store 63 | 64 | # Yarn 65 | yarn-error.log 66 | .pnp/ 67 | .pnp.js 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .cache 2 | package.json 3 | package-lock.json 4 | public 5 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "avoid", 3 | "semi": false 4 | } 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The BSD Zero Clause License (0BSD) 2 | 3 | Copyright (c) 2020 Gatsby Inc. 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 9 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 10 | AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 11 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 12 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 13 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 14 | PERFORMANCE OF THIS SOFTWARE. 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 |

3 | 4 | Gatsby 5 | 6 |

7 |

8 | Gatsby's default starter 9 |

10 | 11 | Kick off your project with this default boilerplate. This starter ships with the main Gatsby configuration files you might need to get up and running blazing fast with the blazing fast app generator for React. 12 | 13 | _Have another more specific idea? You may want to check out our vibrant collection of [official and community-created starters](https://www.gatsbyjs.com/docs/gatsby-starters/)._ 14 | 15 | ## 🚀 Quick start 16 | 17 | 1. **Create a Gatsby site.** 18 | 19 | Use the Gatsby CLI to create a new site, specifying the default starter. 20 | 21 | ```shell 22 | # create a new Gatsby site using the default starter 23 | gatsby new my-default-starter https://github.com/gatsbyjs/gatsby-starter-default 24 | ``` 25 | 26 | 1. **Start developing.** 27 | 28 | Navigate into your new site’s directory and start it up. 29 | 30 | ```shell 31 | cd my-default-starter/ 32 | gatsby develop 33 | ``` 34 | 35 | 1. **Open the source code and start editing!** 36 | 37 | Your site is now running at `http://localhost:8000`! 38 | 39 | _Note: You'll also see a second link: _`http://localhost:8000/___graphql`_. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the [Gatsby tutorial](https://www.gatsbyjs.com/tutorial/part-five/#introducing-graphiql)._ 40 | 41 | Open the `my-default-starter` directory in your code editor of choice and edit `src/pages/index.js`. Save your changes and the browser will update in real time! 42 | 43 | ## 🧐 What's inside? 44 | 45 | A quick look at the top-level files and directories you'll see in a Gatsby project. 46 | 47 | . 48 | ├── node_modules 49 | ├── src 50 | ├── .gitignore 51 | ├── .prettierrc 52 | ├── gatsby-browser.js 53 | ├── gatsby-config.js 54 | ├── gatsby-node.js 55 | ├── gatsby-ssr.js 56 | ├── LICENSE 57 | ├── package-lock.json 58 | ├── package.json 59 | └── README.md 60 | 61 | 1. **`/node_modules`**: This directory contains all of the modules of code that your project depends on (npm packages) are automatically installed. 62 | 63 | 2. **`/src`**: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser) such as your site header or a page template. `src` is a convention for “source code”. 64 | 65 | 3. **`.gitignore`**: This file tells git which files it should not track / not maintain a version history for. 66 | 67 | 4. **`.prettierrc`**: This is a configuration file for [Prettier](https://prettier.io/). Prettier is a tool to help keep the formatting of your code consistent. 68 | 69 | 5. **`gatsby-browser.js`**: This file is where Gatsby expects to find any usage of the [Gatsby browser APIs](https://www.gatsbyjs.com/docs/browser-apis/) (if any). These allow customization/extension of default Gatsby settings affecting the browser. 70 | 71 | 6. **`gatsby-config.js`**: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you’d like to include, etc. (Check out the [config docs](https://www.gatsbyjs.com/docs/gatsby-config/) for more detail). 72 | 73 | 7. **`gatsby-node.js`**: This file is where Gatsby expects to find any usage of the [Gatsby Node APIs](https://www.gatsbyjs.com/docs/node-apis/) (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process. 74 | 75 | 8. **`gatsby-ssr.js`**: This file is where Gatsby expects to find any usage of the [Gatsby server-side rendering APIs](https://www.gatsbyjs.com/docs/ssr-apis/) (if any). These allow customization of default Gatsby settings affecting server-side rendering. 76 | 77 | 9. **`LICENSE`**: This Gatsby starter is licensed under the 0BSD license. This means that you can see this file as a placeholder and replace it with your own license. 78 | 79 | 10. **`package-lock.json`** (See `package.json` below, first). This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. **(You won’t change this file directly).** 80 | 81 | 11. **`package.json`**: A manifest file for Node.js projects, which includes things like metadata (the project’s name, author, etc). This manifest is how npm knows which packages to install for your project. 82 | 83 | 12. **`README.md`**: A text file containing useful reference information about your project. 84 | 85 | ## 🎓 Learning Gatsby 86 | 87 | Looking for more guidance? Full documentation for Gatsby lives [on the website](https://www.gatsbyjs.com/). Here are some places to start: 88 | 89 | - **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby](https://www.gatsbyjs.com/tutorial/).** It starts with zero assumptions about your level of ability and walks through every step of the process. 90 | 91 | - **To dive straight into code samples, head [to our documentation](https://www.gatsbyjs.com/docs/).** In particular, check out the _Guides_, _API Reference_, and _Advanced Tutorials_ sections in the sidebar. 92 | 93 | ## 💫 Deploy 94 | 95 | [![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/gatsbyjs/gatsby-starter-default) 96 | 97 | [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/gatsbyjs/gatsby-starter-default) 98 | 99 | 100 | -------------------------------------------------------------------------------- /gatsby-browser.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Implement Gatsby's Browser APIs in this file. 3 | * 4 | * See: https://www.gatsbyjs.org/docs/browser-apis/ 5 | */ 6 | 7 | // You can delete this file if you're not using it 8 | -------------------------------------------------------------------------------- /gatsby-config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | siteMetadata: { 3 | title: `Gatsby Default Starter`, 4 | description: `Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.`, 5 | author: `@gatsbyjs`, 6 | }, 7 | plugins: [ 8 | `gatsby-plugin-react-helmet`, 9 | { 10 | resolve: `gatsby-source-filesystem`, 11 | options: { 12 | name: `images`, 13 | path: `${__dirname}/src/images`, 14 | }, 15 | }, 16 | `gatsby-transformer-sharp`, 17 | `gatsby-plugin-sharp`, 18 | { 19 | resolve: `gatsby-plugin-manifest`, 20 | options: { 21 | name: `gatsby-starter-default`, 22 | short_name: `starter`, 23 | start_url: `/`, 24 | background_color: `#663399`, 25 | theme_color: `#663399`, 26 | display: `minimal-ui`, 27 | icon: `src/images/gatsby-icon.png`, // This path is relative to the root of the site. 28 | }, 29 | }, 30 | // this (optional) plugin enables Progressive Web App + Offline functionality 31 | // To learn more, visit: https://gatsby.dev/offline 32 | // `gatsby-plugin-offline`, 33 | ], 34 | } 35 | -------------------------------------------------------------------------------- /gatsby-node.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Implement Gatsby's Node APIs in this file. 3 | * 4 | * See: https://www.gatsbyjs.org/docs/node-apis/ 5 | */ 6 | 7 | // You can delete this file if you're not using it 8 | -------------------------------------------------------------------------------- /gatsby-ssr.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Implement Gatsby's SSR (Server Side Rendering) APIs in this file. 3 | * 4 | * See: https://www.gatsbyjs.org/docs/ssr-apis/ 5 | */ 6 | 7 | // You can delete this file if you're not using it 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gatsby-starter-default", 3 | "private": true, 4 | "description": "A simple starter to get up and developing quickly with Gatsby", 5 | "version": "0.1.0", 6 | "author": "Kyle Mathews ", 7 | "dependencies": { 8 | "gatsby": "^2.24.50", 9 | "gatsby-image": "^2.4.16", 10 | "gatsby-plugin-manifest": "^2.4.24", 11 | "gatsby-plugin-offline": "^3.2.24", 12 | "gatsby-plugin-react-helmet": "^3.3.10", 13 | "gatsby-plugin-sharp": "^2.6.28", 14 | "gatsby-source-filesystem": "^2.3.25", 15 | "gatsby-transformer-sharp": "^2.5.13", 16 | "prop-types": "^15.7.2", 17 | "react": "^16.12.0", 18 | "react-dom": "^16.12.0", 19 | "react-helmet": "^6.1.0" 20 | }, 21 | "devDependencies": { 22 | "prettier": "2.1.0" 23 | }, 24 | "keywords": [ 25 | "gatsby" 26 | ], 27 | "license": "0BSD", 28 | "scripts": { 29 | "build": "gatsby build", 30 | "develop": "gatsby develop", 31 | "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md}\"", 32 | "start": "npm run develop", 33 | "serve": "gatsby serve", 34 | "clean": "gatsby clean", 35 | "test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1" 36 | }, 37 | "repository": { 38 | "type": "git", 39 | "url": "https://github.com/gatsbyjs/gatsby-starter-default" 40 | }, 41 | "bugs": { 42 | "url": "https://github.com/gatsbyjs/gatsby/issues" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/components/header.js: -------------------------------------------------------------------------------- 1 | import { Link } from "gatsby" 2 | import PropTypes from "prop-types" 3 | import React from "react" 4 | 5 | const Header = ({ siteTitle }) => ( 6 |
12 |
19 |

20 | 27 | {siteTitle} 28 | 29 |

30 |
31 |
32 | ) 33 | 34 | Header.propTypes = { 35 | siteTitle: PropTypes.string, 36 | } 37 | 38 | Header.defaultProps = { 39 | siteTitle: ``, 40 | } 41 | 42 | export default Header 43 | -------------------------------------------------------------------------------- /src/components/image.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import { useStaticQuery, graphql } from "gatsby" 3 | import Img from "gatsby-image" 4 | 5 | /* 6 | * This component is built using `gatsby-image` to automatically serve optimized 7 | * images with lazy loading and reduced file sizes. The image is loaded using a 8 | * `useStaticQuery`, which allows us to load the image from directly within this 9 | * component, rather than having to pass the image data down from pages. 10 | * 11 | * For more information, see the docs: 12 | * - `gatsby-image`: https://gatsby.dev/gatsby-image 13 | * - `useStaticQuery`: https://www.gatsbyjs.org/docs/use-static-query/ 14 | */ 15 | 16 | const Image = () => { 17 | const data = useStaticQuery(graphql` 18 | query { 19 | placeholderImage: file(relativePath: { eq: "gatsby-astronaut.png" }) { 20 | childImageSharp { 21 | fluid(maxWidth: 300) { 22 | ...GatsbyImageSharpFluid 23 | } 24 | } 25 | } 26 | } 27 | `) 28 | 29 | return 30 | } 31 | 32 | export default Image 33 | -------------------------------------------------------------------------------- /src/components/layout.css: -------------------------------------------------------------------------------- 1 | html { 2 | -ms-text-size-adjust: 100%; 3 | -webkit-text-size-adjust: 100%; 4 | font: 112.5%/1.45em georgia, serif, sans-serif; 5 | box-sizing: border-box; 6 | overflow-y: scroll; 7 | } 8 | body { 9 | margin: 0; 10 | -webkit-font-smoothing: antialiased; 11 | -moz-osx-font-smoothing: grayscale; 12 | color: hsla(0, 0%, 0%, 0.8); 13 | font-family: georgia, serif; 14 | font-weight: normal; 15 | word-wrap: break-word; 16 | font-kerning: normal; 17 | -moz-font-feature-settings: "kern", "liga", "clig", "calt"; 18 | -ms-font-feature-settings: "kern", "liga", "clig", "calt"; 19 | -webkit-font-feature-settings: "kern", "liga", "clig", "calt"; 20 | font-feature-settings: "kern", "liga", "clig", "calt"; 21 | } 22 | article, 23 | aside, 24 | details, 25 | figcaption, 26 | figure, 27 | footer, 28 | header, 29 | main, 30 | menu, 31 | nav, 32 | section, 33 | summary { 34 | display: block; 35 | } 36 | audio, 37 | canvas, 38 | progress, 39 | video { 40 | display: inline-block; 41 | } 42 | audio:not([controls]) { 43 | display: none; 44 | height: 0; 45 | } 46 | progress { 47 | vertical-align: baseline; 48 | } 49 | [hidden], 50 | template { 51 | display: none; 52 | } 53 | a { 54 | background-color: transparent; 55 | -webkit-text-decoration-skip: objects; 56 | } 57 | a:active, 58 | a:hover { 59 | outline-width: 0; 60 | } 61 | abbr[title] { 62 | border-bottom: 1px dotted hsla(0, 0%, 0%, 0.5); 63 | cursor: help; 64 | text-decoration: none; 65 | } 66 | b, 67 | strong { 68 | font-weight: inherit; 69 | font-weight: bolder; 70 | } 71 | dfn { 72 | font-style: italic; 73 | } 74 | h1 { 75 | margin-left: 0; 76 | margin-right: 0; 77 | margin-top: 0; 78 | padding-bottom: 0; 79 | padding-left: 0; 80 | padding-right: 0; 81 | padding-top: 0; 82 | margin-bottom: 1.45rem; 83 | color: inherit; 84 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, 85 | Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; 86 | font-weight: bold; 87 | text-rendering: optimizeLegibility; 88 | font-size: 2.25rem; 89 | line-height: 1.1; 90 | } 91 | mark { 92 | background-color: #ff0; 93 | color: #000; 94 | } 95 | small { 96 | font-size: 80%; 97 | } 98 | sub, 99 | sup { 100 | font-size: 75%; 101 | line-height: 0; 102 | position: relative; 103 | vertical-align: baseline; 104 | } 105 | sub { 106 | bottom: -0.25em; 107 | } 108 | sup { 109 | top: -0.5em; 110 | } 111 | img { 112 | border-style: none; 113 | max-width: 100%; 114 | margin-left: 0; 115 | margin-right: 0; 116 | margin-top: 0; 117 | padding-bottom: 0; 118 | padding-left: 0; 119 | padding-right: 0; 120 | padding-top: 0; 121 | margin-bottom: 1.45rem; 122 | } 123 | svg:not(:root) { 124 | overflow: hidden; 125 | } 126 | code, 127 | kbd, 128 | pre, 129 | samp { 130 | font-family: monospace; 131 | font-size: 1em; 132 | } 133 | figure { 134 | margin-left: 0; 135 | margin-right: 0; 136 | margin-top: 0; 137 | padding-bottom: 0; 138 | padding-left: 0; 139 | padding-right: 0; 140 | padding-top: 0; 141 | margin-bottom: 1.45rem; 142 | } 143 | hr { 144 | box-sizing: content-box; 145 | overflow: visible; 146 | margin-left: 0; 147 | margin-right: 0; 148 | margin-top: 0; 149 | padding-bottom: 0; 150 | padding-left: 0; 151 | padding-right: 0; 152 | padding-top: 0; 153 | margin-bottom: calc(1.45rem - 1px); 154 | background: hsla(0, 0%, 0%, 0.2); 155 | border: none; 156 | height: 1px; 157 | } 158 | button, 159 | input, 160 | optgroup, 161 | select, 162 | textarea { 163 | font: inherit; 164 | margin: 0; 165 | } 166 | optgroup { 167 | font-weight: 700; 168 | } 169 | button, 170 | input { 171 | overflow: visible; 172 | } 173 | button, 174 | select { 175 | text-transform: none; 176 | } 177 | [type="reset"], 178 | [type="submit"], 179 | button, 180 | html [type="button"] { 181 | -webkit-appearance: button; 182 | } 183 | [type="button"]::-moz-focus-inner, 184 | [type="reset"]::-moz-focus-inner, 185 | [type="submit"]::-moz-focus-inner, 186 | button::-moz-focus-inner { 187 | border-style: none; 188 | padding: 0; 189 | } 190 | [type="button"]:-moz-focusring, 191 | [type="reset"]:-moz-focusring, 192 | [type="submit"]:-moz-focusring, 193 | button:-moz-focusring { 194 | outline: 1px dotted ButtonText; 195 | } 196 | fieldset { 197 | border: 1px solid silver; 198 | padding: 0.35em 0.625em 0.75em; 199 | margin-left: 0; 200 | margin-right: 0; 201 | margin-top: 0; 202 | padding-bottom: 0; 203 | padding-left: 0; 204 | padding-right: 0; 205 | padding-top: 0; 206 | margin-bottom: 1.45rem; 207 | } 208 | legend { 209 | box-sizing: border-box; 210 | color: inherit; 211 | display: table; 212 | max-width: 100%; 213 | padding: 0; 214 | white-space: normal; 215 | } 216 | textarea { 217 | overflow: auto; 218 | } 219 | [type="checkbox"], 220 | [type="radio"] { 221 | box-sizing: border-box; 222 | padding: 0; 223 | } 224 | [type="number"]::-webkit-inner-spin-button, 225 | [type="number"]::-webkit-outer-spin-button { 226 | height: auto; 227 | } 228 | [type="search"] { 229 | -webkit-appearance: textfield; 230 | outline-offset: -2px; 231 | } 232 | [type="search"]::-webkit-search-cancel-button, 233 | [type="search"]::-webkit-search-decoration { 234 | -webkit-appearance: none; 235 | } 236 | ::-webkit-input-placeholder { 237 | color: inherit; 238 | opacity: 0.54; 239 | } 240 | ::-webkit-file-upload-button { 241 | -webkit-appearance: button; 242 | font: inherit; 243 | } 244 | * { 245 | box-sizing: inherit; 246 | } 247 | *:before { 248 | box-sizing: inherit; 249 | } 250 | *:after { 251 | box-sizing: inherit; 252 | } 253 | h2 { 254 | margin-left: 0; 255 | margin-right: 0; 256 | margin-top: 0; 257 | padding-bottom: 0; 258 | padding-left: 0; 259 | padding-right: 0; 260 | padding-top: 0; 261 | margin-bottom: 1.45rem; 262 | color: inherit; 263 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, 264 | Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; 265 | font-weight: bold; 266 | text-rendering: optimizeLegibility; 267 | font-size: 1.62671rem; 268 | line-height: 1.1; 269 | } 270 | h3 { 271 | margin-left: 0; 272 | margin-right: 0; 273 | margin-top: 0; 274 | padding-bottom: 0; 275 | padding-left: 0; 276 | padding-right: 0; 277 | padding-top: 0; 278 | margin-bottom: 1.45rem; 279 | color: inherit; 280 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, 281 | Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; 282 | font-weight: bold; 283 | text-rendering: optimizeLegibility; 284 | font-size: 1.38316rem; 285 | line-height: 1.1; 286 | } 287 | h4 { 288 | margin-left: 0; 289 | margin-right: 0; 290 | margin-top: 0; 291 | padding-bottom: 0; 292 | padding-left: 0; 293 | padding-right: 0; 294 | padding-top: 0; 295 | margin-bottom: 1.45rem; 296 | color: inherit; 297 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, 298 | Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; 299 | font-weight: bold; 300 | text-rendering: optimizeLegibility; 301 | font-size: 1rem; 302 | line-height: 1.1; 303 | } 304 | h5 { 305 | margin-left: 0; 306 | margin-right: 0; 307 | margin-top: 0; 308 | padding-bottom: 0; 309 | padding-left: 0; 310 | padding-right: 0; 311 | padding-top: 0; 312 | margin-bottom: 1.45rem; 313 | color: inherit; 314 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, 315 | Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; 316 | font-weight: bold; 317 | text-rendering: optimizeLegibility; 318 | font-size: 0.85028rem; 319 | line-height: 1.1; 320 | } 321 | h6 { 322 | margin-left: 0; 323 | margin-right: 0; 324 | margin-top: 0; 325 | padding-bottom: 0; 326 | padding-left: 0; 327 | padding-right: 0; 328 | padding-top: 0; 329 | margin-bottom: 1.45rem; 330 | color: inherit; 331 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, 332 | Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; 333 | font-weight: bold; 334 | text-rendering: optimizeLegibility; 335 | font-size: 0.78405rem; 336 | line-height: 1.1; 337 | } 338 | hgroup { 339 | margin-left: 0; 340 | margin-right: 0; 341 | margin-top: 0; 342 | padding-bottom: 0; 343 | padding-left: 0; 344 | padding-right: 0; 345 | padding-top: 0; 346 | margin-bottom: 1.45rem; 347 | } 348 | ul { 349 | margin-left: 1.45rem; 350 | margin-right: 0; 351 | margin-top: 0; 352 | padding-bottom: 0; 353 | padding-left: 0; 354 | padding-right: 0; 355 | padding-top: 0; 356 | margin-bottom: 1.45rem; 357 | list-style-position: outside; 358 | list-style-image: none; 359 | } 360 | ol { 361 | margin-left: 1.45rem; 362 | margin-right: 0; 363 | margin-top: 0; 364 | padding-bottom: 0; 365 | padding-left: 0; 366 | padding-right: 0; 367 | padding-top: 0; 368 | margin-bottom: 1.45rem; 369 | list-style-position: outside; 370 | list-style-image: none; 371 | } 372 | dl { 373 | margin-left: 0; 374 | margin-right: 0; 375 | margin-top: 0; 376 | padding-bottom: 0; 377 | padding-left: 0; 378 | padding-right: 0; 379 | padding-top: 0; 380 | margin-bottom: 1.45rem; 381 | } 382 | dd { 383 | margin-left: 0; 384 | margin-right: 0; 385 | margin-top: 0; 386 | padding-bottom: 0; 387 | padding-left: 0; 388 | padding-right: 0; 389 | padding-top: 0; 390 | margin-bottom: 1.45rem; 391 | } 392 | p { 393 | margin-left: 0; 394 | margin-right: 0; 395 | margin-top: 0; 396 | padding-bottom: 0; 397 | padding-left: 0; 398 | padding-right: 0; 399 | padding-top: 0; 400 | margin-bottom: 1.45rem; 401 | } 402 | pre { 403 | margin-left: 0; 404 | margin-right: 0; 405 | margin-top: 0; 406 | margin-bottom: 1.45rem; 407 | font-size: 0.85rem; 408 | line-height: 1.42; 409 | background: hsla(0, 0%, 0%, 0.04); 410 | border-radius: 3px; 411 | overflow: auto; 412 | word-wrap: normal; 413 | padding: 1.45rem; 414 | } 415 | table { 416 | margin-left: 0; 417 | margin-right: 0; 418 | margin-top: 0; 419 | padding-bottom: 0; 420 | padding-left: 0; 421 | padding-right: 0; 422 | padding-top: 0; 423 | margin-bottom: 1.45rem; 424 | font-size: 1rem; 425 | line-height: 1.45rem; 426 | border-collapse: collapse; 427 | width: 100%; 428 | } 429 | blockquote { 430 | margin-left: 1.45rem; 431 | margin-right: 1.45rem; 432 | margin-top: 0; 433 | padding-bottom: 0; 434 | padding-left: 0; 435 | padding-right: 0; 436 | padding-top: 0; 437 | margin-bottom: 1.45rem; 438 | } 439 | form { 440 | margin-left: 0; 441 | margin-right: 0; 442 | margin-top: 0; 443 | padding-bottom: 0; 444 | padding-left: 0; 445 | padding-right: 0; 446 | padding-top: 0; 447 | margin-bottom: 1.45rem; 448 | } 449 | noscript { 450 | margin-left: 0; 451 | margin-right: 0; 452 | margin-top: 0; 453 | padding-bottom: 0; 454 | padding-left: 0; 455 | padding-right: 0; 456 | padding-top: 0; 457 | margin-bottom: 1.45rem; 458 | } 459 | iframe { 460 | margin-left: 0; 461 | margin-right: 0; 462 | margin-top: 0; 463 | padding-bottom: 0; 464 | padding-left: 0; 465 | padding-right: 0; 466 | padding-top: 0; 467 | margin-bottom: 1.45rem; 468 | } 469 | address { 470 | margin-left: 0; 471 | margin-right: 0; 472 | margin-top: 0; 473 | padding-bottom: 0; 474 | padding-left: 0; 475 | padding-right: 0; 476 | padding-top: 0; 477 | margin-bottom: 1.45rem; 478 | } 479 | b { 480 | font-weight: bold; 481 | } 482 | strong { 483 | font-weight: bold; 484 | } 485 | dt { 486 | font-weight: bold; 487 | } 488 | th { 489 | font-weight: bold; 490 | } 491 | li { 492 | margin-bottom: calc(1.45rem / 2); 493 | } 494 | ol li { 495 | padding-left: 0; 496 | } 497 | ul li { 498 | padding-left: 0; 499 | } 500 | li > ol { 501 | margin-left: 1.45rem; 502 | margin-bottom: calc(1.45rem / 2); 503 | margin-top: calc(1.45rem / 2); 504 | } 505 | li > ul { 506 | margin-left: 1.45rem; 507 | margin-bottom: calc(1.45rem / 2); 508 | margin-top: calc(1.45rem / 2); 509 | } 510 | blockquote *:last-child { 511 | margin-bottom: 0; 512 | } 513 | li *:last-child { 514 | margin-bottom: 0; 515 | } 516 | p *:last-child { 517 | margin-bottom: 0; 518 | } 519 | li > p { 520 | margin-bottom: calc(1.45rem / 2); 521 | } 522 | code { 523 | font-size: 0.85rem; 524 | line-height: 1.45rem; 525 | } 526 | kbd { 527 | font-size: 0.85rem; 528 | line-height: 1.45rem; 529 | } 530 | samp { 531 | font-size: 0.85rem; 532 | line-height: 1.45rem; 533 | } 534 | abbr { 535 | border-bottom: 1px dotted hsla(0, 0%, 0%, 0.5); 536 | cursor: help; 537 | } 538 | acronym { 539 | border-bottom: 1px dotted hsla(0, 0%, 0%, 0.5); 540 | cursor: help; 541 | } 542 | thead { 543 | text-align: left; 544 | } 545 | td, 546 | th { 547 | text-align: left; 548 | border-bottom: 1px solid hsla(0, 0%, 0%, 0.12); 549 | font-feature-settings: "tnum"; 550 | -moz-font-feature-settings: "tnum"; 551 | -ms-font-feature-settings: "tnum"; 552 | -webkit-font-feature-settings: "tnum"; 553 | padding-left: 0.96667rem; 554 | padding-right: 0.96667rem; 555 | padding-top: 0.725rem; 556 | padding-bottom: calc(0.725rem - 1px); 557 | } 558 | th:first-child, 559 | td:first-child { 560 | padding-left: 0; 561 | } 562 | th:last-child, 563 | td:last-child { 564 | padding-right: 0; 565 | } 566 | tt, 567 | code { 568 | background-color: hsla(0, 0%, 0%, 0.04); 569 | border-radius: 3px; 570 | font-family: "SFMono-Regular", Consolas, "Roboto Mono", "Droid Sans Mono", 571 | "Liberation Mono", Menlo, Courier, monospace; 572 | padding: 0; 573 | padding-top: 0.2em; 574 | padding-bottom: 0.2em; 575 | } 576 | pre code { 577 | background: none; 578 | line-height: 1.42; 579 | } 580 | code:before, 581 | code:after, 582 | tt:before, 583 | tt:after { 584 | letter-spacing: -0.2em; 585 | content: " "; 586 | } 587 | pre code:before, 588 | pre code:after, 589 | pre tt:before, 590 | pre tt:after { 591 | content: ""; 592 | } 593 | @media only screen and (max-width: 480px) { 594 | html { 595 | font-size: 100%; 596 | } 597 | } 598 | -------------------------------------------------------------------------------- /src/components/layout.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Layout component that queries for data 3 | * with Gatsby's useStaticQuery component 4 | * 5 | * See: https://www.gatsbyjs.org/docs/use-static-query/ 6 | */ 7 | 8 | import React from "react" 9 | import PropTypes from "prop-types" 10 | import { useStaticQuery, graphql } from "gatsby" 11 | 12 | import Header from "./header" 13 | import "./layout.css" 14 | 15 | const Layout = ({ children }) => { 16 | const data = useStaticQuery(graphql` 17 | query SiteTitleQuery { 18 | site { 19 | siteMetadata { 20 | title 21 | } 22 | } 23 | } 24 | `) 25 | 26 | return ( 27 | <> 28 |
29 |
36 |
{children}
37 |
38 | © {new Date().getFullYear()}, Built with 39 | {` `} 40 | Gatsby 41 |
42 |
43 | 44 | ) 45 | } 46 | 47 | Layout.propTypes = { 48 | children: PropTypes.node.isRequired, 49 | } 50 | 51 | export default Layout 52 | -------------------------------------------------------------------------------- /src/components/seo.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SEO component that queries for data with 3 | * Gatsby's useStaticQuery React hook 4 | * 5 | * See: https://www.gatsbyjs.org/docs/use-static-query/ 6 | */ 7 | 8 | import React from "react" 9 | import PropTypes from "prop-types" 10 | import { Helmet } from "react-helmet" 11 | import { useStaticQuery, graphql } from "gatsby" 12 | 13 | function SEO({ description, lang, meta, title }) { 14 | const { site } = useStaticQuery( 15 | graphql` 16 | query { 17 | site { 18 | siteMetadata { 19 | title 20 | description 21 | author 22 | } 23 | } 24 | } 25 | ` 26 | ) 27 | 28 | const metaDescription = description || site.siteMetadata.description 29 | 30 | return ( 31 | 72 | ) 73 | } 74 | 75 | SEO.defaultProps = { 76 | lang: `en`, 77 | meta: [], 78 | description: ``, 79 | } 80 | 81 | SEO.propTypes = { 82 | description: PropTypes.string, 83 | lang: PropTypes.string, 84 | meta: PropTypes.arrayOf(PropTypes.object), 85 | title: PropTypes.string.isRequired, 86 | } 87 | 88 | export default SEO 89 | -------------------------------------------------------------------------------- /src/images/gatsby-astronaut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevsDO/whocode-frontend/f34902655b8b84f24050a8c85c1f6bbc0922baea/src/images/gatsby-astronaut.png -------------------------------------------------------------------------------- /src/images/gatsby-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevsDO/whocode-frontend/f34902655b8b84f24050a8c85c1f6bbc0922baea/src/images/gatsby-icon.png -------------------------------------------------------------------------------- /src/pages/404.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | 3 | import Layout from "../components/layout" 4 | import SEO from "../components/seo" 5 | 6 | const NotFoundPage = () => ( 7 | 8 | 9 |

NOT FOUND

10 |

You just hit a route that doesn't exist... the sadness.

11 |
12 | ) 13 | 14 | export default NotFoundPage 15 | -------------------------------------------------------------------------------- /src/pages/index.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import { Link } from "gatsby" 3 | 4 | import Layout from "../components/layout" 5 | import Image from "../components/image" 6 | import SEO from "../components/seo" 7 | 8 | const IndexPage = () => ( 9 | 10 | 11 |

Hi people

12 |

Welcome to your new Gatsby site.

13 |

Now go build something great.

14 |
15 | 16 |
17 | Go to page 2
18 | Go to "Using TypeScript" 19 |
20 | ) 21 | 22 | export default IndexPage 23 | -------------------------------------------------------------------------------- /src/pages/page-2.js: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import { Link } from "gatsby" 3 | 4 | import Layout from "../components/layout" 5 | import SEO from "../components/seo" 6 | 7 | const SecondPage = () => ( 8 | 9 | 10 |

Hi from the second page

11 |

Welcome to page 2

12 | Go back to the homepage 13 |
14 | ) 15 | 16 | export default SecondPage 17 | -------------------------------------------------------------------------------- /src/pages/using-typescript.tsx: -------------------------------------------------------------------------------- 1 | // If you don't want to use TypeScript you can delete this file! 2 | import React from "react" 3 | import { PageProps, Link, graphql } from "gatsby" 4 | 5 | import Layout from "../components/layout" 6 | import SEO from "../components/seo" 7 | 8 | type DataProps = { 9 | site: { 10 | buildTime: string 11 | } 12 | } 13 | 14 | const UsingTypescript: React.FC> = ({ data, path }) => ( 15 | 16 | 17 |

Gatsby supports TypeScript by default!

18 |

This means that you can create and write .ts/.tsx files for your pages, components etc. Please note that the gatsby-*.js files (like gatsby-node.js) currently don't support TypeScript yet.

19 |

For type checking you'll want to install typescript via npm and run tsc --init to create a .tsconfig file.

20 |

You're currently on the page "{path}" which was built on {data.site.buildTime}.

21 |

To learn more, head over to our documentation about TypeScript.

22 | Go back to the homepage 23 |
24 | ) 25 | 26 | export default UsingTypescript 27 | 28 | export const query = graphql` 29 | { 30 | site { 31 | buildTime(formatString: "YYYY-MM-DD hh:mm a z") 32 | } 33 | } 34 | ` 35 | -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevsDO/whocode-frontend/f34902655b8b84f24050a8c85c1f6bbc0922baea/static/favicon.ico --------------------------------------------------------------------------------