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
|
||||
|
||||
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
|
||||
|
|
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)
|
||||
|
||||
## 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
|
||||
|
|
|
@ -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
|
||||
|
@ -29,3 +29,5 @@ github:
|
|||
# Gems
|
||||
plugins:
|
||||
- jekyll-paginate
|
||||
|
||||
theme: tale
|
||||
|
|
|
@ -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
_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