Build a Personal Website in 2020
Tags: personal, website, developer, professional
Published: 2020-04-04 00:32:59

While you may still hand paper resumes to recruiters at conferences and job fairs, online recruiting is rampant in the tech field. Having a clean and modern personal website with  your projects and skills tells recruiters that you are both **technically capable** and know how to **market yourself**. Below is a tutorial on efficiently creating a personal website so that you have more time for practicing LeetCode :smile:.

## Table of Contents
1. Domain & Hosting
2. Website Layout
3. Content
4. Citations




## 1. **Domain & Hosting**

###Domain
If you want to have a clean link to your website such as [romanhuts.com](https://www.romanhuts.com), you need to buy and register a domain. There are a few key points you need to look out for when deciding to buy a domain:
- Whois Privacy (Hides the personal information that you need to enter to register a domain such as name and address from the public)
- Price (Buying a domain is like having a subscription, you usually pay a yearly amount)

[Namecheap](https://www.namecheap.com/) is a good option because of the fair price and included Whois Protection. I picked up a simple first name last name '.com' domain for $7.98 USD / year.

### Hosting
There are two types of websites, static and dynamic.
- A dynamic website can have code running on the server that allows you to do things such as work with databases to register users and handle shopping carts like [amazon.ca](https://www.amazon.ca)
- A static website displays the same content for everyone and can have some client side code to handle things like buttons and forms

Hence, a static site can satisfy the needs of a basic personal website. [GitHub Pages](https://pages.github.com/) provides free hosting for static websites and free SSL (HTTPS) certificates. SSL adds security, a nice lock icon next to your website in the address bar instead of a question mark, and ranks better in Google search results as of 2014 <sup>1</sup>.

![github pages](https://miro.medium.com/max/500/1*GCVYwFnJKmbmcgnTkGdPuA.jpeg)


GitHub pages has a great tutorial ([link](https://pages.github.com/)), in summary you want to:
1. Create a new repo named: `username.github.io`
1. Push your website's code to your repo (user pages are built from the master branch by default)
1. Tweak your GitHub Pages repo's settings
1. Observe your website at https://username.github.io or https://customdomain.com!

### More on Tweaking (step 3)

Head on over to your repository's settings and enable the "Enforce HTTPS" option:
![enforce https](https://dev-to-uploads.s3.amazonaws.com/i/1ydmvzxo3t2lztporr38.png)

If you want to make use of your purchased domain, you need to configure a custom domain for your GitHub Pages repository.
1. Push a `CNAME` file to the root of your repo that contains a single line with your purchased domain:
![cname file](https://dev-to-uploads.s3.amazonaws.com/i/6645oplh9rwcybkwlfth.png)
1. Make sure that the "Custom domain" field in your repo's settings contains your custom domain name:
![custom domain setting](https://dev-to-uploads.s3.amazonaws.com/i/lb3ama1u4l3esmlebka1.png)
1. Configure your domain with adress records that map the domain name that you purchased to the IP address of the server(s) at GitHub that are hosting your website <sup>2</sup>
- Usually these settings can be found on your domain provider's website under ```MyDomain > Manage / Advanced DNS > Host Records```. Once you find these settings, add the following server IP addresses:
![host records](https://dev-to-uploads.s3.amazonaws.com/i/kokmshhsubxroqvf3bgt.png)


## 2. **Website Layout**

Unless you are a UI/UX designer or a web developer looking to impress recruiters with your self-made website designs, finding a modern and elegant developer portfolio template will work great. Make sure to read the license of the template and attribute the author!

Searching GitHub repos for the `#portfolio-template` ([link](https://github.com/topics/portfolio-template)) topic yields some great results! Keep in mind that you want to look out for some key attributes:
- **Mobile responsiveness** so that your website looks as great on mobile as it does on standard desktop monitors
- **Customizability** so that your website can be tailored to you and will stand out from the rest
- **License** so that you do not infringe on any author's rights. MIT is a great license to look for since it allows you to do anything you want as long as you include the original copyright and license notice

## 3. **Content**

Once you have your website setup, it's time to customize your template and add in your information! A good idea is to include visuals of any cool projects that you have worked on, your previous work experience, and a way to demonstrate some of the skills that you have learned.

Make sure that your website is seen. Share it on social media, include it in your LinkedIn profile, add it to your resume, post it on your online profiles!

Customizing your website to reflect you is the part where your creativity will really show and where you should spend most of your time. Some interesting ideas might be to:
- Add visuals for your projects:
    ![plant buddy](https://dev-to-uploads.s3.amazonaws.com/i/hg8tvqbo49geffxjctj5.gif)
- Add a way to contact you with [Formspree](https://formspree.io/):
    ```javascript
<div id="contact-form">
        <form method="POST" action="https://formspree.io/YOUREMAIL">
            <input type="hidden" name="_subject" value="Contact request from personal website" />
            <input type="email" name="_replyto" placeholder="Your email" required>
            <textarea name="message" placeholder="Your message" required></textarea>
            <button type="submit">Send</button>
        </form>
    </div>
    ```
- Add Google Analytics to see how people are using your site:
    - Follow the google tutorial to setup your analytics ([link](https://analytics.google.com/analytics/academy/course/6))
    - Add in your google analytics code snippet to your site, which looks something like:
    ```javascript
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-YOURID-1">    </script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
    
      gtag('config', 'UA-YOURID-1');
    </script>
    ```
    - Get insights:
![sessions by country](https://dev-to-uploads.s3.amazonaws.com/i/8wtk0zpmzcnmv5b7o6hc.png)



### Citations
1. https://webmasters.googleblog.com/2014/08/https-as-ranking-signal.html
2. https://support.dnsimple.com/articles/a-record/