Skip to content

Commit

Permalink
chore(fix): being maintained again
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Kollitsch <[email protected]>
  • Loading branch information
davidsneighbour committed Sep 17, 2024
1 parent af9d8e8 commit 9a0a974
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 35 deletions.
10 changes: 0 additions & 10 deletions .github/ISSUE_TEMPLATE/custom.md

This file was deleted.

43 changes: 18 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Ananke is not currently maintained and is seeking a new maintainer. If you're interested, drop an issue. Thanks!

## Ananke, A theme for [Hugo](https://gohugo.io/), a framework for building websites.
## Ananke, A theme for [Hugo](https://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.

Expand Down Expand Up @@ -44,25 +42,24 @@ Also includes examples of Hugo Features or Functions:
- `ge` (greater than or equal to)
- `.Site.Params.mainSections` to avoid hard-coding "blog," etc. [[release note](https://github.com/gohugoio/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](https://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 version
> ```
> Go modules were considered production ready in v1.14. [Download Go](https://golang.org/dl/).
>
> 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>
hugo mod init github.com/<your_user>/<your_project>
```

2. Add the theme's repo to your `config.toml`:
Expand All @@ -76,24 +73,21 @@ This theme uses the "Tachyons" CSS library. This will allow you to manipulate th
Inside the folder of your Hugo site run:

```
$ git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
```
For more information read the official [setup guide](//gohugo.io/getting-started/quick-start/) of Hugo.
For more information read the official [setup guide](//gohugo.io/getting-started/quick-start/) 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:
Expand All @@ -117,17 +111,17 @@ To enable comments, add following to your config file:
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](https://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:
Expand All @@ -153,6 +147,7 @@ languages:
params:
read_more_copy: En savoir plus à ce sujet
```
Using front matter and cascade, this can be customized for a whole section, or just for one page.
```
Expand All @@ -166,10 +161,12 @@ Using front matter and cascade, this can be customized for a whole section, or j
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/
- url*: The url of the handle's profile on the service (Ex: <https://twitter.com/theNewDynamic>, <https://github.com/>
theNewDynamic)
- rel: (default: `noopener`) Controls the `rel` attribute of the "follow" link. Useful for Mastodon verification which requires a `rel="me"` on the link.
```yaml
params:
ananke_socials:
Expand All @@ -183,6 +180,7 @@ params:
```

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')

Expand Down Expand Up @@ -219,6 +217,7 @@ On top of easily customizing the built-in services' label and color, user can ov
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*
Expand Down Expand Up @@ -264,10 +263,8 @@ You can find a list of available typefaces [here](https://github.com/tachyons-cs

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.
Expand All @@ -291,6 +288,7 @@ For example, if your css files are `assets/ananke/css/custom.css` and `assets/an
[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.
Expand All @@ -299,12 +297,10 @@ __Note on retrocompatibiliy for custom css__: If the files registered through th

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:
Expand All @@ -320,6 +316,7 @@ You can set the font color of the main content both globally and on individual p

Globally:
Set the `text_color` param in the `config.toml` file.

```
[params]
text_color = "green"
Expand All @@ -330,7 +327,6 @@ 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. A list can be found [here](https://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.
Expand Down Expand Up @@ -379,9 +375,6 @@ hugo
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)

0 comments on commit 9a0a974

Please sign in to comment.