Commit 927f87c2 authored by R茅gis Witz's avatar R茅gis Witz
Browse files

馃拕 rajoute la possibilit茅 d'utiliser le theme ananke

https://github.com/theNewDynamic/gohugo-theme-ananke
parent ec0d6da7
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
## [v2.6.1](https://github.com/theNewDynamic/gohugo-theme-ananke/compare/v2.6.0...v2.6.1) - 2020-06-25
### Commits
- Updated minimum theme to .55 [`df4c78a`](https://github.com/theNewDynamic/gohugo-theme-ananke/commit/df4c78adb2ed004c3780f7a76254e9756dd024b5)
## [v2.6.0](https://github.com/theNewDynamic/gohugo-theme-ananke/compare/2.6.0...v2.6.0) - 2020-06-23
### Merged
- Update spanish translations [`#304`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/304)
- Add automatic cover image support [`#303`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/303)
## [2.6.0](https://github.com/theNewDynamic/gohugo-theme-ananke/compare/v2.5.5...2.6.0) - 2020-06-17
### Merged
- Add translation for taxonomy page [`#299`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/299)
- Site logo [`#284`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/284)
- Add head partial [`#285`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/285)
- Long urls or links extend beyond content and overlap sidebar [`#259`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/259)
- Use relative URL for favicon [`#251`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/251)
- Fix relURL for custom_css [`#252`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/252)
- Fixed a typo in form-contact.html [`#266`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/266)
- adding Bulgarian translation [`#267`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/267)
- Use | relLangURL for the base url in the site-navigation [`#277`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/277)
- RSS svg icon [`#282`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/282)
- Updated Windows instructions in README.md [`#276`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/276)
- Replace another 2 .URL occurrences with .Permalink [`#275`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/275)
- Add alternative method for running prod to the readme [`#273`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/273)
- Swap the page title and site title in page <title> elements [`#272`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/272)
- Add the post_content_classes param for changing post content font [`#260`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/260)
- Add sharing links for the posts [`#255`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/255)
- Safari Reader View lacks content [`#254`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/254)
- Add Keybase social icon [`#248`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/248)
- Add StackOverflow social [`#243`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/243)
- Fix to take care of multiple author list, or for setting the [`#221`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/221)
- Fix Slack icon size [`#237`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/237)
- Correct the original translation [`#241`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/241)
## [v2.5.6](https://github.com/theNewDynamic/gohugo-theme-ananke/compare/v2.6.1...v2.5.6) - 2019-12-30
### Merged
- Use Hugo's built in Site Config for copyright according to PR #199 [`#240`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/240)
- Add italian translation [`#239`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/239)
## [v2.5.5](https://github.com/theNewDynamic/gohugo-theme-ananke/compare/2.5.1...v2.5.5) - 2019-11-15
### Merged
- Remove stray grave accent [`#231`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/231)
- Add Slack to social options [`#236`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/236)
- Fix URL for menus [`#230`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/230)
- Fix word count heading typo in README.md [`#222`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/222)
- Add auto-changelog [`#228`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/228)
- Fix stackbit issues [`#226`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/226)
- Add Stackbit Configuration [`#223`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/223)
- Replace {{ .URL }} with {{ .Permalink }} [`#216`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/216)
- Adds an author to blog posts. [`#209`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/209)
- Fixes #212. [`#213`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/213)
- Add ukrainian translation [`#214`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/214)
- Add swedish translation [`#208`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/208)
- Deprecation messages fixes. [`#196`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/196)
- Fix README instructions [`#204`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/204)
- Use git submodules [`#183`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/183)
- Remove Google News meta tags [`#197`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/197)
### Fixed
- Fix URL for menus (#230) [`#229`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/229)
- Add auto-changelog (#228) [`#227`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/227) [`#227`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/227)
- Fix stackbit issues (#226) [`#224`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/224)
- Add Stackbit Configuration (#223) [`#200`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/200)
- Fixes #212. (#213) [`#212`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/212)
- Deprecation messages fixes. (#196) [`#180`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/180)
## 2.5.1 - 2019-08-12
### Merged
- remove deprecated meta tags for old Windows Mobile and BlackBerry [`#191`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/191)
- localization for form-contact shortcode [`#185`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/185)
- Fix min_version [`#189`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/189)
- Add portuguese translation [`#179`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/179)
- Add commento [`#178`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/178)
- feat: add RU translation [`#177`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/177)
- Spanish Translation [`#175`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/175)
- Dutch translations. [`#171`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/171)
- Correcting issue with cached i18n menu [`#174`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/174)
- Create zh.toml [`#170`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/170)
- Fix TOC header [`#168`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/168)
- Optimisation "partialCached" [`#165`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/165)
- Add a link to "mastodon" [`#159`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/159)
- Create fr.toml [`#157`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/157)
- add i18n translation support [`#156`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/156)
- Support hiding the featured image header text. [`#155`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/155)
- enable localization/modification of "Recent" string [`#154`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/154)
- add basic support for post translations [`#144`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/144)
- Keep article padding throughout widths [`#152`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/152)
- Improve semantic structure of pages [`#151`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/151)
- Improve social link accessibility [`#147`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/147)
- Add explicit path to image example [`#146`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/146)
- Open social media links in new tab and add Medium icon [`#143`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/143)
- Make cover dimming class customisable. [`#140`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/140)
- Removed hardcoded theme sample hero image. This will allow the user to "blank" out the hero default set in the config. The if statement for blank was unreachable. [`#133`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/133)
- Use relative url function for custom CSS files [`#132`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/132)
- Add Gitlab to social icons [`#131`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/131)
- Add div to wrap social icons [`#128`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/128)
- Fix asset paths when baseURL has sub-folder [`#103`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/103)
- Add inheritance for social links. [`#107`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/107)
- Issue 98 [`#101`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/101)
- Replace Asset References with a data file instead of paths [`#96`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/96)
- Pre-2.0 Enhancements [`#94`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/94)
- Don't duplicate site title in home page TITLE tag [`#78`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/78)
- Fix pagination [`#76`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/76)
- #68|Parmeterize number of recent posts in index.html [`#69`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/69)
- Fix typo in single.html [`#67`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/67)
- Fixed line breaks in code (resolves budparr/gohugo-theme-ananke#56). [`#57`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/57)
- Favicons [`#54`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/54)
- indent fix [`#45`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/45)
- Social icon updates [`#51`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/51)
- Add GitHub social icon [`#48`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/48)
- Make Hero image work out-of-the box [`#40`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/40)
- Removed excess o in Facebook [`#34`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/34)
- Fixes #31 [`#32`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/32)
- Bp/fix now function Fixes #29 [`#30`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/30)
- fix clunky construction on home page to get section name [`#25`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/25)
- fix clunky construction on home page to get section name [`#24`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/24)
- fix clunky construction on home page to get section name [`#17`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/17)
- tweak hero default behavior [`#16`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/16)
- improve terms template [`#15`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/15)
- improve image handling for edge cases Fixes #11 [`#14`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/14)
- Improve featured image handling Ref #11 + minor homepage impvs [`#12`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/12)
- Dev changes [`#10`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/10)
- pull in dev changes [`#9`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/9)
- keeping things in order [`#8`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/8)
- Improve home page posts [`#7`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/7)
- make form email comment make more sense. Ref #5 [`#6`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/6)
- use a cleaner way to include language code [`#3`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/3)
- update from DEV [`#2`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/2)
- add taxonomy templates [`#1`](https://github.com/theNewDynamic/gohugo-theme-ananke/pull/1)
### Fixed
- Add blockquote styling [`#169`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/169)
- Keep article padding throughout widths (#152) [`#130`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/130)
- Update readme for formspree change [`#150`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/150)
- Improve semantic structure of pages (#151) [`#149`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/149)
- Add global background color class to footer [`#135`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/135)
- Add div to wrap social icons (#128) [`#127`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/127)
- Fix article padding on mobile [`#115`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/115)
- Make asset paths absolute [`#97`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/97)
- Fix linkedin icon to match the other social icons [`#70`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/70)
- Be smarter about linking to posts on home page. [`#50`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/50)
- Add body_classes parameter to body [`#43`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/43)
- Fixes #31 (#32) [`#31`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/31)
- Bp/fix now function Fixes #29 (#30) [`#29`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/29)
- Merge pull request #14 from budparr/dev [`#11`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/11)
- improve image handling for edge cases Fixes #11 [`#11`](https://github.com/theNewDynamic/gohugo-theme-ananke/issues/11)
The MIT License (MIT)
Copyright (c) 2016 Bud Parr
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Ananke, A theme for [Hugo](http://gohugo.io/), a framework for building websites.
The intent of this theme is to provide a solid starting place for Hugo sites with basic features and include best practices for performance, accessibility, and rapid development.
![screenshot](https://raw.githubusercontent.com/budparr/gohugo-theme-ananke/master/images/screenshot.png)
[DEMO](https://gohugo-ananke-theme-demo.netlify.com/)
Features
- Responsive
- Accessible
- Contact form
- Custom Robots.txt (changes values based on environment)
- Internal templates for meta data, google analytics, and DISQUS or COMMENTO comments
- RSS Discovery
- Table of Contents (must declare `toc: true` in post parameter)
- Stackbit configuration ([Stackbit](https://www.stackbit.com))
Also includes examples of Hugo Features or Functions:
- Pagination (internal template)
- Taxonomies
- Archetypes
- Custom shortcode
- Related content
- Hugo built-in menu
- i18n
- `with`
- `HUGO_ENV`
- `first`
- `after`
- `sort`
- Site LanguageCode
- `where`
- Content Views
- Partials
- Template layouts (type "post" uses a special list template, single template, and a content view)
- Tags
- `len`
- Conditionals
- `ge` (greater than or equal to)
- `.Site.Params.mainSections` to avoid hard-coding "blog," etc. [[release note](https://github.com/spf13/hugo/blob/66ec6305f6cb450ddf9c489854146bac02f7dca1/docs/content/meta/release-notes.md#enhancements)]
This theme uses the "Tachyons" CSS library. This will allow you to manipulate the design of the theme by changing class names in HTML without touching the original CSS files. For more information see the [Tachyons website](http://tachyons.io/).
## Installation
### As a Hugo Module (recommended)
> 鈿狅笍 If you installed a [Hugo binary](https://gohugo.io/getting-started/installing/#binary-cross-platform), you may not have Go installed on your machine. To check if Go is installed:
> ```
> $ go version
> ```
> Go modules were considered production ready in v1.14. [Download Go](https://golang.org/dl/).
1. From your project's root directory, initiate the hugo module system if you haven't already:
```
$ hugo mod init github.com/<your_user>/<your_project>
```
2. Add the theme's repo to your `config.toml`:
```toml
theme = ["github.com/theNewDynamic/gohugo-theme-ananke"]
```
### As Git Submodule
Inside the folder of your Hugo site run:
```
$ git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
```
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.
### The config file
Take a look inside the [`exampleSite`](https://github.com/theNewDynamic/gohugo-theme-ananke/tree/master/exampleSite) folder of this theme. You'll find a file called [`config.toml`](https://github.com/theNewDynamic/gohugo-theme-ananke/blob/master/exampleSite/config.toml). To use it, copy the [`config.toml`](https://github.com/theNewDynamic/gohugo-theme-ananke/blob/master/exampleSite/config.toml) in the root folder of your Hugo site. Feel free to change the strings in this theme.
You may need to delete the line: `themesDir = "../.."`
### Add comments
To enable comments, add following to your config file:
- DISQUS: `disqusShortname = YOURSHORTNAME`
- COMMENTO:
```
[params]
commentoEnable = true
```
### Change the hero background
For any page or post you can add a featured image by including the local path in front matter (see content in the `exampleSite/content/_readme.md` file for examples): `featured_image: '/images/gohugo-default-sample-hero-image.jpg'`
#### Featured image as Page Resources
If user is using [Page Resources](https://gohugo.io/content-management/page-resources/), the theme will try and match the `featured_image` from with a page resource of type `image` and use its relative permalink. If no `featured_image` is set, the theme will look for a Page Resource of type `image` whose filepath incudes either `cover` or `feature`
#### Other hero settings
If you would like to hide the header text on the featured image on a page, set `omit_header_text` to `true`. See `exampleSite/content/contact.md` for an example.
You don't need an image though. The default background color is black, but you can change the color, by changing the default color class in the config.toml file. Choose a background color from any on the [Tachyons](http://tachyons.io/docs/themes/skins/) library site, and preface it with "bg-"
example: `background_color_class = "bg-blue"` or `background_color_class = "bg-gray"`
### Activate the contact form
This theme includes a shortcode for a contact form that you can add to any page (there is an example on the contact page in the exampleSite folder). One option is to use [formspree.io](//formspree.io/) as proxy to send the actual email. Each month, visitors can send you up to one thousand emails without incurring extra charges. Visit the Formspree site to get the "action" link and add it to your shortcode like this:
```
{{< form-contact action="https://formspree.io/your@email.com" >}}
```
### Social Follow + Share
The theme automatically adds "Follow" link icons to the header and footer and "Share" link icons to pages unless `disable_share` parameter is set to true either on the site level (site params) or page level (front matter). Each built-in services sports a label, an icon and a color.
In order to register a service to be used, user must add an `ananke_socials` parameter to its project configuration file and list them through it in the desired order. Each entry must bear a
- name*: It matches the built-in service reference (Ex: twitter, github)
- url*: The url of the handle's profile on the service (Ex: https://twitter.com/theNewDynamic, https://github.com/
theNewDynamic)
```yaml
params:
ananke_socials:
- name: twitter
url: https://twitter.com/theNewDynamic
- name: github
url: https://github.com/theNewDynamic
```
If user needs to overwrite default `color` and `label` of the service, they simply need to append the following to the entry:
- label: The displayed name of the service to be used to popuplate `[title]` attributes and read-only. (Ex: Twitter, GitHub)
- color: Used for styling purposes. (Ex: '#1da1f2', '#6cc644')
```yaml
params:
ananke_socials:
- name: twitter
url: https://twitter.com/theNewDynamic
label: TND Twitter
- name: github
url: https://github.com/theNewDynamic
label: TND GitHub Account
color: '#ff6800'
```
#### Limit Follow or Share
If a user needs to control Share and Follow of a service, for example enabling "Share on Facebook" without having a Facebook Page to "follow", they can set `follow: false` one the registered service.
```yaml
params:
ananke_socials:
- name: facebook
label: Facebook
follow: false
- name: twitter
url: https://twitter.com/theNewDynamic
label: TND Twitter
```
#### Social Icons Customization
On top of easily customizing the built-in services' label and color, user can overwrite their icon by adding an svg file at `/assets/ananke/socials` with a filename matching the service's name.
For example, in order to use your own GitHub icon, simply add an svg file at `/assets/ananke/socials/github.svg`
#### Built-in Services
Here is the list of built-in services. Those marked with an `*` are also part of the "Share" module.
- twitter*
- instagram
- youtube
- github
- gitlab
- keybase
- linkedin*
- medium
- mastodon
- slack
- stackoverflow
- facebook*
- rss
#### Complement
In order to add an unkown service (absent from the list above), you simply need to add all three settings to `ananke_socials`: name, url, label, color, and optionally add an icon file matching the `name` to the `assets/ananke/socials` directory. In the absence of an icon, the theme will print the service's label.
### Content indexing
If the theme is ran in [production](#production), pages will be indexed by search engines. To prevent indexing on some given pages, add `private: true` to its Front Matter.
### Update font or body classes
The theme is set, by default, to use a near-white background color and the "Avenir" or serif typeface. You can change these in your config file with the `body_classes` parameter, like this:
```
[params]
body_classes = "avenir bg-near-white"
```
which will give you a body class like this:
```
<body class="avenir bg-near-white">
```
note: The `body_classes` parameter will not change the font used in post content. To do this, you must use the `post_content_classes` parameter.
You can find a list of available typefaces [here](https://github.com/tachyons-css/tachyons/blob/v4.7.0/src/_font-family.css).
And a list of background colors [here](https://github.com/tachyons-css/tachyons/blob/v4.7.0/src/_skins.css#L96).
_n.b. in future versions we will likely separate the typeface and other body classes._
### CSS
Ananke stylesheet is built with Hugo Pipes's [Asset Bundling](https://gohugo.io/hugo-pipes/bundling/#readout) alone to maximize compatibiliy. The theme simply bundles its several files into one minified and fingerprinted (in production) CSS file.
Ananke uses [Tachyon.io](http://tachyons.io/) utility class library.
#### Custom CSS
WARNING: Pending resolution of this [discussion](https://github.com/theNewDynamic/gohugo-theme-ananke/discussions/452#discussioncomment-1865301), Custom CSS only works with Hugo Extended
In order to complement the default CSS with your own, you can add custom css files to the project.
1. Just add a `assets/ananke/css` directory to your project and add the file(s) in it.
2. Register the files using the `custom_css` key in your site's parameter. The path referenced in the parameter should be relative to the `assets/ananke/css` folder.
The css files will be added in their registered order to final `main.css` file.
For example, if your css files are `assets/ananke/css/custom.css` and `assets/ananke/special.css` then add the following to the config file:
```
[params]
custom_css = ["custom.css","special.css"]
```
__IMPORTANT__: Files registered through the `custom_css` array, while unlimited in number, must be of the same type (Ex: all `scss` or all `css`)
__Note on retrocompatibiliy for custom css__: If the files registered through the `custom_css` setting are not found in `assets/ananke/css` the theme will expect them to live at the given path relative to the static directory and load them as <link> requests.
### Show Reading Time and Word Count
If you add a key of `show_reading_time` true to either the Config Params, a page or section's front matter, articles will show the reading time and word count.
### Adding Scripts to the Page Head
Some scripts need to be added within the page head. To add your own scripts to the page head, simply insert them into the `head-additions.html` partial located in the `layouts/partials` folder.
### Logo
You can replace the title of your site in the top left corner of each page with your own logo. To do that put your own logo into the `static` directory of your website, and add the `site_logo` parameter to the site params in your config file. For example:
```
[params]
site_logo = "img/logo.svg"
```
### Set Content Font Color
You can set the font color of the main content both globally and on individual pages:
Globally:
Set the `text_color` param in the `config.toml` file.
```
[params]
text_color = "green"
```
Individual Page (prioritized over global):
Set the `text_color` param in a page's markdown file front matter.
note: The value of `text_color` must be a valid tachyons color class. Alist can be found [here](http://tachyons.io/docs/themes/skins/).
### Localize date format
Dates of blog posts and single pages are rendered with the default date format commonly used in the USA and Canada. It is possible to specify a different format.
```
[params]
date_format = "2. January 2006"
```
With hugo 0.87.0 and above, you can also use predefined layout, like `:date_full`, and it will output localized dates or times.
See hugo's documentation of the [`time.Format` function](https://gohugo.io/functions/dateformat/) for more details.
### Nearly finished
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.
## Production
To run in production (e.g. to have Google Analytics show up), run `HUGO_ENV=production` before your build command. For example:
```
HUGO_ENV=production hugo
```
Note: The above command will not work on Windows. If you are running a Windows OS, use the below command:
```
set HUGO_ENV=production
hugo
```
## Contributing
If you find a bug or have an idea for a feature, feel free to use the [issue tracker](https://github.com/theNewDynamic/gohugo-theme-ananke/issues) to let me know.
TODO:
- fix hard-coded link to [section](https://github.com/theNewDynamic/gohugo-theme-ananke/blob/master/layouts/index.html#L32)
---
title: "{{ replace .File.ContentBaseName "-" " " | title }}"
date: {{ .Date }}
tags: []
featured_image: ""
description: ""
---
pre, .pre {
overflow-x: auto;
overflow-y: hidden;
overflow: scroll;
}
pre code {
display: block;
padding: 1.5em 1.5em;
white-space: pre;
font-size: .875rem;
line-height: 2;
}
pre {
background-color: #222;
color: #ddd;
white-space: pre;
hyphens: none;
position: relative;
}
/* pagination.html: https://github.com/spf13/hugo/blob/master/tpl/tplimpl/template_embedded.go#L117 */
.pagination {
margin: 3rem 0;
}
.pagination li {
display: inline-block;
margin-right: .375rem;
font-size: .875rem;
margin-bottom: 2.5em;
}
[dir="rtl"] .pagination li {
margin-left: .375rem;
margin-right: 0;
}
.pagination li a {
padding: .5rem .625rem;
background-color: white;
color: #333;
border: 1px solid #ddd;
border-radius: 3px;
text-decoration: none;
}
.pagination li.disabled {
display: none;
}
.pagination li.active a:link,
.pagination li.active a:active,
.pagination li.active a:visited {
background-color: #ddd;
}
#TableOfContents ul li {
margin-bottom: 1em;
}
.ananke-socials a{
display: inline-block;
vertical-align: middle;
color: #BABABA;
fill: currentColor;
}
.ananke-socials a .icon svg{
width: 32px;
height: 32px;