Display Content in index.html

I try to display post in folder content to my index.html file.
how do i can get the link post, title post, and descripton post
You can see the theme I’m trying to edit here
https://github.com/dualbios4/mundana-hugo

    <div class="mb-5 d-flex justify-content-between main-loop-card">
    <div class="pr-3">
    <h2 class="mb-1 h4 font-weight-bold"><a class="text-dark" href="POST-LINK"> POST-TITLE</a></h2>
    <p class="excerpt">DESCRIPTION-POST</p>
    <div><small class="d-block text-muted">In <span class="catlist"><a class="text-capitalize text-muted smoothscroll" href="CATEGORY-LINK"/>CATEGORY-NAME</a>, </span><span class="text-muted">DATE-POST</span></small></div>
    </div>
    <div class="col-md-3 pr-0 text-right">
      <a href="POST-LINK"><img class="w-100" src="FUTURED-IMAGE" alt="POST-TITLE"/></a>
    </div>

for example like the example above, how can I get
POST-LINK
POST-TITLE
DESCRIPTION-POST
CATEGORY-LINK
CATEGORY-NAME
DATE-POST
FUTURED-IMAGE

  1. POST-LINK > {{ .Permalink }}
  2. POST-TITLE > {{ .Title }}
  3. DESCRIPTION-POST > {{ .Params.description }}
  4. CATEGORY-LINK > {{ .Params.categories | absURL }}
  5. CATEGORY-NAME > {{ .Params.categories }}
  6. DATE-POST > {{ .Params.date }}
  7. FUTURED-IMAGE > {{ .Params.featured_image }} or {{ .Params.featuredImage }} or {{ .Params.image }}

NB:

  1. Your posts have featuredImage, featured_image and image. Which do you want to use?
  2. Why are your image links pointing to WordPress links?
  3. In Hugo, I recommend using relative paths for images. For example,for images in an “images” folder in the static folder (/static/images/imagename.jpg), you can do featured_image: images/image-name.jpg in your front-matter (ensuring your baseURL in the configuration file ends with a forward slash /). Then your FUTURED-IMAGE becomes {{ .Params.featured_image | absURL }}.
  4. The ‘date’ accepts different formats that you can test.

Ensure you check the HUGO documentation.

Thanks for the help, I really appreciate it. and now i have another problem
how can i show multiple posts based on from {{ .Params.categories }}

i try this but it displays multiple posts by date

{{ range ( first 9 ( where .Site.Pages "Type" "posts" ).ByDate ) }}   
   <div class="row">
        <ul>
            <li>
                <a href="{{ .Permalink }}">{{ .Title }}</a>
            </li>
        </ul>
    </div>
{{ end }}

Do you want to show by a specific category? By default, all post are sorted by date.

Yes, show by a specific category. how i can do that

Remember to replace category-name with the name of the specific category you want.

{{- $pages :=  where (where site.Pages "Type" "post") ".Params.categories" "category-name" }}
{{ range $pages | first 9 }}
   <div class="row">
        <ul>
            <li>
                <a href="{{ .Permalink }}">{{ .Title }}</a>
            </li>
        </ul>
    </div>
{{ end }}

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