SOLVED Slug not working

Hello,

I am using Hugo version 0.18.1,
In my posts front matter I have:


layout: post
comments: true
published: true
title: "ASPNET Core TagHelper’s - A Better @addTagHelper type resolver"
date: 2016-07-25
categories:
- "Development"
tags:
- "ASP.NET CORE"
slug: “aspnet-core-taghelpers-a-better-addtaghelper-type-resolver”

When I build and serve the site, the url for the page is still based on the file name:

http://localhost:1313/blog/2016/07/25/aspnet-core-taghelpers---a-better-addtaghelper-type-resolver/

My question is - why isn’t my slug taking effect - it appears to be only honouring title when forming this last section of the url?

Ok, so I figured this out.

In config.toml - I needed to change this:

[permalinks]
post = “/blog/:year/:month/:day/:title/”

to this:

[permalinks]
post = “/blog/:year/:month/:day/:slug/”

1 Like