/p/ in front of all posts after migrating to another theme

Hey folks.

I migrated from theme Mainroad to Stack and I love it.

However, I’ve noticed in my Google Analytics huge traffic drop and later on in Google Search Console a lot of 404 on my posts. Then I’ve noticed that in front of my base domain https://www.wojcieh.net all posts have /p/ in front of URL.

It is true that I had permalinks configured previously to

[permalinks]
    post = "/:slug"
    page = "/:slug"

but this setting is being ignored when using the new theme.

This is my hugo.toml

baseURL = 'https://www.wojcieh.net'
languageCode = 'en-us'
title = 'Wojciech Marusiak IT Blog'
theme = 'hugo-theme-stack'

[services]
  [services.googleAnalytics]
    ID = 'XXX'
[params]
 gtm_id = 'XXX'

[permalinks]
    post = "/:slug"
    page = "/:slug"

Here is my folder structure

What am I doing wrong here?

You are more likely to receive a prompt and accurate response if you post a link to your project’s Git repository.

See Requesting Help.

Let us see your code

Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.

If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.

Great idea @jmooring

Here is my repo GitHub - wojciehm/wojcieh-net-stacks-troubleshooting

https://github.com/wojciehm/wojcieh-net-stacks-troubleshooting/blob/main/config/_default/permalinks.toml

Please consolidate your configuration; you have a config file in the root of your project and you have a config directory.

Thanks a lot for your support. Indeed it was this config file. As I migrated from the other theme I need to learn exactly how to use it.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.