Site Stopped Displaying Recent Post Content

Site will not show most recent post content. When I updated Hugo recently I remember some function being changed related to this—the message said that support will be deprecated for the function I was using to list blog posts—but I read through the recent changelogs and can’t figure out what changed. My fault for not writing down and making the fix. Can anyone shed light on this? This is my index.html

{{ define "main" }}

<h1 id="underline">Grass Journal</h1>
草本

<main class="posts">
<hr />

<!-- latest post code  -->
    {{ range first 1 .Pages }}

      <!-- this <div> includes the title summary -->
      <article>


          {{- if .Params.toc }}
              <hr />
              <aside id="toc">
              <div class="toc-title">{{ i18n "tableOfContents" }}</div>
                  {{ .TableOfContents }}
              </aside>
              <hr />
          {{- end }}

          {{ with .Params.Cover }}
              <img src="/img/{{ . }}" class="post-cover" />
          {{ end }}

          <a href="{{.Permalink}}">
          <h1 id="underline">{{ .Title | markdownify }}</h1>
          </a>

          <div class="post-info">

            <p>{{ dateFormat .Site.Params.dateformNumTime .Date.Local }}</p>

          </div>

          <div class="post-content">

              {{ .Content }}

          </div>
      </article>

      {{ end }}

      {{- if .Content }}
          <div class="content">{{.Content}}</div>
      {{- end }}
</main>

{{ end }}

Seems like it is an issue with the {{ range first 1 .Pages }}
This used to show the whole article, and now simply displays a link to the “Posts” page. I think something must have changed in the Hugo backend as I mentioned above. Any help would be appreciated

Try

{{ range first 1 site.RegularPages }}

3 Likes

Perfect