Adding Jekyll container which includes very basic starter content

This commit is contained in:
Geoff Bourne 2014-06-29 22:44:51 +00:00
parent e4418b3767
commit ebb4ee2214
11 changed files with 94 additions and 0 deletions

1
jekyll-github-pages/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/site

View File

@ -0,0 +1,22 @@
FROM ubuntu:trusty
MAINTAINER itzg
RUN apt-get update
RUN apt-get -y upgrade
RUN apt-get -y install ruby ruby-dev make patch
RUN gem install bundler
ADD Gemfile /tmp/Gemfile
WORKDIR /tmp
RUN bundle install
ADD template /site-template
VOLUME ["/site"]
EXPOSE 4000
ADD start.sh /start
CMD ["/start"]

View File

@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'github-pages'

View File

@ -0,0 +1,14 @@
This container is pre-configured according to the
[GitHub Pages use of Jekyll](https://help.github.com/articles/using-jekyll-with-pages).
It serves up the generated content on port 4000 and the site is generated from
the container's `/site` volume. You can either bring your own site content or
let it generate some VERY simple content along with the standard Jekyll directory
layout.
A typical way to run this:
docker run -it -p 4000:4000 -v $(pwd)/site:/site itzg/jekyll-github-pages
where either it will load your content or initialize the content under
`site` in your current working directory.

13
jekyll-github-pages/start.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
if [ `ls /site/index.* 2> /dev/null | wc -l` = 0 ]; then
echo "Preparing /site with default content..."
cp -r /site-template/* /site
fi
if [ ! -e /site/Gemfile ]; then
cp /tmp/Gemfile /site/Gemfile
fi
cd /site
bundle exec jekyll serve

View File

View File

@ -0,0 +1,3 @@
<footer>
<i>Goodbye</i>
</footer>

View File

@ -0,0 +1,3 @@
<header>
<h1>{{ page.title }}</h1>
</header>

View File

@ -0,0 +1,18 @@
<!doctype html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ page.title }}</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</head>

View File

@ -0,0 +1,12 @@
{% include top.html %}
<body>
{% include header.html %}
{{ content }}
{% include footer.html %}
</body>
</html>

View File

@ -0,0 +1,6 @@
---
layout: default
title: Powered by Jekyll
overview: true
---
This is where the content goes.