2020-08-01 19:21:48 +02:00
# Anubis Theme for Hugo [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) [![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://www.paypal.com/paypalme/mitrichius/1)
2020-01-12 07:51:51 +01:00
Anubis is a simple minimalist theme for [Hugo blog engine ](https://gohugo.io/ ).
2020-02-16 11:02:57 +01:00
![Anubis Screenshot ](https://raw.githubusercontent.com/mitrichius/hugo-theme-anubis/master/images/screenshot.png )
2020-01-12 07:51:51 +01:00
## Features
2020-07-09 21:15:38 +02:00
- Dark mode (automatic, by switcher)
2020-01-12 07:51:51 +01:00
- Pagination
2020-02-16 11:07:56 +01:00
- Tags/Categories support
2020-01-12 07:51:51 +01:00
- Archive
2020-02-16 11:07:56 +01:00
- Mobile support
- Google Analytics
- Disqus
- RSS feeds
2020-05-27 21:50:15 +02:00
- Translations (en, ru, fr, pl)
2020-07-09 21:42:23 +02:00
- Custom CSS/JS
2020-05-27 21:50:15 +02:00
- Multilingual mode
2020-06-06 15:44:52 +02:00
- Robots.txt
2020-06-06 21:05:21 +02:00
- Favorite posts
2020-06-07 13:20:40 +02:00
- Pagination on post single page
2020-08-12 21:25:08 +02:00
- Optional "Read more" link
2020-01-12 07:51:51 +01:00
## Installation
Inside the folder of your Hugo site run:
$ git submodule add https://github.com/mitrichius/hugo-theme-anubis.git themes/anubis
For more information read the official [setup guide ](//gohugo.io/overview/installing/ ) of Hugo.
## Getting started
After installing the theme successfully it requires a just a few more steps to get your site running.
### Update config file
2020-05-14 21:33:21 +02:00
If you have toml config (which is by default), you should rename it to config.yaml or adapt this config for toml syntax.
2020-01-12 07:51:51 +01:00
2020-05-14 21:33:21 +02:00
Example of config.yaml:
2020-01-12 07:51:51 +01:00
```yaml
languageCode: "en-us"
2020-04-26 14:24:28 +02:00
baseUrl: ""
2020-01-12 07:51:51 +01:00
title: "Anubis"
theme: "anubis"
paginate: 10
2020-01-21 19:57:57 +01:00
disqusShortname: yourdiscussshortname
2020-01-22 18:51:35 +01:00
googleAnalytics: UA-123-45
2020-06-06 15:44:52 +02:00
enableRobotsTXT: true
2020-01-12 07:51:51 +01:00
menu:
main:
- identifier: archive
name: Archive
title: Archive
url: /posts/
weight: 0
params:
2020-01-26 17:09:07 +01:00
author: ""
2020-01-12 07:51:51 +01:00
description: ""
2020-01-23 21:29:36 +01:00
images:
2020-05-30 14:25:44 +02:00
- images/og-featured.png # relative path to "static" directory
2020-04-26 14:24:28 +02:00
customCSS:
2020-11-24 16:34:59 +01:00
- css/my.css # relative path to "assets" directory (don't use main.css filename)
2020-07-09 21:42:23 +02:00
customJS:
2020-11-08 12:55:02 +01:00
- js/main.js # relative path to "assets" directory
2020-05-24 21:55:32 +02:00
dateFormat: "2006-01-02"
2020-06-07 13:20:40 +02:00
paginationSinglePost: true
2020-07-09 21:15:38 +02:00
style: light-without-switcher
2020-08-12 21:25:08 +02:00
readMore: false
2020-06-13 18:32:10 +02:00
markup:
goldmark:
renderer:
unsafe: true # enable raw HTML in Markdown
2020-01-12 07:51:51 +01:00
```
### Check your site
In order to see your site in action, run Hugo's built-in local server.
`$ hugo server`
Now enter [`localhost:1313` ](http://localhost:1313/ ) in the address bar of your browser.
2020-05-07 19:05:13 +02:00
## Feature Settings
2020-07-09 21:15:38 +02:00
### Dark Mode
Customize via `style` param in `params` section of config.
Options:
2020-07-09 21:19:33 +02:00
- `light-without-switcher` - light theme, without switcher, JS-free (by default)
- `dark-without-switcher` - dark theme, without switcher, JS-free
- `auto-without-switcher` - theme based on user system settings, without switcher, JS-free
- `light` - light theme by default, can be switched by user to dark theme and back. Theme settings are saved for user
- `dark` - dark theme by default, can be switched by user to light theme and back. Theme settings are saved for user
- `auto` - theme based on user system settings by default, can be switched by user to dark/light theme. Theme settings are saved for user
2020-07-09 21:15:38 +02:00
2020-05-07 19:05:13 +02:00
### Google Analytics
Only works for production environment. You either build your site with variable like
`HUGO_ENV=production hugo --minify`
or just put `env: production` to `params` section of config.
2020-05-27 21:50:15 +02:00
### Multilingual mode
Check config/example usage in [exampleSiteMultilingual ](https://github.com/Mitrichius/hugo-theme-anubis/tree/master/exampleSiteMultilingual ) directory and documentation on [Hugo site ](https://gohugo.io/content-management/multilingual/ ).
2020-06-06 15:44:52 +02:00
### Robots.txt
2020-06-06 21:05:21 +02:00
Based on environment.
2020-06-06 15:56:33 +02:00
For production — allow all, for other — disallow all.
2020-06-06 15:44:52 +02:00
2020-06-06 21:05:21 +02:00
### Favorite posts
To mark posts as favorite just add `favorite: true` in post's front matter. It adds a "★" icon nearby post's title.
2020-06-07 13:20:40 +02:00
### Pagination on post single page
Enabled by `paginationSinglePost` param in `params` section of config.
2020-01-12 07:51:51 +01:00
## Contributing
2020-08-08 10:25:27 +02:00
If you find a bug or have an idea for a feature, feel free to write an [issue ](https://github.com/mitrichius/hugo-theme-anubis/issues ) or make a PR.
2020-01-12 07:51:51 +01:00
## TODO
See [issues ](https://github.com/mitrichius/hugo-theme-anubis/issues ).
## License
MIT
2020-08-08 10:25:27 +02:00
© Dmitry Kolosov
2020-05-07 19:05:13 +02:00
2020