This repo serves as a template to help you get started making a personal/resume webstie. The template uses React/Next.js which is a static site generator to create a static website meant to be hosted in a cloud provider such as AWS.
React is a Javascript/Typescript web development framework developed by Facebook that makes development of interactive and stateful components simple. It is a component driven framework that focuses on encapsulating state at the component level and stitching them together to create complex UIs.
Next.js is a static site generator built using React. While it has the base functionality and features of React, Next.js provides additional features such as static, server, or hybrid (static & server) rendering to fit whatever your needs are.
-
Install Node -> 14.17.0
-
Create a new repository using this template
-
Clone your newly created repo
# Replace <personal-access-token> with your GitHub personal access token git clone https://<personal-access-token>@github.com/<owner-name>/<repo-name>.git
-
Run the website locally
I.Install Dependencies
yarn
II. Run the website locally
yarn dev
III. Build & Serve (Builds site statically and serves it locally)
yarn start
IV: Run Linter
yarn lint
V: For additional
yarnscripts, checkoutpackage.json -
Create a new branch off of
mainintended to be thedevbranchI. Can be done via github.com or cli
# Git CLI # Create new branch, replace <branch-name> with the name of the branch git checkout -b <branch-name>
-
Update the
siteUrlinsitemap.config.jsto your website's url
Basic usage of terraform
-
Initialize the Terraform
terraform init
-
Validate
terraform validate
-
Plan
terraform plan -out=plan.tfplan
-
Apply
terraform apply plan.tfplan
Other useful commands when using Terraform
Format
terraform fmt -recursiveThis template requires the addition of three secrets within GitHub in order to auto deploy the site to S3 and Cloudfront.
AWS_ACCESS_KEY_ID-> Value of your AWS access key idAWS_SECRET_ACCESS_KEY-> Value of your AWS secret access keyCLOUDFRONT_DISTRIBUTION_ID-> Value of the Cloudfront distribution you are deploying to
.github/workflows- contains GitHub Action workflowsci- files to be moved to.github/workflowsthen to be removedpublic- public files of your websiteimages- contains static images of the sitefavicon.ico- favicon of the site
src- source code for the sitecomponents- general componentslayouts- general page layoutslib- contains types and generic/shared codepages- pages of the sitestyles- contains.scssfiles and fonts
.eslintignore- specifies files or folders for eslint to ignore.eslintrc.yml- eslint confignext.config.js- next.js configsitemap.config.js- config for generating a sitemap - reference