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?

3 replies

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 a year ago · Improve this 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 a year ago · Improve this answer

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

HTML for my now page

Answered 10 months ago · Improve this answer

Markdown allowed
Question or feedback?
Contact us

Tags

developers 92 questions bug 48 questions posts 27 questions resolved 27 questions metadata 26 questions templates 24 questions how 14 questions tags 13 questions markdown 12 questions google-drive 10 questions More tags →
Subscribe for changes
RSS Feed of latest questions