A personal website of Mohit Ahuja( forked from Richard's Nguyen and this is its source code. This website is written in Gatsby, React, Typescript and Styled-components.
Notes: Richard had open-sourced his website to share the structure, the configurations, and how he organizes all of those things. He hopes that it could help some people are having troubles in writing their very first sites (in Gatsby and stuff). However, the website is highly customized to match his desires, so it could be a little frustrating to modify the codes to your version. But he will be happy if you do so. Not only will you improve your coding skills but also respect him and what he's doing.
-
Clone the repository
git clone https://github.com/richardnguyen99/richardnguyen99.github.io # or # git clone https://github.com/ahujamoh/ahujamoh.github.io
-
Know the structure
Before getting your hands on, Richard would like to tell you more about how he organizes stuff. Richard only explains his stuff. Others can be seen at gatsby-starter-default
-
In the root directory:
-
.editorconfig: a set of consistent formatting styles for the whole project.
-
.eslintrc.js: a tool to check all Javascript errors and fix them.
-
.eslintignore: a list of files and folders that ESLint will ignore.
-
.huskyrc: a pre-commit hook script to prevent bad commits.
-
.lintstagedrc: a linter linting files on staged.
-
.stylelintrc: a tool like ESLint but for CSS.
-
tsconfig.json: a set of rules and configurations for Typescript compiler.
-
-
In the source directory:
-
@types/: customized type definitions.
-
components/: reusable components.
-
_contexts/__: React context (theme, languagues, etc.).
-
hooks/: customized React hooks.
-
**images/**: images for displaying content of the website.
-
**pages/**: contents will be displayed on the website
-
**utils/**: sets of tools to help in development process.
-
**types.ts**: list of types and interfaces.
-
-
-
Play around:
Install dependencies:
yarn install
Setup
yarn install dotenv # setup .env in root folder for GATSBY_GITHUB_KEY
Development:
yarn develop
Production:
yarn build
-
Deploy:
Currently, this website is being deployed to Netlify (free for static website), so the script yarn deploy
won't work properly (You can try if you still want to).
This is an open source code and you are responsible for securing your website, the authors are not responsible for your usage of the source code.
- Richard Nguyen: ORIGINAL author
- Mohit Ahuja: small contributor
If you found any problems or issues, please feel free to open a pull request to fix that. Mohit would be happy if there were someone improving the website with him. If a pull request is unnecessary, you contact him with:
- Github: https://github.com/ahujamoh
- Twitter: https://twitter.com/ahujamoh