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.


3 years ago, 2 replies   Edit 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 3 years ago · Edit answer

Thank you so much, it worked :)

Answered 3 years ago · Edit answer