Tags link related content lost?

hi ,
i use taxonomy for authors, tags and category.
I use this doc for create author 's taxonomy : https://www.netlify.com/blog/2018/07/24/hugo-tips-how-to-create-author-pages/

i create a related content widget with this code :

my code
{{ $related := .Site.RegularPages.RelatedIndices . "tags"  | first 10 }}

{{ with $related  }}
{{ range .Reverse}}

 <div class="md:flex sm:w-3/4 shadow-xl mx-auto p-6  mb-16">
  <img class=" mx-auto my-auto rounded-full h-24 w-24 border-4 border-blue-800 "
    src="{{with .Params.featured_image}}{{.}}{{else}}{{ .Site.Params.featured_image }} 
{{end}}" alt="">
  <div class=" my-auto p-5">
    <h3 class=" md:text-left text-center text-blue-900 text-md mb-1 "><a href="{{ 
     .Permalink }}">{{ .Title }}
    <a href="{{ .RelPermalink }}" class="text-xs text-blue-900"><i class=" mr-1 far fa- 

        <!-- date en Fr via data/mois.yaml merci https://www.christopheducamp.com/ ;) -->
        <time class="post-date dt-published"
            datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}'>{{ 
         .Date.Day }}
            {{ index $.Site.Data.mois (printf "%d" .Date.Month) }} {{ .Date.Year }}</time>

        <i class=" mr-1 fas fa-clock"></i>
        {{.ReadingTime }} minutes</a>
    <p class=" md:text-left text-center text-sm mb-2 mt-8 ">
        {{ with .Params.description }}
        {{ . }}{{ end }}

    <p class=" text-justify text-xs mt-2 "> {{.Summary}} <a href="{{ .Permalink }}"
            class=" italic text-right text-blue-500">
            Lire ...</a></p>


        {{ end }}

         {{ end }}

i think i have a problem because if i have 3 posts with same tags “cacke” for example.
first post related = post 2 & post 3
if i click one post 2, post related = post 3 (but where is post one ?)
if i click on post 3 , post related = empty (but where are post one & 2 ? )

why posts related don’t keep if i navigate ?

thank you very munch fo your help

When you ask for help in #support, follow the advice at Requesting Help and share your code. For instance, we don’t know how your related content is configured. You may need to set includeNewer: true.

1 Like


i sharing my code one my first post…
and i sharing how i created my taxonomy with netlify courses.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.