khanna98 / dev-portfolio

A single page portfolio website hosted on Netlify, made using React, SCSS and Font Awesome Icons.

Home Page:http://mayankkhanna.tk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mayank Khanna Developer Portfolio ⚡️

Website Pic

Table of Contents

Portfolio Sections

✔️ Summary and About me
✔️ Skills
✔️ Education
✔️ Work Experience
✔️ Open Source Projects Connected with Github
✔️ Big Projects
✔️ Achievements And Certifications 🏆
✔️ Blogs
✔️ Talks
✔️ Podcast
✔️ Contact me
✔️ Twitter Timeline
✔️ Github Profile

To view a live example, click here.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

You'll need Git and Node.js (which comes with npm) installed on your computer or use Docker.

node@v10.16.0 or higher
npm@6.9.0 or higher
git@2.17.1 or higher

Docker Commands

1) BUILD IMAGE : docker build -t developerfolio:latest .
2) RUN IMAGE: docker run -t -p 3000:3000 developerfolio:latest

How To Use

From your command line, clone and run developerFolio:

# Clone this repository
git clone https://github.com/khanna98/dev-portfolio

# Go into the repository
cd dev-portfolio

# Setup default environment variables

# For Linux
cp env.example .env
# For Windows
copy env.example .env

# Install dependencies
npm install

# Start a local dev server
npm start

Linking Portfolio to Github

Generate a Github personal access token following these instructions (make sure you don't select any scope just generate a simple token). If you are using Github Actions to deploy your portfolio you can skip this section.

  1. Create a file called .env in the root directory of your project (if not done already in section: How To Use)

Note: Configuring environment variables before deploying your portfolio is highly recommended as some components depend on API data.

- dev-portfolio
  - node_modules
  - public
  - src
  - .env         <-- create it here
  - env.example  <-- this is the base file
  - .gitignore
  - package-lock.json
  - package.json
  1. Inside the .env file, add key REACT_APP_GITHUB_TOKEN and assign your github token like this, also add your username as GITHUB_USERNAME
// .env
REACT_APP_GITHUB_TOKEN = "YOUR GITHUB TOKEN HERE"
GITHUB_USERNAME = "YOUR GITHUB USERNAME"

Set showGithubProfile to true or false to show Contact Profile using Github, defaults to false.

Warning: Treat your tokens like passwords and keep them secret. When working with the API, use tokens as environment variables instead of hardcoding them into your programs.

Deployment

When you are done with the setup, you should host your website online. We highly recommend to read through the Deploying on Github Pages docs for React.

Configuring GitHub Actions (Recommended)

First you should enable, Github Actions for the repository you use.

The Profile and the Repository information from Github is only created at the time of deploy and the site needs to be redeployed if those information needs to be updated. So, a configurable CRON Job is setup which deploys your site every week, so that once you update your profile on Github it is shown on your portfolio. You can also trigger it manually using workflow_dispatch event, see this guide on how to do that.

Deploying to Github Pages

This section guides you to deploy your portfolio on Github pages.

  • Navigate to package.json and enter your domain name instead of https://developerfolio.js.org/ in homepage variable. For example, if you want your site to be https://<your-username>.github.io/developerFolio, add the same to the homepage section of package.json.

  • In short you can also add /devloperFolio to package.json as both are exactly same. Upon doing so, you tell create-react-app to add the path assets accordingly.

  • Optionally, configure the domain. You can configure a custom domain with GitHub Pages by adding a CNAME file to the public/ folder.

  • Follow through the guide to setup GitHub pages from the official CRA docs here.

Deploying to Netlify

You could also host directly with Netlify by linking your own repository.

Deploy To Netlify

For more information, read hosting on Netlify.

Technologies Used

Illustrations


About

A single page portfolio website hosted on Netlify, made using React, SCSS and Font Awesome Icons.

http://mayankkhanna.tk

License:GNU General Public License v3.0


Languages

Language:JavaScript 62.1%Language:SCSS 33.5%Language:HTML 3.2%Language:CSS 0.6%Language:Dockerfile 0.5%