Multiple Pages

I wonder if I can create one page for short posts and one for the long ones, pointing the home page to the one with the long ones. Is that possible @manton?

Are you sure what you really want isn’t summaries for long posts alongside the short posts? Have a peek at my perspectives page to see what a summarized post might look like.

As for answering the question, yup … totally possible. I’ll help ya once we’re sure a separate page is the way you want to go.

Categories are another way to handle this, because you can create filters that automatically assign categories for long or short posts. Check out this help page for some tips for changing the home page: Custom home page

My Wa.rner.me is an example of using Categories to make the menu pages go to Articles only.
However, I would love to further optimise by not showing the entirety of Articles, a la @moondeer.

@manton do you allow the listing of posts in the summary format, even if as simply as using the title like the Archive page (wa.rner.me/archive) but filtered by category in any of the vanilla templates?
If so I’d switch to it from Typewriter, which doesn’t do a good enough UX job of differentiating between articles (mid-article # title lines look near-identical to new articles).

I wonder if I can create one page for short posts and one for the long ones

This is something I would love for my blog. MB is great and all, but I don’t want to assume, that people know what MB is. So I’d like my index page to only include posts that make sense without knowledge of MB and another page that includes a view of my MB posts.

EDIT: And same goes with the podcast. That should be a separate feed and list-page.

This can be done with the category options (those feeds and pages are automatically made, like /macro/ will exist if you have a category for macro, which can be applied automatically to posts with titles).

You can also customize this with blocks like:

{{ range where .Pages ".Params.title" true }}

2 Likes

I tried this and I’m not sure I did it right, nothing has changed. All posts show up on page whether they have a title or not. I commented out the original line so I wouldn’t have to remember it if I had to do a quick fix.

<ul class="post-list">
  {{ $paginator := .Paginate (where .Site.Pages.ByDate.Reverse "Type" "post") (index .Site.Params "archive-paginate" | default 25) }}
  <!-- {{ range $paginator.Pages  }} -->
  {{ range where .Pages ".Params.title" true }}
      <li class="h-entry">
    {{ if .Title }}
      <h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
    {{ end }}
        <a href="{{ .Permalink }}" class="u-url"><span class="post-meta"><time class="dt-published" datetime="{{ .Date.Format "2006-01-02 15:04:05 -0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time></span></a>
        <div class="e-content">
          {{ .Summary }}
          {{ if .Truncated }}
            <p><a href="{{ .RelPermalink }}">Read More</a></p>
            <hr>
          {{ end }}
        </div>
      </li>
    {{ end }}
  </ul>

You can just use the original and do this (excuse whitespace from copy and paste):

{{ range $paginator.Pages  }} 
{{ if .Title }}
<li class="h-entry">
<h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
<a href="{{ .Permalink }}" class="u-url"><span class="post-meta"><time class="dt-published" datetime="{{ .Date.Format "2006-01-02 15:04:05 -0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time></span></a>
 <div class="e-content">
          {{ .Summary }}
          {{ if .Truncated }}
            <p><a href="{{ .RelPermalink }}">Read More</a></p>
{{ end }}
  </div>
 </li>
<hr>
{{ end }}
{{ end }}
</ul>

I tried that and get this…

Without seeing the whole file, I’m not sure what it is. EOF (end of file) suggests there’s a missing {{ end }} or similar.

I am pausing to make a testing branch…lol, I seem to be breaking things quickly now. Better keep something stable together.