Source code for my Jekyll-based portfolio at billmartin.io, which uses the Freelancer Jekyll Theme with my own additions and modifications.
Demo: bill-c-martin.github.com
Requires no servers or hosting, and runs straight from your GitHub repo.
- Fork this repo to your own Github, with name:
your-github-username.github.io
- Open your new repo's settings, and enable Github Pages
- Go to https://your-github-username.github.io
-
Clone the above repo, which you forked, to your localhost
-
Install
ruby-2.7
andrubygems-2.7
. Despite what Jekyll's docs say, you have to install Ruby2.7.*
, otherwise you will get a pathutil error in the next step. -
Install jekyll packages inside this repo:
cd /path/to/your-github-username.github.io/
gem install jekyll bundler
bundle-2.7 install
- Start the web server:
bundle-2.7 exec jekyll serve
- Go to http://localhost:4000 and verify it runs locally.
The localhost site will show changes in real time.
If you modify _config.yml
though, you'll need to ctrl+c
and restart the web server.
Pipe any variable into debug
from any template to see its contents on screen.
Example: Printing entire _config.yml structure:
{{ site | debug }}
Example: Printing blog post attribute from inside a for loop in blog_grid.html
:
{{ post | debug }}
Once up and running locally, configure and personalize your portfolio.
- Overwrite profile picture in
img/profile.jpg
(used on home page) andimg/profile32x32.png
(used on blog posts) - Fill out everything in
_config.yml
- Create new posts to display your projects & blog posts. See existing examples in
_posts/blog/
and_posts/portfolio/
Formspree will receive POST requests from your contact form, and forward them to your email. Without requiring server-side code.
- Replace
you@email.com
in_includes/contact_static.html
with your email address - Setup a formspree account for your email address
Disqus will receive POST requests from your blog post's comment forms, display comments dynamically, and also deal with spam. Without requiring server-side code.
- Setup a Disqus account
- Add your
disqus_shortname
in_config.yml
- Push above code changes on
master
branch to remote - Go to https://your-github-username.github.io
These are some recommended steps for final polishing.
- Create a Google Analytics site/property
- Enter your
google_analytics_tracker_id
in_config.yml
- Create a Google Tag Manager](https://tagmanager.google.com/) container
- Enter your
gtm_id
in_config.yml
If you go this route, you can setup a GA4 tag through GTM, and forego the above "Google Analytics Setup" route.
Instead of using the default https://your-github-username.github.io Github Pages URL, you can instead use your own custom domain name that you already own.
You can alias a custom domain name to your https://your-github-username.github.io Github Pages URL. See Github's documentation on this.
However, you will usually have to manage and pay for an SSL certificates through your domain registrar.
You can instead use Netlify for all of this, for free.
Netlify is a free service that provides CDN, SSL certs, deployment pipelines, and even dynamic serverless functions.
- Create a Netlify account
- Setup your custom domain to route through Netlify, and from Netlify to your repo
- Setup a Netlify SSL cert