Create, customize and deploy your own portfolio website in minutes. ✨
In this template repository we have the development environment and base set and ready to go. So that you can immediately launch the Codespace to customize with no setup.
In this “choose your own adventure” template portfolio, we have a React based web application ready for you to easily customize and deploy using only your web browser.

This repo is a GitHub template to build a JavaScript personal portfolio frontend web application using the React framework. The goal is to give you a template to you can immediately utilize to create your own website through Codespaces.
The repo contains the following:
/.devcontainer
.devcontainer/Dockerfile: Configuration file used by Codespaces to determine operating system and other details..devcontainer/devcontainer.json: Configuration file used by Codespaces to configure Visual Studio Code settings, such as the enabling of additional extensions./src: HTML, JS and CSS files used to build your portfolio site..eslintrc: Settings for ESLint</a> that is included for code consistency and quality..prettierrc: Settings for Prettier that is used to format code.package.json and package-lock.json: Defines the project information for Node.js</a>, dependent packages and the versions needed of each.This portfolio site project is filled with sample data so that you can immediately open Codespaces, see it running, and deploy at any point.
Your development environment is all set for you to start. Based on our JavaScript Codespace Template (React), here is what s already setup and ready for you to use:
Under the repository name, use the Code drop-down menu, and in the Codespaces tab, select “Create codespace on main”.

Wait as GitHub initializes the Codespace.

When complete you will see your Codespace load with a terminal section at the bottom. Here you will see npm install executing. When complete you will return to the terminal prompt where you can run the web application by executing: npm run start
When the web application is started you will see a prompt telling you it started successfully on port 1234, and you can open that site within your browser:

This project is built to be easily customizable. Each section of the site is a separate component, and your information needs to be set in only one spot. This is not only for ease of updating, but so you can see how prop values are passed to React components.
For each step, open the project in Codespaces, then you can make and commit your changes while within your Codespace.
See Using source control in your codespace for more Codespaces source control how-tos
Within App.jsx you will see a variable called siteProps. This is a JavaScript object that hold the key value pairs needed to customize your name, title, email, and social accounts.
const siteProps = {
name: "Alexandrie Grenier",
title: "Web Designer & Content Creator",
email: "[email protected]",
gitHub: "microsoft",
instagram: "microsoft",
linkedIn: "satyanadella",
medium: "",
twitter: "microsoft",
youTube: "microsoft",
};
Update to the name and title you’d like displayed at the top of your site.
Optional values are email address and social accounts. These are used in the Footer component. If any item is not included in the list or set to an empty string (“”) it will not display the icon and link.
This portfolio site includes 3 images: top section background, “About me” background and portfolio section (desk). These can be any landscape sized images of your choosing from your own collection, or found that have a license allowing you to use without attribution.
A couple possible sites to find photos are Pixabay and Unsplash. Photos, illustrations, vectors, your choice! When you find your images, save each one to /src/images with a short, meaningful file name.
Go to the following components to update the import image... line to reference the new image you downloaded for that section, as well as the imageAltText for the image:
Home.jsx - section at top of the page, main image you will see when site loads (woman standing by server wall in sample)
import image from "../images/server-wall.jpg";
const imageAltText = "woman holding laptop standing by server room with glass wall";
About.jsx - background behind the detailed “about me” section (abstract mosaic in sample)
import image from "../images/mosaic.svg";
const imageAltText = "purple and blue abstract background";
Portfolio.jsx- image highted in left hand side of section (design desk photo in sample)
import image from "../images/design-desk.jpeg";
const imageAltText = "desktop with books and laptop";
The about section helps to give people a bit more information about your skills and passions. Within About.jsx you will find 2 values to update:
description: short sentence or two describing yourself, career goal, and/or passionsskillsList: an array of your skills to list on the site, can be as many or little as you wishdetailOrQuote: longer block for you to add more detail about yourself, or even a quote you likeThe second section to update is portfolio, where you highlight items you’ve worked on. These would be articles, videos, logo designs, GitHub projects, anything that highlights you!
Go to Portfolio.jsx to the projectList variable. This is a JavaScript array of objects. Each item you want to highlight needs: title, description, and URL.
The sample design has 4, but the number you include is up to you.
const projectList = [
{
title: "10 Things to know about Azure Static Web Apps 🎉",
description: "Collaboration to create a beginner friendly....",
url: "https://dev.to/azure/10-things-to-know-about-azure-static-web-apps-3n4i",
},
{
title: "Web Development for Beginners",
description: "Contributed sketch note imagery to accompany...",
url: "https://github.com/microsoft/web-dev-for-beginners",
},
{
title: "My Resume Site",
description: "Created from Microsoft's resume workshop...",
url: "https://github.com/microsoft/workshop-library/tree/main/full/build-resume-website",
},
{
title: "GitHub Codespaces and GitHub.dev",
description: "Video interview to explain when to use GitHub.dev...",
url: "https://www.youtube.com/watch?v=c3hHhRME_XI",
},
];
Project includes the setup needed for you to deploy free to both Azure Static Web Apps and GitHub Pages</a>.
Azure Static Web Apps is Microsoft’s hosting solution for static sites (or sites that are rendered in the user’s browser, not on a server) through Azure. This service provides additional opportunities to expand your site through Azure Functions, authentication, staging versions and more.
You’ll need both Azure and GitHub accounts to deploy your web application. If you don’t yet have an Azure account you can create it from within during the deploy process, or from below links:
With your project open in Codespaces:
/dist
🤩 Bonus: Setup a custom domain for your Azure Static Web App
GitHub Pages allows you to host websites directly from your GitHub repository. This project is already set up for you to get your portfolio deployed to GitHub pages with minimal steps.
With your project open in Codespaces:
package.json and update the following values:
http://{github-username}.github.io/{repo-name}, where github-username is your GitHub username and repo-name is the what you named this portfolio repo when you created itgithub-username with your GitHub username and repo-name with the repository namepackage.json to your GitHub remote repo.ctrl + shift + ` (or open top left menu, select “Terminal” and “New Terminal”)npm run deploy. This will first run the pre-deploy script to build the project, followed by the deploy script that will push those bundled files to a new branch on your repo (gh-pages) that will be used for you GitHub Pages site.
Below are 4 additional ways you can continue to customize your portfolio site and learn some Codespaces, CSS, HTML and JavaScript along the way.
Your environment comes with preinstalled extensions. You can change which extensions your Codespaces environment starts with, here’s how:
Open file .devcontainer/devcontainer.json and locate the following JSON element extensions
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"ms-vscode.azure-account",
"ms-azuretools.vscode-azurestaticwebapps"
]
Let’s add the indent-rainbow extension. To do this, go to the extensions list and add:
"oderwat.indent-rainbow"
What you did above was to add the unique identifier of an extension of the indent-rainbow. This will let Codespaces know that this extension should be pre-installed upon startup.
To find the unique identifier of an extension:
💡 Learn more here, https://docs.github.com/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account
In your site header you have links to each section below. Click one of these links and watch it scroll the page to that section. Not really a scroll, right?
Let’s make this a better user experience by slowing that down so the user has a sense of what is happening, and where they are navigating to on the page.
styles.css, which is the stylesheet for your portfolio application. We need to add a style for html. If you look, you’ll see right now html and body styles are being set together, so let’s add the following css snippet to set the scrolling for the html element:
html {
scroll-behavior: smooth;
}
Your site should already be running in your Codespace, and the change will reload onto the page automatically. Click a link in the top header to see the smooth scroll in action.
Animations are a way you can easily add some motion to elements on your page to increase user interactivity and highlight items you want to make sure they notice. Let’s animate the desk photo in the portfolio section.
styles.css within your Codespace. Add the animation sequence by adding a @keyframes definition to slide in from the left:
@keyframes slideInLeft {
0% {
transform: translateX(-100%);
}
100% {
transform: translateX(0);
}
}
slideInLeft animation sequence we can tell our desk photo to animate itself with that sequence. Open Portfolio.jsx and locate the img tag. You will see it utilizes inline CSS to set it’s styling. Within it’s style definition add the following:
animation: "1s ease-out 0s 1 slideInLeft";
Your image tag should look something like:
<img src={image} style= />
Your site should already be running in your Codespace, and the change will reload onto the page automatically. Scroll up and down the page and watch your desk photo slide onto the page.
🤩 Bonus: Animate scroll down arrow
We started you off with a few basic sections for your portfolio site, but you have creative freedom to make it your own and add new sections relevant to what you want on your site.
For an example, let’s add an education section to your portfolio site.
Create a new component for the section within the Components folder. Add a new file called Education.jsx.
Education.jsx add the component function, export and information you’d like to include:
import React from "react";
const Education = () => {
return(
<section className="light" id="portfolio">
<h2>Education</h2>
</section>
)
}
export default Education;
App.jsx import your new Education component at the top by adding the following:
import Footer from "./Components/Footer";
Education component where you would like it to render within the page by inserting:
<Education />
In your Codespace, your portfolio application should be running and will reload your site with the changes.
Codespaces Browser App
If you are using Edge or Chrome you will see an option to install the Codespaces app when you launch your Codespace. The Codespaces app lets you launch your Codespace within the app so you can work outside of the browser. Look for the app icon and install pop-up to try it out.
Help us make this template repository better by letting us know and opening an issue!.