All posts in one page, nothing else

What would the easier way to replicate the behaviour of this site (muanchiou) be? They are all posts in our page, with permalinks for each post on the page itself, nothing else.

Something like this might get you there. I use it as a Section layout for one of my content types, but it might work as the homepage layout with some tweaking:

{{ define "main" }}

  <div role="main" class="container">
    <div class="row">
      <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
        {{ with .Content }}
          <div class="well">
            {{.}}
          </div>
        {{ end }}


          <ul class="contents">
          {{ range .Pages }}
              <li><a href="{{.Permalink}}">{{.Date.Format "2006-01-02"}} | {{.Title}}</a></li>
          {{ end }}
          </ul>

</div>
</div>
</div>
{{ end }}

Hello @Fastidious

you can get all post in one page like this

<ul class="notes">
  {{ range .RegularPages }}
  <li class="note" id="{{.PublishDate | urlize}}">
    <h2 class="note-heading">
      <a href="#{{.PublishDate | urlize}}">{{.PublishDate.Format "Jaunary 02, 2006"}} #</a>
    </h2>
    <div class="note-body">{{.Content}}</div>
  </li>
  {{ end }}
</ul>

Thank you much, both! So, just create (or modify) my index.html layout with those contents, correct?

or home.html should do the trick.

1 Like

Yes, it should be index.html if you want to show all your post in homepage.

1 Like

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