README.md 4.19 KB
Newer Older
Emiel Hollander's avatar
Emiel Hollander committed
1 2
# Tale

3 4
[![Build Status](https://travis-ci.com/EmielH/tale-hugo.svg?branch=master)](https://travis-ci.com/EmielH/tale-hugo)

Emiel Hollander's avatar
Emiel Hollander committed
5 6
This is a port of the [Tale theme for Jekyll](https://github.com/chesterhow/tale) to Hugo. Tale is a minimal Jekyll theme curated for storytellers. Checkout the demo [here](https://chesterhow.github.io/tale/). I did not design this theme; I only ported it from Jekyll to Hugo.

7
![Tale screenshot](https://raw.githubusercontent.com/EmielH/tale-hugo/master/images/screenshot.png)
Emiel Hollander's avatar
Emiel Hollander committed
8

9 10
## Installation

11 12
### 1. Install the theme

13
If your site is also under version control using git, the easiest way to install this theme is to add it as a submodule. If you have not created a git repo for your project yet, you need to run `git init` beforehand. Inside the folder of your Hugo site, run the following command.
14 15 16 17 18

```
git submodule add https://github.com/EmielH/tale-hugo.git themes/tale
```

19 20 21 22 23 24
Alternatively, you can clone the theme into your project.

```
git clone https://github.com/EmielH/tale-hugo.git themes/tale
```

25 26
### 2. Configure Hugo

27 28 29 30 31 32 33 34 35 36 37 38
Add the following line to `config.toml` to tell Hugo to use the theme.

```
theme = "tale"
```

Alternatively, you can tell Hugo to use the theme with the `server` command.

```
hugo server -t tale
```

39 40
### Additional information

Emiel Hollander's avatar
Emiel Hollander committed
41
For more information, read the official [setup guide](https//gohugo.io/overview/installing/) of Hugo.
42

43
### Update the theme
44 45 46 47 48 49 50 51 52

If you have installed the theme as a git submodule, you can update the theme by issuing the following command inside your project folder.

```
git submodule update --remote --rebase
```

If you have cloned the theme, you can run `git pull` inside the theme folder.

Emiel Hollander's avatar
Emiel Hollander committed
53 54 55 56
## Configuration

### Internationalisation (i18n)

57
Tale supports using other languages than English. Language files for the texts Tale uses are provided in the `i18n` directory. The default language is English. To switch languages, add the key `defaultContentLanguage` to your `config.toml` file. For example:
Emiel Hollander's avatar
Emiel Hollander committed
58 59 60 61 62 63 64 65 66 67 68

```
defaultContentLanguage = "nl"
```

To translate texts your site uses, add an `i18n` folder to your site.

Feel free to submit pull requests for other translations of Tale's texts.

[Hugo documentation for multilingual sites](//gohugo.io/content-management/multilingual/)

69 70 71 72
### Custom summaries

Tale allows for writing the summary of your posts manually by setting the `summary` variable in the page frontmatter. If this variable is not set, the summary that Hugo automatically generates will be used.

73 74 75 76
### Taxonomies

Tale has basic support for taxonomies. Taxonomy and terms pages will be generated when you have defined taxonomies, but you need to include links to these pages yourself. For example, you can add a link to a taxonomy page in `header-menu.html`.

77 78 79 80 81 82 83 84 85
### Placeholder partials

The theme contains placeholder partials to make the theme more flexible and easier to adapt to your site without having to change the theme itself. These are:

- `single/header.html`
- `single/footer.html`

These are included in the template for a single post, at the top of the post (below the title) and at the bottom of the post, respectively. These can be used, for example, to include additional information about the post author or for related posts. Create a file `/layouts/partials/single/header.html` or `footer.html` on your own site to have it included.

86 87 88 89
- `index/introduction.html`

This partial is included at the top of the list of posts on the index page, allowing you to add an introduction to your site.

90 91 92 93 94 95 96 97 98
### Copyright message

The copyright message in the footer uses the name of the author of the site, as defined in `config.toml`. For example:

```
[Author]
    name = "Emiel"
```

99 100 101 102 103
## Acknowledgments

Thanks 

- to [Chester How](//github.com/chesterhow) for creating the original [Tale theme for Jekyll](https://chesterhow.github.io/tale/),
104
- to [onedrawingperday](//github.com/onedrawingperday), [bep](//github.com/bep) and [digitalcraftsman](//github.com/digitalcraftsman) for their help in getting the theme working correctly with Hugo,
105
- to [lucperkins](https://github.com/lucperkins) for the [Fresh theme](https://github.com/lucperkins/hugo-fresh) from which I used some useful snippets of code.
106

Emiel Hollander's avatar
Emiel Hollander committed
107
## License
108
See [LICENSE](https://github.com/EmielH/tale-hugo/blob/master/LICENSE).