tale/README.md

130 lines
2.9 KiB
Markdown
Raw Permalink Normal View History

2017-03-27 12:25:56 +00:00
# Tale
2018-01-21 13:29:54 +00:00
[![Gem Version](https://badge.fury.io/rb/tale.svg)](https://badge.fury.io/rb/tale)
2017-03-29 04:55:29 +00:00
Tale is a minimal Jekyll theme curated for storytellers. Checkout the demo [here](https://chesterhow.github.io/tale/).
2017-03-29 04:55:29 +00:00
![Tale screenshot](http://i.imgur.com/pXZrtmo.png)
## Features
2018-01-08 12:23:56 +00:00
- Easy installation
2017-03-29 04:55:29 +00:00
- 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
- [Disqus comments (can be enabled if needed)](#enabling-comments)
2017-03-29 04:55:29 +00:00
2018-01-08 12:23:56 +00:00
## Installation
2018-01-25 05:15:37 +00:00
There are 3 ways to install this theme
1. Install it as a Ruby Gem (for self-hosted sites)
2. Install it with the `jekyll-remote-theme` plugin (for GitHub Pages hosted sites)
3. Fork the project directly
### Ruby Gem method
2018-01-08 12:23:56 +00:00
1. Add this line to your `Gemfile`:
2017-03-29 04:55:29 +00:00
2018-01-08 12:23:56 +00:00
```ruby
gem "tale"
2017-03-29 04:55:29 +00:00
```
2018-01-25 05:15:37 +00:00
2. Install the theme's gems and dependencies:
```bash
$ bundle
```
3. In `_config.yml` add these lines:
2017-03-29 04:55:29 +00:00
2018-01-08 12:23:56 +00:00
```yaml
2018-01-25 05:15:37 +00:00
theme: tale
permalink: /:year-:month-:day/:title
paginate: 5
```
Remove any other `theme:` lines.
4. Rename `index.md` to `index.html`. Without this, the `jekyll-paginate` gem will not work.
5. In `about.md`, change the `layout:` field to `post`:
```Markdown
layout: post
2017-03-29 04:55:29 +00:00
```
2018-01-25 05:15:37 +00:00
### GitHub Pages method
1. Add these 2 lines in to your `Gemfile`:
```ruby
gem "jekyll-remote-theme"
gem "jekyll-paginate"
```
2. Install the newly added gems:
2018-01-08 12:23:56 +00:00
2018-01-08 16:31:18 +00:00
```bash
$ bundle
```
2018-01-25 05:15:37 +00:00
3. In `_config.yml` add these lines:
```yaml
remote_theme: chesterhow/tale
permalink: /:year-:month-:day/:title
paginate: 5
plugins:
- jekyll-paginate
- jekyll-remote-theme
```
Remove any other `theme:` or `remote_theme:` lines.
2018-01-08 16:31:18 +00:00
4. Rename `index.md` to `index.html`. Without this, the `jekyll-paginate` gem will not work.
2018-01-25 05:15:37 +00:00
5. In `about.md`, change the `layout:` field to `post`:
2018-01-08 16:31:18 +00:00
2018-01-25 05:15:37 +00:00
```Markdown
layout: post
2018-01-08 16:31:18 +00:00
```
2018-01-25 05:15:37 +00:00
### Fork method
2018-01-08 16:31:18 +00:00
1. Fork this repository
2018-01-08 12:23:56 +00:00
2018-01-08 16:31:18 +00:00
2. Delete the unnecessary files/folders: `CODE_OF_CONDUCT.md`, `LICENSE`, `README.md`, `tale.gemspec`
2018-01-08 12:23:56 +00:00
2018-01-08 16:31:18 +00:00
3. Delete the `baseurl` line in `_config.yml`:
```yaml
2018-01-25 05:15:37 +00:00
baseurl: "/tale" # delete this line
2018-01-08 16:31:18 +00:00
```
## Usage
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.
To build and serve your site, run:
```bash
$ bundle exec jekyll serve
```
2018-01-08 12:23:56 +00:00
2018-01-08 16:31:18 +00:00
And you're all set! Head over to http://127.0.0.1:4000/ to see your site in action.
2017-03-29 04:55:29 +00:00
### Enabling Comments
Comments are disabled by default. To enable them, look for the following line in `_config.yml` and change `jekyll-tale` to your site's Disqus id.
2019-10-23 08:45:09 +00:00
```yml
disqus: jekyll-tale
2019-10-23 08:45:09 +00:00
```
Next, add `comments: true` to the YAML front matter of the posts which you would like to enable comments for.
2019-10-23 08:45:09 +00:00
2017-03-29 04:55:29 +00:00
## Contributing
Found a bug or have a suggestion? Feel free to create an issue or make a pull request!
2017-03-27 12:25:56 +00:00
## License
See [LICENSE](https://github.com/chesterhow/tale/blob/master/LICENSE)