Maintaining a website is free, educational, and fun. You’re in for a treat!
Step 1: Installation
I assume you’re using Windows. If you aren’t, just replace Scoop with your OS’s package manager.
Open your command prompt (
Windows key, type
Enter) and install Scoop –
powershell Set-ExecutionPolicy RemoteSigned -scope CurrentUser powershell iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
Use Scoop to install Git, Make, Ruby, and Wget, then configure your name and e-mail for Git.
scoop install git make ruby wget git config --global user.name "Your Name" git config --global user.email "Your E-mail"
Close and re-open the command prompt, then install Jekyll.
gem install jekyll
In this tutorial, we’re going to use a makefile. Here’s what it contains –
g: git add --all . git commit -m "New website commit." git push origin master l: jekyll build jekyll serve --incremental --port 8000
When placed in the directory containing your website, this will enable two commands –
make gwill push your website to Github Pages for public view.
make lwill run your website on your own computer at http://localhost:8000.
Step 2: Running Locally
Clone your theme, enter the new directory, download the makefile, and serve!
git clone "https://github.com/obaez/dentistsmile" cd dentistsmile wget "http://danielmoore.us/jekyll-tutorial/makefile" make l
Now visit http://localhost:8000. Voila!
make l failed, here’s a few trouble-shooting tips.
Google the error message and install any missing gems with
gem install <gem>.
Some Jekyll themes use Bundler, so if needed, run
gem install bundler, then
notepad makefileand edit to
bundle exec jekyll serve --incremental --port 8000.
notepad _config.ymland add the line
Step 3: Going Public
Create and sign into a Github account.
Create new repository
<your username>.github.io, then return to your command prompt.
Remove the existing local repository, start a new one, point it to Github, and push to remote.
rmdir /s /q .git git init git remote add origin "https://github.com/<username>/<username>.github.io" make g
Wait a minute, then visit
<your username>.github.io in a browser. Your website should be live! From now on, to update your public website, just run
(You can get Git to remember your Github credentials by running one of the commands here.)
Phew! That was a wild ride, but you now have your own website!
A few final tips –
You should develop for yourself locally by running
make land reserve
make gfor when you want to make changes public.
Jekyll was written by Tom Preston-Werner, the founder of Github. For a cool bit of history, check out his blog post announcing his invention.