Convert theme to gem
This commit is contained in:
parent
bdcc4d5e60
commit
f4daf4eccf
18 changed files with 125 additions and 35 deletions
4
Gemfile
Normal file
4
Gemfile
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
source "https://rubygems.org"
|
||||||
|
gemspec
|
62
Gemfile.lock
Normal file
62
Gemfile.lock
Normal file
|
@ -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
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
||||||
MIT License
|
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
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
30
README.md
30
README.md
|
@ -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)
|
![Tale screenshot](http://i.imgur.com/pXZrtmo.png)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
- Easy installation
|
||||||
- Compatible with GitHub Pages
|
- Compatible with GitHub Pages
|
||||||
- Responsive design (looks just as good on mobile)
|
- Responsive design (looks just as good on mobile)
|
||||||
- Syntax highlighting, with the help of Pygments
|
- Syntax highlighting, with the help of Pygments
|
||||||
- Markdown and HTML text formatting
|
- Markdown and HTML text formatting
|
||||||
- Pagination of posts
|
- Pagination of posts
|
||||||
|
|
||||||
## Usage
|
## Installation
|
||||||
### 1. Fork and Clone
|
|
||||||
Fork this repository then clone it.
|
|
||||||
|
|
||||||
### 2. Install dependencies
|
1. Add this line to your `Gemfile`:
|
||||||
Tale uses Jekyll's built-SCSS compiler to generate CSS. You'll need to install the Jekyll gem:
|
|
||||||
|
|
||||||
```bash
|
```ruby
|
||||||
$ gem install jekyll
|
gem "tale"
|
||||||
```
|
```
|
||||||
|
|
||||||
### 3. Create your site
|
2. And add this line to your `_config.yml`:
|
||||||
Edit the `_config.yml` file to suit your site. Also replace posts and content with your own.
|
|
||||||
|
|
||||||
### 4. Running Locally
|
```yaml
|
||||||
To test your site locally, run this in your site's root directory
|
theme: tale
|
||||||
|
|
||||||
```bash
|
|
||||||
$ jekyll serve --watch
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
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.
|
Head to http://localhost:4000/tale/ to see your site in action.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
|
@ -8,9 +8,9 @@ baseurl: "/tale"
|
||||||
url: "https://chesterhow.github.io"
|
url: "https://chesterhow.github.io"
|
||||||
|
|
||||||
# Assets
|
# Assets
|
||||||
sass:
|
# sass:
|
||||||
sass_dir: _sass
|
# sass_dir: _sass
|
||||||
style: :compressed
|
# style: :compressed
|
||||||
|
|
||||||
# Build settings
|
# Build settings
|
||||||
markdown: kramdown
|
markdown: kramdown
|
||||||
|
@ -29,3 +29,5 @@ github:
|
||||||
# Gems
|
# Gems
|
||||||
plugins:
|
plugins:
|
||||||
- jekyll-paginate
|
- jekyll-paginate
|
||||||
|
|
||||||
|
theme: tale
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
</title>
|
</title>
|
||||||
|
|
||||||
<!-- CSS -->
|
<!-- 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">
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Libre+Baskerville:400,400i,700">
|
||||||
|
|
||||||
<!-- Favicon -->
|
<!-- Favicon -->
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ site.baseurl }}/assets/favicon-32x32.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="{{ site.baseurl }}/assets/favicon-16x16.png">
|
<link rel="icon" type="image/png" sizes="16x16" href="{{ "/assets/favicon-16x16.png" | relative_url }}">
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ site.baseurl }}/assets/apple-touch-icon.png">
|
<link rel="apple-touch-icon" sizes="180x180" href="{{ "/assets/apple-touch-icon.png" | relative_url }}">
|
||||||
</head>
|
</head>
|
||||||
|
|
8
_sass/tale.scss
Normal file
8
_sass/tale.scss
Normal file
|
@ -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';
|
5
assets/main.scss
Normal file
5
assets/main.scss
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
# Only the main Sass file needs front matter (the dashes are enough)
|
||||||
|
---
|
||||||
|
|
||||||
|
@import 'tale';
|
13
styles.scss
13
styles.scss
|
@ -1,13 +0,0 @@
|
||||||
---
|
|
||||||
# Use a comment to ensure Jekyll reads the file to be transformed into CSS later
|
|
||||||
# only main files contain this front matter, not partials.
|
|
||||||
---
|
|
||||||
|
|
||||||
@import 'variables';
|
|
||||||
@import 'base';
|
|
||||||
@import 'code';
|
|
||||||
@import 'post';
|
|
||||||
@import 'syntax';
|
|
||||||
@import 'layout';
|
|
||||||
@import 'pagination';
|
|
||||||
@import 'catalogue';
|
|
20
tale.gemspec
Normal file
20
tale.gemspec
Normal file
|
@ -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 = ["chesterhow@gmail.com"]
|
||||||
|
|
||||||
|
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
|
Loading…
Reference in a new issue