Skip to content

Commit

Permalink
Convert theme to gem
Browse files Browse the repository at this point in the history
  • Loading branch information
chesterhow committed Jan 8, 2018
1 parent bdcc4d5 commit f4daf4e
Show file tree
Hide file tree
Showing 18 changed files with 125 additions and 35 deletions.
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# frozen_string_literal: true

source "https://rubygems.org"
gemspec
62 changes: 62 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
PATH
remote: .
specs:
tale (0.1.0)
jekyll (~> 3.6)
jekyll-paginate (~> 1.1)

GEM
remote: https://rubygems.org/
specs:
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
colorator (1.1.0)
ffi (1.9.18)
forwardable-extended (2.6.0)
jekyll (3.6.0)
addressable (~> 2.4)
colorator (~> 1.0)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.14)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 3)
safe_yaml (~> 1.0)
jekyll-paginate (1.1.0)
jekyll-sass-converter (1.5.0)
sass (~> 3.4)
jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1)
kramdown (1.15.0)
liquid (4.0.0)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
mercenary (0.3.6)
pathutil (0.16.0)
forwardable-extended (~> 2.6)
public_suffix (3.0.0)
rake (10.4.2)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rouge (2.2.1)
safe_yaml (1.0.4)
sass (3.5.2)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)

PLATFORMS
ruby

DEPENDENCIES
bundler (~> 1.12)
rake (~> 10.0)
tale!

BUNDLED WITH
1.14.6
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,35 @@ 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

## Usage
### 1. Fork and Clone
Fork this repository then clone it.
## Installation

### 2. Install dependencies
Tale uses Jekyll's built-SCSS compiler to generate CSS. You'll need to install the Jekyll gem:
1. Add this line to your `Gemfile`:

```bash
$ gem install jekyll
```ruby
gem "tale"
```

### 3. Create your site
Edit the `_config.yml` file to suit your site. Also replace posts and content with your own.
2. And add this line to your `_config.yml`:

### 4. Running Locally
To test your site locally, run this in your site's root directory

```bash
$ jekyll serve --watch
```yaml
theme: tale
```
3. Install the theme's gems and dependencies:
$ bundle
4. Finally, build and serve your site
$ bundle exec jekyll serve
Head to http://localhost:4000/tale/ to see your site in action.
## Contributing
Expand Down
8 changes: 5 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ baseurl: "/tale"
url: "https://chesterhow.github.io"

# Assets
sass:
sass_dir: _sass
style: :compressed
# sass:
# sass_dir: _sass
# style: :compressed

# Build settings
markdown: kramdown
Expand All @@ -29,3 +29,5 @@ github:
# Gems
plugins:
- jekyll-paginate

theme: tale
8 changes: 4 additions & 4 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
</title>

<!-- CSS -->
<link rel="stylesheet" href="{{ site.baseurl }}/styles.css">
<link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Libre+Baskerville:400,400i,700">

<!-- Favicon -->
<link rel="icon" type="image/png" sizes="32x32" href="{{ site.baseurl }}/assets/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="{{ site.baseurl }}/assets/favicon-16x16.png">
<link rel="apple-touch-icon" sizes="180x180" href="{{ site.baseurl }}/assets/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="{{ "/assets/favicon-32x32.png" | relative_url }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ "/assets/favicon-16x16.png" | relative_url }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ "/assets/apple-touch-icon.png" | relative_url }}">
</head>
8 changes: 8 additions & 0 deletions _sass/tale.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@import 'tale/variables';
@import 'tale/base';
@import 'tale/code';
@import 'tale/post';
@import 'tale/syntax';
@import 'tale/layout';
@import 'tale/pagination';
@import 'tale/catalogue';
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions assets/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
# Only the main Sass file needs front matter (the dashes are enough)
---

@import 'tale';
13 changes: 0 additions & 13 deletions styles.scss

This file was deleted.

20 changes: 20 additions & 0 deletions tale.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# coding: utf-8

Gem::Specification.new do |spec|
spec.name = "tale"
spec.version = "0.1.0"
spec.authors = ["Chester How"]
spec.email = ["[email protected]"]

spec.summary = %q{Tale is a minimal Jekyll theme curated for storytellers.}
spec.homepage = "https://github.com/chesterhow/tale"
spec.license = "MIT"

spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(assets|_layouts|_includes|_sass|LICENSE|README)}i) }

spec.add_runtime_dependency "jekyll", "~> 3.6"
spec.add_runtime_dependency "jekyll-paginate", "~> 1.1"

spec.add_development_dependency "bundler", "~> 1.12"
spec.add_development_dependency "rake", "~> 10.0"
end

0 comments on commit f4daf4e

Please sign in to comment.