# Two questions:

**URL:** <https://discourse.gohugo.io/t/two-questions/47714>\
**Category:** support\
**Created:** [January 5, 2024, 9:20am UTC](https://discourse.gohugo.io/t/two-questions/47714 "2024-01-05T09:20:11Z")\
**Posts on this page:** 13\
**Page:** 2

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [January 6, 2024, 3:36am UTC](https://discourse.gohugo.io/t/two-questions/47714/21 "2024-01-06T03:36:33Z")

</div>

First, change your menu definition in config.yaml. Use `pageRef` instead of `url`, and place the slash at the front of each path instead of at the end of each path.

```yaml
        menu:
            main:
                - name: About
                  pageRef: /about
                  weight: 1
                - name: Videos
                  pageRef: /videos
                  weight: 5
                - name: Search
                  pageRef: /search
                  weight: 10
                - name: Donate
                  pageRef: /donate
                  weight: 11
                - name: Tags
                  pageRef: /tags
                  weight: 12
                - name: RSS
                  pageRef: /feed
                  weight: 15

```

Second, modify layouts/\_default/list.html, starting at line 43:

```plaintext
{{- if .IsHome }}
  {{- $menuPages := slice }}
  {{- range site.Menus.main }}
    {{- $menuPages = $menuPages | append .Page }}
  {{- end }}
  {{- $pages = site.RegularPages | complement $menuPages }}
  {{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }}
{{- end }}

```

This builds a slice of the pages that appear in the menu, then subtracts those pages from `site.RegularPages` using the [`complement`](https://gohugo.io/functions/collections/complement/) function.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [January 6, 2024, 3:42am UTC](https://discourse.gohugo.io/t/two-questions/47714/22 "2024-01-06T03:42:17Z")

</div>

Or you could add `hiddenInHomeList: true` to the front matter of the pages that you want hidden in the home list. If you choose to do this instead, still make the menu changes as shown above. A number of theme authors are still providing examples using the `url` property for internal links instead of the `pageRef` property, but that is not the idiomatic way to do it (and will cause subtle problems under certain conditions).

And going back to my earlier comment about content modeling… it would be much simpler to place the non-menu pages (resume, privacy policy, my first post) in a subfolder (posts, articles, whatever). Then on the home page just iterate over that content type (“posts”, “articles”, whatever).

---

<div class="post-metadata">

**Author:** ![anon34071626](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@anon34071626](https://discourse.gohugo.io/u/anon34071626)\
**Post date:** [January 6, 2024, 12:16pm UTC](https://discourse.gohugo.io/t/two-questions/47714/23 "2024-01-06T12:16:24Z")

</div>

So, I tried both those approaches, and nothing seemed to have changed, so I tried to `hugo server` and I got the error `Error: add site dependencies: load resources: loading templates: "/home/mindlux/Documents/git/llmilne.com/layouts/_default/list.html:114:1": parse failed: template: _default/list.html:118: unexpected {{end}}`. I reset that file back to how it was after we first changed it, and I got the same error, just with 114 instead of 118, because obviously I didn’t add the extra four lines you gave me.

Sorry, I hit the new user reply limit. Had to weight seven hours.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [January 6, 2024, 12:25pm UTC](https://discourse.gohugo.io/t/two-questions/47714/24 "2024-01-06T12:25:57Z")

</div>

I don’t post untested code. Try it:

```plaintext
git clone --recurse-submodules https://github.com/jmooring/llmilne.com
cd llmilne.com
hugo server

```

---

<div class="post-metadata">

**Author:** ![anon34071626](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@anon34071626](https://discourse.gohugo.io/u/anon34071626)\
**Post date:** [January 6, 2024, 1:01pm UTC](https://discourse.gohugo.io/t/two-questions/47714/25 "2024-01-06T13:01:30Z")

</div>

```auto
Start building sites …
hugo v0.111.3+extended linux/amd64 BuildDate=2023-07-26T00:00:00+00:00 VendorInfo=Fedora:0.111.3-4.fc39
Error: Error building site: failed to render pages: render of "home" failed: "/home/mindlux/Documents/llmilne.com/layouts/_default/list.html:46:34": execute of template failed: template: _default/list.html:46:34: executing "main" at <append .Page>: error calling append: reflect: call of reflect.Value.Type on zero Value
Built in 47 ms

```

Sorry, hit the daily maximum amount of replies a new user can make. It’s midnight now.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [January 6, 2024, 1:12pm UTC](https://discourse.gohugo.io/t/two-questions/47714/26 "2024-01-06T13:12:12Z")

</div>

Please use v0.115.0 or later, preferably the latest release (v0.121.2).

[https://gohugo.io/installation/linux](https://gohugo.io/installation/linux)

---

<div class="post-metadata">

**Author:** ![anon34071626](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@anon34071626](https://discourse.gohugo.io/u/anon34071626)\
**Post date:** [January 7, 2024, 11:58pm UTC](https://discourse.gohugo.io/t/two-questions/47714/27 "2024-01-07T23:58:13Z")

</div>

I updated my Hugo version. Mine gave me the same error as before, while yours worked perfectly fine.

After running the `diff` command, the result is:

```auto
1c1
< {{- define "main" }}
---
> {{ "main" }}

```

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [January 8, 2024, 12:11am UTC](https://discourse.gohugo.io/t/two-questions/47714/28 "2024-01-08T00:11:20Z")

</div>

This won’t work:

`{{ "main" }}`

So change it back to what it was.

---

<div class="post-metadata">

**Author:** ![anon34071626](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@anon34071626](https://discourse.gohugo.io/u/anon34071626)\
**Post date:** [January 8, 2024, 1:45am UTC](https://discourse.gohugo.io/t/two-questions/47714/29 "2024-01-08T01:45:36Z")

</div>

I never changed that line. the only line I changed in the entire file was line 43 to 50 as mentioned earlier, however, I changed my file to exactly what yours said for line 1, and it worked fine. I’m not sure if that’s what you meant, but my website looks exactly how I wanted it to look, so yeah, thanks. Marking as solved.

---

<div class="post-metadata">

**Author:** ![anon34071626](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@anon34071626](https://discourse.gohugo.io/u/anon34071626)\
**Post date:** [January 8, 2024, 2:44am UTC](https://discourse.gohugo.io/t/two-questions/47714/30 "2024-01-08T02:44:53Z")

</div>

One more question because it’s easier to get them all out whilst I have someone who knows what they’re doing, do you know how to make it so that when you click my name in the top left, it doesn’t select any of the “tabs” automatically (it currently selects “Videos” as indicated by the underline)? And how I can customise the “Videos” page, so that where it says: “Illuminating peoples’ thought processes.” I can write something different like: “This is the videos page.” For example?

Basically, what I want (if it makes sense) is:

Home page (the page it brings you to upon clicking my name in the top left) no “tab” is highlighted, URL is [https://llmilne.com/](https://llmilne.com/) and the blurb says “Illuminating peoples’ thought processes.”

Videos page (the page it brings you to upon clicking on the Videos tab on the top right) “Videos” “tab” is highlighted, URL is [https://llmilne.com/videos/](https://llmilne.com/videos/) and the blurb says “Placeholder.”

Do you know how I can do that?

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [January 8, 2024, 3:33am UTC](https://discourse.gohugo.io/t/two-questions/47714/31 "2024-01-08T03:33:31Z")

</div>

You need to create a videos page, and make sure draft is set to false.

```plaintext
hugo new content videos.md

```

```plaintext
---
title: "Videos"
date: 2024-01-07T19:28:19-08:00
draft: false
---

Whatever...

```

Then change your menu entry from this:

```yaml
- name: Videos
  pageRef: /v
  weight: 5

```

to this:

```yaml
- name: Videos
  pageRef: /videos
  weight: 5

```

Please open a new topic if you have further questions. I’m a bit fatigued by this one.

---

<div class="post-metadata">

**Author:** ![anon34071626](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@anon34071626](https://discourse.gohugo.io/u/anon34071626)\
**Post date:** [January 8, 2024, 3:43am UTC](https://discourse.gohugo.io/t/two-questions/47714/32 "2024-01-08T03:43:47Z")

</div>

No, that was perfect, and I’ll stop now. Mate, I wish you the most wondrous day. thanks a tonne.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [January 10, 2024, 3:44am UTC](https://discourse.gohugo.io/t/two-questions/47714/33 "2024-01-10T03:44:34Z")

</div>

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

[Previous page](https://discourse.gohugo.io/t/two-questions/47714.md?page=1)
