Remove Auto-Generated Title (Doks theme)

Hello! Is there some way to remove the title generated automatically on each piece of content. Essentially, I don’t want to duplicate the sidebar title, and would prefer to create custom headings throughout the content body. Thank you!

It’s the other way round: the page .Title front matter value defines the title of the page and is duplicated in the sidepanel (and maybe links, TOC, …)

So I suppose you will break some of that when you change the page title to something else. And users might find it strange if the link “Getting Started” will point to a page called “Another Title” …


The layout is hidden deep in the npm dependencies where the theme is located

If you are prepared and want to go that way you’ll find the layouts in node_modules\@thulite\doks-core\layouts\

you can override theme layouts by copying them to your project folder (as always with Hugo)

For the single page, copy node_modules\@thulite\doks-core\layouts\_default\single.html to layouts\_default\single.html

you could for example:

  • change line 30 to : <h1>{{ or .Params.pageTitle .Title}}</h1>
  • define the parameter in the frontmatter of the page
    params:
       pageTitle: "my Special Title"
    
1 Like

Okay, I’ll check this out. Thank you. Feels a touch over my head at the moment, but I appreciate your thorough response and will dig in!