hugo-theme-even/README.md

101 lines
4.9 KiB
Markdown
Raw Permalink Normal View History

2017-08-27 14:38:42 +00:00
# hugo-theme-even
2018-11-06 08:59:11 +00:00
[![GitHub contributors](https://img.shields.io/github/contributors/olOwOlo/hugo-theme-even.svg?colorB=green)](https://github.com/olOwOlo/hugo-theme-even/contributors)
[![GitHub release](https://img.shields.io/github/release/olOwOlo/hugo-theme-even.svg?colorB=green)](https://github.com/olOwOlo/hugo-theme-even/releases)
[![GitHub commits (since latest release)](https://img.shields.io/github/commits-since/olOwOlo/hugo-theme-even/latest.svg?colorB=green)](https://github.com/olOwOlo/hugo-theme-even/compare)
[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/olOwOlo/hugo-theme-even/blob/master/LICENSE.md)
2017-08-31 15:14:25 +00:00
A super concise theme for Hugo
2017-08-27 14:38:42 +00:00
2017-08-31 15:14:25 +00:00
> It's a port of the [hexo-theme-even](https://github.com/ahonn/hexo-theme-even)
2017-08-27 14:38:42 +00:00
2020-08-05 17:42:14 +00:00
[Demo](https://hugo-theme-even.netlify.app) | [中文说明](https://github.com/olOwOlo/hugo-theme-even/blob/master/README-zh.md)
2017-08-27 14:38:42 +00:00
## Screenshots
![even-showcase](https://raw.githubusercontent.com/olOwOlo/hugo-theme-even/master/images/showcase.png)
2017-08-27 14:38:42 +00:00
2017-08-31 15:14:25 +00:00
## Installation
2017-08-27 14:38:42 +00:00
2017-08-31 15:14:25 +00:00
```bash
$ git clone https://github.com/olOwOlo/hugo-theme-even themes/even
2017-08-27 14:38:42 +00:00
```
**Important:** Take a look inside the [`exampleSite`](https://github.com/olOwOlo/hugo-theme-even/tree/master/exampleSite) folder of this theme. You'll find a file called [`config.toml`](https://github.com/olOwOlo/hugo-theme-even/blob/master/exampleSite/config.toml). **To use it, copy the [`config.toml`](https://github.com/olOwOlo/hugo-theme-even/blob/master/exampleSite/config.toml) in the root folder of your Hugo site.** Feel free to change it.
2017-08-27 14:38:42 +00:00
2020-04-19 18:14:50 +00:00
**Important:** This theme uses [Hugo Pipes](https://gohugo.io/hugo-pipes/introduction/). Modifying contents in `assets` requires the extended version to be installed.
2020-04-14 16:14:11 +00:00
**NOTE:** For this theme, you should use **post** instead of **posts**, namely `hugo new post/some-content.md`.
2018-02-01 13:35:04 +00:00
## Language Support
> Translations are collected from the [`themes/even/i18n/`](https://github.com/olOwOlo/hugo-theme-even/tree/master/i18n) folder (built into the theme), as well as translations present in `i18n/` at the root of your project. The translations will be merged and take precedence over what is in the theme folder.
To use the translations, just set a correct value for [`defaultContentLanguage`](https://github.com/olOwOlo/hugo-theme-even/blob/master/exampleSite/config.toml#L3).
```toml
defaultContentLanguage = "en" # en / zh-cn / other...
```
Can also support any other languages as well. For example, to support german, create a file `/i18n/de.yaml` in the root folder of your Hugo site. For reference template you can see the [`en.yaml`](https://github.com/olOwOlo/hugo-theme-even/tree/master/i18n/en.yaml) file.
P.S. In multilingual mode, the language which currently being used to render the website will be used.
### Language selector
It is possible to enable language selector for multilingual site. It will be displayed in the header or in the slide menu.
To enable it, set `showLanguageSelector` parameter to `true`.
```toml
showLanguageSelector = true
```
2018-02-01 13:35:04 +00:00
## Favicon
2017-08-27 14:38:42 +00:00
2018-02-01 13:35:04 +00:00
In order to customize the favicon you need to place **all** the following files in the `static` folder at the root of your site, which will overwrite those files in the [`themes/even/static/`](https://github.com/olOwOlo/hugo-theme-even/tree/master/static) folder.
2017-08-27 14:38:42 +00:00
2018-02-01 13:35:04 +00:00
- android-chrome-192x192.png
- android-chrome-512x512.png
- apple-touch-icon.png
- browserconfig.xml
- favicon.ico
- favicon-16x16.png
- favicon-32x32.png
- manifest.json
- mstile-150x150.png
- safari-pinned-tab.svg
2017-08-27 14:38:42 +00:00
2018-02-01 13:35:04 +00:00
A [favicon generator](https://www.google.com/search?q=favicon+generator) can help you generate these files.
2017-08-27 14:38:42 +00:00
2018-02-01 13:35:04 +00:00
## Front Matter
2017-08-27 14:38:42 +00:00
2018-02-01 13:35:04 +00:00
You can customize something for a single content in the content's front-matter. The [`themes/even/archetypes/default.md`](https://github.com/olOwOlo/hugo-theme-even/tree/master/archetypes/default.md) shows all available params. Copy this file in the `archetypes` folder at the root of your project will be useful.
## Shortcodes
2018-11-06 08:59:11 +00:00
This theme provides `center`,` right`, `left`,` music`, `admonition` shortcodes, and support `center`,` right`, `left` class for the built-in `figure`. See more information from [there](https://blog.olowolo.com/example-site/post/shortcodes/).
2018-02-01 13:35:04 +00:00
## Theme Color
2018-02-01 13:35:04 +00:00
2020-04-14 16:14:11 +00:00
There are five built-in theme colors ( Default | Mint Green | Cobalt Blue | Hot Pink | Dark Violet ), you can config it by changing the `$theme-color-config` value in [`/assets/sass/_variable.scss`](https://github.com/olOwOlo/hugo-theme-even/blob/master/assets/sass/_variables.scss#L5-L8).
2018-11-06 08:59:11 +00:00
2018-02-01 13:35:04 +00:00
## Update Theme
```bash
cd ./themes/even/
git pull
```
**Whenever you update this theme, you should check the `CHANGELOG.md` file, there may be some breaking changes.**
2017-08-27 14:38:42 +00:00
## License
2017-08-31 15:14:25 +00:00
Released under the [MIT](https://github.com/olOwOlo/hugo-theme-even/blob/master/LICENSE.md) License.
2017-08-27 14:38:42 +00:00
2017-08-31 15:14:25 +00:00
## Acknowledgements
2017-08-27 14:38:42 +00:00
2017-08-31 15:14:25 +00:00
- [ananke](https://github.com/budparr/gohugo-theme-ananke)
- [hexo-theme-even](https://github.com/ahonn/hexo-theme-even)
- [hugo-nuo](https://github.com/laozhu/hugo-nuo)