diff --git a/.gitignore b/.gitignore index 45c1505..867d379 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ -_site +*.gem +.bundle .sass-cache -.jekyll-metadata +_site +Gemfile.lock diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..bb94df8 --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +# frozen_string_literal: true + +source "https://rubygems.org" +gemspec diff --git a/LICENSE b/LICENSE index ac9e0d8..c7dc8ee 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2016 Chester How +Copyright (c) 2018 Chester How Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 1c87aad..e65de60 100644 --- a/README.md +++ b/README.md @@ -4,34 +4,63 @@ Tale is a minimal Jekyll theme curated for storytellers. Checkout the demo [here ![Tale screenshot](http://i.imgur.com/pXZrtmo.png) ## Features +- Easy installation - Compatible with GitHub Pages - Responsive design (looks just as good on mobile) - Syntax highlighting, with the help of Pygments - Markdown and HTML text formatting - Pagination of posts +## Installation +### As a Jekyll theme +1. Add this line to your `Gemfile`: + +```ruby +gem "tale" +``` + +2. In `_config.yml` replace the `minima` theme with `tale`: + +```yaml +theme: tale +``` + +3. Install the theme's gems and dependencies: + +```bash +$ bundle +``` + +4. Rename `index.md` to `index.html`. Without this, the `jekyll-paginate` gem will not work. + +5. Add these 2 lines in to `_config.yml`: + +```yaml +permalink: /:year-:month-:day/:title +paginate: 5 +``` + +### As a Fork +1. Fork this repository + +2. Delete the unnecessary files/folders: `CODE_OF_CONDUCT.md`, `LICENSE`, `README.md`, `tale.gemspec` + +3. Delete the `baseurl` line in `_config.yml`: + +```yaml +baseurl: "/tale" # delete this line +``` + ## Usage -### 1. Fork and Clone -Fork this repository then clone it. +Once you've installed the theme, you're ready to work on your Jekyll site. To start off, I would recommend updating `_config.yml` with your site's details. -### 2. Install dependencies -Tale uses Jekyll's built-SCSS compiler to generate CSS. You'll need to install the Jekyll gem: +To build and serve your site, run: ```bash -$ gem install jekyll +$ bundle exec jekyll serve ``` -### 3. Create your site -Edit the `_config.yml` file to suit your site. Also replace posts and content with your own. - -### 4. Running Locally -To test your site locally, run this in your site's root directory - -```bash -$ jekyll serve --watch -``` - -Head to http://localhost:4000/tale/ to see your site in action. +And you're all set! Head over to http://127.0.0.1:4000/ to see your site in action. ## Contributing Found a bug or have a suggestion? Feel free to create an issue or make a pull request! diff --git a/_config.yml b/_config.yml index f8395f6..3a6a8aa 100644 --- a/_config.yml +++ b/_config.yml @@ -1,31 +1,28 @@ -# Permalinks -permalink: /:year-:month-:day/:title - -# Setup +# Site settings title: Tale -paginate: 5 +description: "Minimal Jekyll theme for storytellers" baseurl: "/tale" url: "https://chesterhow.github.io" +# Author +author: + name: Chester How + url: https://chester.how + email: chesterhow@gmail.com + +# Build settings +markdown: kramdown +theme: tale + # Assets sass: sass_dir: _sass - style: :compressed - -# Build settings -markdown: kramdown - -# About -author: - name: Chester How - url: http://chester.how - email: chesterhow@gmail.com - -# Custom vars -version: 3.4.1 -github: - repo: https://github.com/chesterhow/tale + style: compressed # Gems plugins: - jekyll-paginate + +# Permalinks +permalink: /:year-:month-:day/:title +paginate: 5 diff --git a/_includes/head.html b/_includes/head.html index bd096e8..33d7680 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -11,11 +11,11 @@ - + - - - + + + diff --git a/_layouts/home.html b/_layouts/home.html new file mode 100644 index 0000000..e7c08d6 --- /dev/null +++ b/_layouts/home.html @@ -0,0 +1,31 @@ +--- +layout: default +--- + +
+ {{ post.content | truncatewords: 30 | strip_html }} +
+ +- {{ post.content | truncatewords: 30 | strip_html }} -
- -