Log in Sign up

How to create a new template view?

I’ve already forked the diary template and tried to create a new html file for this Blog” page. But this new blog.html file does not show anywhere on the published site. I would like to display a link to this page inside the header.

My understanding is that it has to do with the views in the package.json file, but I’d like to learn more about the best way to implement this properly.

2 replies Asked Jul 27 '21 at 17:19 · Improve this question

By default, blog.html has the URL /blog.html.

You can change this in your template’s configuration file, which is called package.json. For example, consider the package.json property for archives.html.

Let’s say you want blog.html to have the URL /blog. You would add the following to the views key in package.json:

    "blog.html": {
      "url": "/blog"

Does that make sense? Please let me know if you have any questions about this or anything else

Answered Jul 27 '21 at 18:27 · Improve this answer

Thank you so much, it worked :)

Answered Jul 28 '21 at 6:44 · Improve this answer

Please, log in to add a reply.