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 [email protected]: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.
githubusername.github.io
.git clone [email protected]:ndarville/jekyll-boilerplate.git
.cd jekyll-boilerplate
..lock
files.Gemfile.github-pages
; you won't be needing this.bundle install
.githubusername.github.io
.For an example project, visit my GitHub site.
CNAME
file in root with the line githubusername.github.io
.For an example of a GitHub-hosted site with a custom domain, see my Hafnia Times project.
Clone the boilerplate with git clone [email protected]:ndarville/jekyll-boilerplate.git
.
cd jekyll-boilerplate
.
Delete both .lock
files.
Delete Gemfile
and rename Gemfile.github-pages
to Gemfile
.
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, use s3_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.
s3_website
Gem Is Out of Date, Dudeski”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.