2021-11-02 17:01:05 +01:00
# Anubis Theme for Hugo [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) [![Netlify Status](https://api.netlify.com/api/v1/badges/7d9ea909-ad7e-4e47-b7c9-eefb7522d8c6/deploy-status)](https://app.netlify.com/sites/hugo-theme-anubis/deploys) [![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/ ).
2021-11-02 17:01:05 +01:00
[Demo ](https://hugo-theme-anubis.netlify.app/ )
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-12-16 17:08:24 +01: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-12-16 17:08:24 +01:00
- Open Graph and Twitter Cards support
2020-02-16 11:07:56 +01:00
- Mobile support
2021-05-17 20:04:42 +02:00
- Social icons
2020-02-16 11:07:56 +01:00
- Google Analytics
- Disqus
2021-01-17 17:16:45 +01:00
- Utteranc.es
2020-02-16 11:07:56 +01:00
- RSS feeds
2021-01-23 16:15:00 +01:00
* Hiding posts from the RSS feed
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
2021-01-11 19:40:41 +01:00
- webmentions
2020-01-12 07:51:51 +01:00
## Installation
2021-03-15 17:30:26 +01:00
You need to install an extended version of Hugo to run this theme.
2020-01-12 07:51:51 +01:00
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
2021-04-11 16:23:06 +02:00
disqusShortname: "yourdiscussshortname"
googleAnalytics: "G-12345"
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:
2021-01-20 19:10:47 +01:00
author: "John Doe"
email: mail@example.org # used for microformats
avatar: "/images/me.png" # used for microformats
2020-01-12 07:51:51 +01:00
description: ""
2021-06-17 12:18:18 +02:00
# Uncomment if you need this
# images:
# - images/og-featured.png # relative path to "static" directory
# customCSS:
# - css/my.css # relative path to "assets" directory (don't use main.css filename)
# customJS:
# - 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
2021-04-13 19:20:58 +02:00
disableSummary: false
2021-01-17 17:16:45 +01:00
# utteranc.es support
utterancesRepo: "" # mandatory
utterancesTheme: "" # optional
utterancesIssue: "" # optional
utterancesLabel: "" # optional
2021-01-11 19:40:41 +01:00
webmentions:
2021-02-24 20:43:51 +01:00
url: https://yourdomain.com/webemntions/receive
2021-01-11 19:40:41 +01:00
login: hugo-theme-anubis
pingback: true
2021-05-17 20:04:42 +02:00
social:
- id: github
name: gohugoio
# - id: hugo
# url: "https://gohugo.io/"
# icon: "hugo"
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
2021-11-02 17:01:55 +01:00
- `auto` - theme based on user system settings by default, can be switched by user to dark/light theme. Theme settings are saved for user (by default in example sites)
2020-07-09 21:15:38 +02:00
2021-05-17 20:04:42 +02:00
### Social icons
#### Predefined icons
To add icon from predefined list, add to `params.social` config:
- id of social network
- name for placeholder (usually it's your nickname or login)
Predefined list:
- email
- facebook
- github
- instagram
- linkedin
- patreon
- reddit
- snapchat
- soundcloud
- spotify
- telegram
- twitch
- twitter
- vk
- youtube
Example:
```
- id: github
name: gohugoio
```
Config like this generate github icon with "https://github.com/gohugoio" url.
#### Custom icons
To add custom icon, add to `params.social` config:
- id of social network/site
- full url to your network/site
Also you need to create directory `static/fa-icons` and add svg icon of your network/site with name equals to `id` from config.
Example:
```
- id: google
url: "https://www.google.com/search?q=I'm+lucky"
```
Icon should be "static/fa-icons/google.svg"
If you want font awesome icons, download "Font Awesome For Desktop" and open svg directory.
2020-05-07 19:05:13 +02:00
### Google Analytics
2021-10-05 15:18:47 +02:00
Only works for production environment.
2020-05-07 19:05:13 +02:00
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.
2021-01-23 16:15:00 +01:00
### Hiding posts from RSS
To hide a post from the RSS feed, just add `disable_feed: true` to its front matter.
2020-06-07 13:20:40 +02:00
### Pagination on post single page
Enabled by `paginationSinglePost` param in `params` section of config.
2021-02-24 20:43:51 +01:00
### Webmentions
To provide webmention support you can **either** specify your webmention.io username with `login: webmentionusername` **or** specify a link to your custom webmention endpoint with `url: https://yourdomain.com/webemntions/receive` .
If you use webmention.io you can also enable pingback with `pingback: true`
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