0
votes

I'm using Hugo to build a static site, and I can't figure out how to link a markdown file to the header. For example, in this website, clicking the About Me section in the header is simply a rendering of the markdown file content/about.md (see the corresponding git repo).

So I know I have to have the markdown file in the content folder of my site, but I am using a different theme (the Hugo Agency Theme), and I'd want, for example, the About section to link to a separate landing page, say example.com/about, just as it does in hjdskes's page.

I've been stuck on this for a while and would appreciate any help.

Thanks!

2

2 Answers

0
votes

Check to see if the theme lets you configure the menu URLs in the config.toml file.

For instance, I am using tranquilpeak on my Hugo site. The config.toml file has a [menu] section letting me configure what the URL's are for each menu item.

If you put a about.md file in the root of the content/ folder, it is accessed at example.com/about.

0
votes

In your config.toml you can find [params.navigation] section when you can configure the theme. The example config.toml you can find in example site.

If you want to the About section to link to a separate landing page (ex. example.com/about), just

  • comment about = "About" line
  • add the new link to a separate page as follows:

    [[menu.postpend]]
    url = "http://example.com/about"
    name = "About"
    weight = 10

The weight param lets you set the position in the main menu.