Log in Sign up

Page with Tag

I'm trying to make a custom page that includes a list of posts with a certain tag. I've tried following the instructions on this page, but without success.

Here's my code for now.html:

<!DOCTYPE html>
<html>
    {{> head}}
    <body>
        {{#allEntries}}
            {{#tagged.Now}}
                 <p><a href="{{{url}}}">{{title}}</a></p>
            {{/tagged.Now}}
        {{/allEntries}}
    </body>
</html>

I also added this to package.json;

{
  "now.html": {
      "partials": {
        "title": "Now - {{{title}}}",
        "description": "What's up right now."
      }
    }
}

And sitemap.xml:

  <url>
    <loc>{{blogURL}}/now/</loc> 
  </url>

But heydingus.net/now still leads to a 404. Am I doing something wrong?


2 years ago, 3 replies   developers   Edit question

Your package.json entry for now.html should look like this:

"now.html": {
      "url": "/now",
      "partials": {
        "title": "Now - {{{title}}}",
        "description": "What's up right now."
      }
    }

Does that help?

Answered 2 years ago · Edit answer

Yes! Thank you! I was able to start editing the page, but then ran into a new roadblock. My goal is to have the latest entry tagged "Now" to display in full, and then a list of links to all the rest of the posts tagged "Now" to show below.

Here's my html, but the live page only seems to be rendering out the list of entry links. None of my h1 tags, p tags, or my attempt to pull in an entry are rending. What did I miss?

Answered 2 years ago · Edit answer

Fixed! I think it was because the text wasn't all within the entry class.

HTML for my now page

Answered 2 years ago · Edit answer