219 Commits

Author SHA1 Message Date
Kenji Eva
4d8dfae7b4 tweak list file for config colors 2025-05-06 14:37:38 +00:00
Patrick Kollitsch
36503c4f9d
refactor: sort css classes
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2025-03-29 08:51:01 +07:00
Patrick Kollitsch
c789473802
theme(fix): hyperlink text color on home different from other pages (on more layouts)
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2025-03-29 08:26:32 +07:00
Patrick Kollitsch
cd830339f0
theme(fix): hyperlink text color on home different from other pages
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2025-03-29 08:24:46 +07:00
Patrick Kollitsch
180471112e
refactor: move all template methods to proper GoHugo methods
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2025-03-10 16:29:18 +07:00
Patrick Kollitsch
40fea59c8b
theme(fix): rework of the way the main sections for index.html are calculated
the following is a draft for the release page that should explain most of it:

* Index page: the way main sections were evaluated was unclear and probably changed much from the original design in GoHugo. This has been fixed and the main sections are now evaluated in a more consistent way. This might affect what is shown on your website, so open a discussion if you see something wrong and try to explain exactly what you expected to see in sense of included posts and order of those posts.

  The old way did this: check all configured main sections (or post, if nothing is set) > range through the section and display the first n+m posts (n = number of full previews, m = number of title previews only).

  The new way does this: load all posts in the main sections > range through the collection and display the first n+m posts (n = number of full previews, m = number of title previews only).

  Basically, the old way took every single section you configured and displayed them separate, the new way takes all posts from all sections and displays them in one list. This is more consistent and should be more predictable for you as a user. It's also the way it was intended to work from the beginning according to the documentation.

closes #686

Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2025-02-09 16:52:52 +07:00
Patrick Kollitsch
3fc0dba401
theme(fix): add author bylines and fix author generation
closes #623

Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2025-02-09 15:55:24 +07:00
Patrick Kollitsch
2bd232b5ec
refactor(codestyle): rewrite author meta tag generation
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2025-02-09 15:54:05 +07:00
Jeremy Mayeres
e64f74c492
theme(fix): social follow/share using new config (#821)
A recent commit changed the config for social to use a map instead of a
list, this broke the social share/follow, though a quick fix seems to
restore it and removes the need for sorting.

Closes #808

I checked the wikipedia example from the original issue and it seems
like this will also fix that. I'm not sure if you had anything else to
fix, feel free to push to my branch.
2025-02-09 15:03:52 +07:00
Patrick Kollitsch
5ab0adb0e1
refactor: using full file names for partials
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2025-02-01 06:58:46 +07:00
Patrick Kollitsch
f672979149
theme(fix): move by.html into single.html
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2025-01-31 08:22:40 +07:00
Patrick Kollitsch
1f4ac20f4f
theme(fix): remove additional config load and some refactoring
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2024-12-15 13:00:09 +07:00
Klaas Demter
b06949eb2d
theme(fix): add show_recent_posts parameter to stop showing recent posts on index (#795)
<!---

Add the issue number that is discussed and fixed by this PR (In the form
`Closes #123`). If this PR doesn't fix an issue, remove the line below.
This will
also lead to us not treating this PR as an important one. It might be
closed
without a review.

If there is no issue associated with this PR and you are not a
maintainer of
this repository, your PR might be closed without a review.

-->

Closes #794

You can no longer set `recent_posts_number = 0` because in current hugo
versions `{{ $n_posts := $.Param "recent_posts_number" | default 3 }}`
will default to three if recent_posts_number is 0. This used to work a
couple of versions back, I am assuming this is not a regression but
rather wanted behavior in hugo -- so I introduce a new parameter
(boolean) `show_recent_posts` to enable(default) or disable recent posts
on index.



<!---

Explain what this PR does and what existing problem it solves. If this
PR is a
work in progress, please prefix the title with [WIP].

-->

<!--

Make sure that the code is readable and well-documented. If you have
added new
functionality, please add the necessary documentation.
If testing of the new functionality is possible, please add tests.

-->
2024-12-02 12:17:41 +07:00
Patrick Kollitsch
e726c8b70f
docs: remove comments about HUGO_ENV
we use internal methods like  and

Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2024-10-29 14:25:37 +07:00
Patrick Kollitsch
055015e5b4
fix: proper rel attribute evaluation
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2024-10-27 20:24:03 +07:00
Ramiro Morales
58e742ef62
theme(fix): share link building when params particle is present (#769)
In these cases the site permalink is used instead of the social network
URL for sharing as defined in the `link` value
(https://www.linkedin.com/shareArticle in the below example)

Most visible case is LinkedIn but all social networks that have

```toml
[ananke.social.networks.particles]
...
params = "..."
```

in `config/_default/params.toml` are affected by this bug.

Closes #768.
2024-10-26 06:05:18 +07:00
Melroy van den Berg
473c7c14c6
theme(fix): remove caching of share links (#757)
You can't just cache the share links, that will result into every blog
post having the same URL.

Just use `partial` on the getShareLink.html. So now each post will show
the correct URL to share the post via social media or alike.

---------

Signed-off-by: Melroy van den Berg <melroy@melroy.org>
Signed-off-by: Patrick Kollitsch <83281+davidsneighbour@users.noreply.github.com>
Co-authored-by: Patrick Kollitsch <83281+davidsneighbour@users.noreply.github.com>
2024-10-24 16:58:58 +07:00
Patrick Kollitsch
1bcc471e00
theme(fix): paths to social func partials
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2024-10-24 16:56:53 +07:00
Patrick Kollitsch
ae14ccf407
docs(fix): update theme.toml with min version and authors
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2024-10-24 15:28:55 +07:00
Melroy van den Berg
2cfb09e9a3
theme(fix): add transform.Plainify to the summary body content of the share links (#758)
You definitely want to **add Plainify transformer first**, because the
body content will become a HTML encoding mess. I left `HTMLEscape` there
as well, just be sure for security reasons. But if you want, I can
remove the second transformer.

Like a tweet on X will look like this:


![image](https://github.com/user-attachments/assets/73ab37b0-decc-47a4-8bbd-cf43cbef1641)


After implementing `transform.Plainify`, it will look much better:


![image](https://github.com/user-attachments/assets/962ba515-72ae-4b46-827f-2c477358d065)

(ignore the red, I don't have X premium pro blabla, it's red because I
hit the max limit of chars)

Signed-off-by: Melroy van den Berg <melroy@melroy.org>
2024-10-24 05:56:04 +07:00
Melroy van den Berg
12cd81b681
theme(fix) social share cache (#755)
Do NOT use the same cache name for social _share_ and social _follow_..

This will never work of course.

Signed-off-by: Melroy van den Berg <melroy@melroy.org>
2024-10-22 17:53:04 +07:00
Cyrill Raccaud
5a1776455f
complete the feature for the cover dimming class in page (#732)
- feature already present for site
- add info for the param to the example

Like https://github.com/theNewDynamic/gohugo-theme-ananke/pull/702, this
PR wants to add the cover class to the page as well, but adds also the
documentation to the example and allows both for page params and site
params.

Solves https://github.com/theNewDynamic/gohugo-theme-ananke/issues/696
in a proper way for site and page with fallback and documentation in the
example.

Default:

<img width="1512" alt="Bildschirmfoto 2024-10-12 um 14 47 12"
src="https://github.com/user-attachments/assets/fbbec618-2045-4be7-94d7-09169a253a96">

Same as default `cover_dimming_class = bg-black-60`:

<img width="1512" alt="Bildschirmfoto 2024-10-12 um 14 47 12"
src="https://github.com/user-attachments/assets/fbbec618-2045-4be7-94d7-09169a253a96">

`cover_dimming_class = bg-black-20`:

<img width="1512" alt="Bildschirmfoto 2024-10-12 um 14 47 20"
src="https://github.com/user-attachments/assets/7bf64564-4f6d-42c9-bed1-83b426d487ae">

`cover_dimming_class = bg-black-90`:

<img width="1512" alt="Bildschirmfoto 2024-10-12 um 14 47 34"
src="https://github.com/user-attachments/assets/354a0e49-7446-46d7-adc1-f8e4ecee3831">


**Closing issues**

closes #702
closes #696

---------

Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
Co-authored-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2024-10-21 15:48:03 +07:00
Cyrill Raccaud
9fc4b73a36
theme(fix): header image positioning (#731)
Currently, the header image for a post is `bg-top`, but it would be nice
the control this behavior to lets say `top|center|bottom`, as often the
interesting part of an image is in the center. Using the
`featured_image_class` param, one can now customize the class to control
the alignment of the featured header image. It is also possible to add
additional classes for further customization if needed.


Default case:

<img width="1512" alt="Bildschirmfoto 2024-10-12 um 14 23 10"
src="https://github.com/user-attachments/assets/477bafd2-e50a-44bf-93df-2289cb8380b2">

Same as default case but set explicitly `featured_image_class = cover
bg-top`:

<img width="1512" alt="Bildschirmfoto 2024-10-12 um 14 23 10"
src="https://github.com/user-attachments/assets/477bafd2-e50a-44bf-93df-2289cb8380b2">

`featured_image_class = cover bg-center`:

<img width="1512" alt="Bildschirmfoto 2024-10-12 um 14 23 27"
src="https://github.com/user-attachments/assets/7bae039d-d31b-405b-b5c0-0dc9e13a4f8c">

`featured_image_class = cover bg-bottom`:

<img width="1512" alt="Bildschirmfoto 2024-10-12 um 14 23 36"
src="https://github.com/user-attachments/assets/52dc14cd-2a30-4763-ae90-353d10fb34e7">

`featured_image_class = contain bg-top`:

<img width="1512" alt="Bildschirmfoto 2024-10-12 um 14 29 16"
src="https://github.com/user-attachments/assets/1ee6f371-f2b4-4740-924d-9ea6c1a44df8">

**Code formatting**

<!-- See the simple style guide. -->

**Closing issues**

Closes #729
2024-10-21 14:57:39 +07:00
Patrick Kollitsch
cc6da237ea
theme(fix): use internal methods to evaluate environment
closes #625
closes #733
closes #453
closes #574

Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2024-10-21 10:03:45 +07:00
Patrick Kollitsch
a9cd70d1e6
theme(fix): bring some logic into /disabled sharing
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2024-10-21 06:54:33 +07:00
Patrick Kollitsch
825ea52af9
theme(fix): cleanup unused functions
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2024-10-21 06:02:43 +07:00
Patrick Kollitsch
14eeb655ce
theme(fix): hover color for social icons
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2024-10-21 05:59:52 +07:00
Patrick Kollitsch
d9f9cb513f
theme(feat): social share links (wip)
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2024-10-21 05:46:32 +07:00
Patrick Kollitsch
8762f563f9
theme(fix): making sure the noopener rel attribute stays even with other configurations
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2024-10-20 17:23:51 +07:00
Patrick Kollitsch
7913086a0f
theme(fix): add labels and label override functionality
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2024-10-20 15:58:53 +07:00
Patrick Kollitsch
9254c455c9
theme(fix): override profile link generation with full link
Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2024-10-20 15:27:19 +07:00
Patrick Kollitsch
4f3e709d83
theme(feat): social media follow links
documentation will follow at https://github.com/theNewDynamic/gohugo-theme-ananke/wiki/Social-media-network-setup

Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2024-10-20 12:47:56 +07:00
Joe Mooring
0b0fe2fd45 refactor: Simplify lang attribute in html element 2024-10-17 09:36:37 -07:00
Patrick Kollitsch
321680f6ee
theme(fix): replace deprecated resources.ToCSS with css.Sass
fixes #712

Signed-off-by: Patrick Kollitsch <patrick@davids-neighbour.com>
2024-09-17 23:31:24 +07:00
Ramiro Morales
33fbda0e9d
Fix render breakage introduced in #665 (#685)
A bare bones setup of two pages and two posts gets broken because of a
template change missed in #665

Fatal error message in readable form:
```
ERROR render:
failed to render pages:
render of "home" failed: "/themes/ananke/layouts/index.html:48:23":
execute of template failed:
template:
index.html:48:23:
executing "main" at <.Site.GetPage>: can't evaluate field Site in type string
```

Steps to reproduce:

```shell
hugo new site quickstart
cd quickstart
git init
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
echo "theme = 'ananke'" >> hugo.toml
echo -e "+++\ntitle='Home'\n+++\n\nMain page" > content/_index.md
echo Foo. > content/page1.md
echo Bar > content/page2.md
mkdir -p content/post
echo "First post." > content/post/post1.md
echo "Second post." > content/post/post2.md
hugo server
Watching for changes in .../quickstart/{archetypes,assets,content,data,i18n,layouts,static,themes}
Watching for config changes in .../quickstart/hugo.toml, ...quickstart/themes/ananke/config.yaml
Start building sites …
hugo v0.125.3-474c4c02212cf97712c6fbf4159c68822ea6e078+extended darwin/amd64 BuildDate=2024-04-22T17:18:35Z VendorInfo=brew

Built in 67 ms
Error: error building site: render: failed to render pages: render of "home" failed: ".../quickstart/themes/ananke/layouts/index.html:48:23": execute of template failed: template: index.html:48:23: executing "main" at <.Site.GetPage>: can't evaluate field Site in type string
```
2024-05-03 13:43:35 -04:00
Blackeye
f34c219436
Contribution: fix hard-coded link to section #664 (#665)
* allow_multiple_mainsection

* removed comment

---------

Co-authored-by: Blackeye <>
2024-04-18 11:26:30 -04:00
Johannes Arnold
0d068637cc
Include authors meta tag (#634) 2024-04-18 11:23:24 -04:00
Joe Mooring
91df000ca8
Access Disqus shortname from canonical location (#660) 2023-11-22 11:05:23 -05:00
mathew
bd759431a9
Add missing "read more" link to summary.html (#658)
* Add missing "read more" link to summary.html

* Fix layouts/post/summary to add read more link
2023-11-21 15:08:47 -05:00
mathew
64dc2b6dea
Fix capitalization of single header for a11y (#657)
Thank you!
2023-11-21 15:06:16 -05:00
Joris Conijn
221a0d8817
feat: add canonical url support (#650)
When you want to publish content that is already published on a different site. You need to reference a canonical url of the original content.
By defining the `canonicalUrl` in the front matter definition the canonical url is set in the headers.
2023-11-21 14:41:58 -05:00
Melroy van den Berg
c086834f0e
Change to /intent/tweet (#652)
Change from /share to /intent/tweet.
2023-09-19 11:47:32 -04:00
Regis Philibert
c62bf44379
html[lang]: use site.Language.Lang when languageCode is not set. (#617)
Fixes #613
2023-02-03 14:55:04 -05:00
Aren Siekmeier
6affbfb0dd
fix permissions (#581) 2022-12-14 09:56:24 -05:00
James Henstridge
5f5dfb15e8
assets: update mastodon logo in social links (#597)
* assets: replace Mastodon logo

The new version is based on the logo-black.svg file distributed from
https://joinmastodon.org/branding, adjusted to match the metrics of the
other social logos.

* layouts: change the color for the mastodon social link

I've picked a purple from https://joinmastodon.org/branding.
2022-12-14 09:55:14 -05:00
Regis Philibert
a0c7382c59
Fix duplicate rel attributes on social-follow 2022-12-02 16:32:01 -05:00
Regis Philibert
6b66dc32d4
Add a rel option to social registers (#596)
* Add a `rel` option to social registers

Fixes #417

* Fix typo
2022-12-02 14:22:06 -05:00
Regis Philibert
b393088d09
Make sure only the title closest to content is an h1, (#585)
not the hero's.

Fixes #584
2022-10-31 11:34:59 -04:00
James Henstridge
5a8b531a7c
Improve links for sitemap and taxonomies (#569)
* layouts: use absURL to construct absolute URLs instead of concatenating with .Site.BaseURL

* layouts: let hugo generate URLs to taxonomy terms

* layouts: link to current language's home page in the site footer
2022-09-07 08:36:32 -04:00
Steven Solomon
26a78654fa
Add support for GA4 (#572)
Use new default Hugo GA template
2022-09-06 10:05:55 -04:00