Skip to content

Latest commit

 

History

History
126 lines (78 loc) · 7.48 KB

SITE_README.md

File metadata and controls

126 lines (78 loc) · 7.48 KB

rickkln

Rick Kleinhans' Personal Site

My name is Rick, and I make things. Like this personal website, rickkln.com, where you can find some more information about me.

I've open sourced the code for this website in the event that anyone else wants to use it as a starter for their personal site. The site runs Gatsby, and my version is hosted on Firebase, though you can host yours anywhere. The site is based on the default Gatsby starter.

🔃 Comparison with the default Gatsby starter

  1. TypeScript is used for a better developer experience.

  2. ESLint and the AirBnB TypeScript style guide help you avoid, and fix, simple issues in your code.

  3. The default Gatsby formating tool, Prettier, has been removed in order to avoid conflicts with the ESLint + AirBnB TypeScript tools described above.

  4. Firebase Hosting is supported and configured for Gatsby from the start.

🚀 Quick start

  1. Fork or clone this repository.

    Use the fork button on the Github repository, or clone the repo as follows:

    # Clone the repo
    git clone https://github.com/rickkln/rickkln.git my-new-site
  2. Navigate into the cloned folder.

    Navigate into your new site’s directory and start it up:

    cd my-new-site/
    gatsby develop
  3. Open the source code and start editing.

    Your site is now running at http://localhost:8000!

    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.

    Open the my-new-site directory in your code editor of choice and edit src/pages/index.tsx. Save your changes and the browser will update in real time!

  4. Deploy your new site!

    Once you are ready to deploy your changes you can do so using Firebase, or your hosting provider of choice. If you choose to go with firebase you can use the default configuration in the project.

    Simply follow the instructions on the Firebase website to initialize and connect the firebase CLI.

    Once Firebase CLI is connected to your Firebase project you are ready to deploy:

    # To build the Gatsby site and deploy to Firebase hosting in one go
    npm run deploy

🧐 What's inside?

A quick look at the top-level files and directories you'll see in this project.

.
├── node_modules
├── src
├── .eslintrc.js
├── .gitignore
├── firebase.json
├── gatsby-browser.js
├── gatsby-config.js
├── gatsby-node.js
├── gatsby-ssr.js
├── LICENSE.md
├── package-lock.json
├── package.json
├── README.md
└── tsconfig.json
  1. /node_modules: This directory contains all of the modules of code that your project depends on (npm packages) are automatically installed.

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

  3. .eslintrc.js: This is a configuration file for ESLint. ESLint is a tool to help you avoid and fix simple issues in your code.

  4. .gitignore: This file tells git which files it should not track / not maintain a version history for.

  5. firebase.json: This is a configuration file that lists your Firebase project configuration. Learn more about this file in the Firebase docs.

  6. gatsby-browser.js: This file is where Gatsby expects to find any usage of the Gatsby browser APIs (if any). These allow customization/extension of default Gatsby settings affecting the browser.

  7. 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 for more detail).

  8. gatsby-node.js: This file is where Gatsby expects to find any usage of the Gatsby Node APIs (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process.

  9. gatsby-ssr.js: This file is where Gatsby expects to find any usage of the Gatsby server-side rendering APIs (if any). These allow customization of default Gatsby settings affecting server-side rendering.

  10. LICENSE.md: Gatsby itself, the primary dependency of this project is licensed under the MIT license, however the original code in this project is licensed under the Mozilla Public License 2.0.

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

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

  13. README.md: This text file, which contains useful reference information about your project.

  14. tsconfig.json: This is a configuration file for TypeScript. The tsconfig.json file specifies the root files and the compiler options required for the TypeScript compiler to compile the project. More details are available in the TypeScript docs.

🎓 Need some help with Gatsby?

While you're welcome to fork and use this code, as per the license below, I don't have time to help you fix issues. If you are looking for more guidance you can use the official documentation for Gatsby. Here are some useful places to start:

  • The official in-depth tutorial for creating a site with Gatsby. It starts with zero assumptions about your level of ability and walks through every step of the process.

  • The Gatsby code samples. In particular, check out the Guides, API Reference, and Advanced Tutorials sections in the sidebar.

  • The documentation on the TypeScript Plugin. This is specifically useful if you are forking this project, as it uses TypeScript.

📝 License

The original code in this repo is licensed under the Mozilla Public License 2.0. For more information view the LICENSE file.