A template for building a static website with the Ruby CMS Jekyll, as well as a project-directory template for how I, @ndarville, aim to start on each project.
Assuming Ruby and Git are installed:
git clone git@github.com:ndarville/jekyll-boilerplate.git
cd jekyll-boilerplate
bundle install
bundle exec jekyll serve --watch
This creates a _site/
folder and starts a localhost:4000
server.
- Create a GitHub repo with the name
githubusername.github.io
. - Clone the boilerplate with
git clone git@github.com:ndarville/jekyll-boilerplate.git
. cd jekyll-boilerplate
.- Delete both
.lock
files. - Delete
Gemfile.github-pages
; you won't be needing this. bundle install
.- Push your new site to
githubusername.github.io
. - Done! For more, see the official GitHub Pages site.
For an example project, visit my GitHub site.
- Create a
CNAME
file in root with the linegithubusername.github.io
. - Configure DNS using this guide by GitHub.
For an example of a GitHub-hosted site with a custom domain, see my Hafnia Times project.
-
Clone the boilerplate with
git clone git@github.com:ndarville/jekyll-boilerplate.git
. -
cd jekyll-boilerplate
. -
Delete both
.lock
files. -
Delete
Gemfile
and renameGemfile.github-pages
toGemfile
. -
bundle install
-
Build your site with
bundle exec jekyll build
. -
Rename
_s3_website.yml
by removing the prepended underscore. -
Enter your AWS credentials in
s3_website.yml
. -
s3_website cfg apply
will configure AWS. -
You can say
[y]es
to setting up CloudFront, if you want. You can just type[n]o
for now. -
Push your built site to AWS with
s3_website push
.s3_website
automatically recognizes the folder_site
and deploys it. If you want to push a folder with a different name, uses3_website push --site="yourfoldername"
. -
Done!
From now on, just use s3_website push
to deploy your changes. For more info on using s3_website
, consult its docs.
Page files are in Markdown, .markdown. They are viewable in any text editor, but try out Mou if you want to see the rendered version.
As usual, you can update your style.css
with the changes to style.scss
by running sass --watch style.scss:style.css
in static/css/
.
Leave feedback and questions in Issues, if you want.
The boilerplate comes with its own Travis CI configuration. It would be silly not to use it. See what it does for this repo over here.
I know. The reason is that versions from 2.0
require Java, and I know I personally don’t want anything to do with Java, if I can help it.
MIT License.