theNewDynamic / gohugo-theme-ananke

Ananke: A theme for Hugo Sites
https://gohugo-ananke-theme-demo.netlify.com/
MIT License
1.1k stars 1.13k forks source link

"Read more" links on home page are flagged by Lighthouse audit #559

Closed HarshRohila closed 1 year ago

HarshRohila commented 2 years ago

Chrome Lighthouse audit flags "Read More" links https://web.dev/link-text/?utm_source=lighthouse&utm_medium=devtools

regisphilibert commented 1 year ago

Hi @HarshRohila there is something in place for you to customize this (though undocumented). The theme has site parameter read_more_copy and a homonymous front matter key you can use. So:

# config.yaml
# Globally for all pages:
params:
  read_more_copy: Read more about this entry
# Just for french
languages:
  fr:
    name: Français
    weight: 2
    params:
       read_more_copy: En savoir plus à ce sujet

Now on the front matter, you can use cascade to apply on a whole section:

# content/posts/_index.md
cascade:
  read_more_copy: Read more about this post

Or the front matter of the given page if it's unique to it.

# content/posts/tower-bridge-london.md
  read_more_copy: Read more about this bridge

I agree though, that by default the theme should not get flagged for this, I'll open an issue to start discussing how to improve the default behaviour of the theme. Also this read_more_copy should definitely get documented.