Creating a personal website is a great way to showcase your portfolio, blog, or resume. Jekyll, a static site generator, makes it easy to build fast and secure websites. In this article, we will explore how to build a personal website using Jekyll and set up a custom domain for a professional touch.
Getting Started with Jekyll
First, ensure you have Ruby installed on your computer. Jekyll runs on Ruby, so it's a necessary prerequisite. You can check if Ruby is installed by running ruby -v in your terminal. If not, download and install Ruby from the official website.
Next, install Jekyll and Bundler by running:
gem install jekyll bundler
Once installed, create a new Jekyll site with:
jekyll new mywebsite
Navigate into your site folder:
cd mywebsite
Start the local server with:
bundle exec jekyll serve
You can now view your website at http://localhost:4000.
Customizing Your Website
Customize your site by editing the files in the _config.yml and index.md. Add your own content, images, and styles to make the website uniquely yours. Jekyll uses Markdown for content, making it easy to format text.
Setting Up a Custom Domain
To give your website a professional appearance, you can set up a custom domain. Purchase a domain from providers like Namecheap or GoDaddy. Then, configure your DNS settings to point to your hosting provider or GitHub Pages if you're hosting there.
If hosting on GitHub Pages, create a CNAME file in your repository with your domain name. Update your DNS records with an A record pointing to GitHub's IP addresses or a CNAME record pointing to your GitHub username.
Deploying Your Website
Once your domain is configured, deploy your Jekyll site. You can host it on GitHub Pages for free. Push your code to a GitHub repository, enable GitHub Pages in the repository settings, and select the branch to publish from.
After deployment, your website will be accessible via your custom domain, providing a professional online presence.