# Changing page (not section!) sidebar in Hugo Apero theme

**URL:** <https://discourse.gohugo.io/t/changing-page-not-section-sidebar-in-hugo-apero-theme/35031>\
**Category:** support\
**Created:** [October 6, 2021, 6:39pm UTC](https://discourse.gohugo.io/t/changing-page-not-section-sidebar-in-hugo-apero-theme/35031 "2021-10-06T18:39:11Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![G\_Kan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/g_kan/32/13421_2.png) [@G\_Kan](https://discourse.gohugo.io/u/G_Kan)\
**Post date:** [October 6, 2021, 6:39pm UTC](https://discourse.gohugo.io/t/changing-page-not-section-sidebar-in-hugo-apero-theme/35031/1 "2021-10-06T18:39:11Z")

</div>

I am trying to add title / text in general to the sidebar of this page: [Show your work! | GeorgeKan](https://georgekan.netlify.app/books/show_your_work/) but I cannot get it to work. I set the title in the index.md file in the folder but that did not work. Also made sure to remove the title configuration from the \_index.md file in the folder above but again did not help. Why is the title from the index.md sidebar not shown?  
The theme I am using is Hugo Apero: [GitHub - hugo-apero/hugo-apero: Apéro is a Hugo theme for personal websites. A Hugo theme you'll want to hang out with . This is the source for the theme files to install.](https://github.com/hugo-apero/hugo-apero)  
I am new to this but I have searched and tried different configurations to change this (unfortunately with nothing to show for it) Any help or hint would be great.

---

<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:** [October 6, 2021, 7:44pm UTC](https://discourse.gohugo.io/t/changing-page-not-section-sidebar-in-hugo-apero-theme/35031/2 "2021-10-06T19:44:06Z")

</div>

> [@G\_Kan](#):
>
> Why is the title from the index.md sidebar not shown?

The page in question is rendered by:  
themes/hugo-apero/layouts/project/single-sidebar.html

which calls:

```plaintext
{{ partial "shared/sidebar-scaffold.html" . }}

```

which calls:

```plaintext
{{ partial "shared/sidebar/sidebar-header.html" $section }}

```

which contains:

```plaintext
<!--section level-->
{{ with .Params.sidebar }}
  {{ with .title }}<h1 class="f3">{{ . | markdownify }}</h1>{{ end }}
  {{ with .description }}<p class="f6 lh-copy measure">{{ . | markdownify }}</p>{{ end }}
  {{ with .author }}<p class="f7 measure lh-copy i mh0-l">Written by {{ . | markdownify }}</p>{{ end }}
{{ end }}

```

Notice that the context passed to sidebar-header is the current page’s section, not the current page itself.

That means that `sidebar.title`, `sidebar.description` and `sidebar.author` defined in content/books/show\_your\_work/index.md are never read (ignored).

---

<div class="post-metadata">

**Author:** ![G\_Kan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/g_kan/32/13421_2.png) [@G\_Kan](https://discourse.gohugo.io/u/G_Kan)\
**Post date:** [October 6, 2021, 7:57pm UTC](https://discourse.gohugo.io/t/changing-page-not-section-sidebar-in-hugo-apero-theme/35031/3 "2021-10-06T19:57:51Z")

</div>

Thank you very much that is very helpful! (Ok I did not manage to go this far on my own ☹ )  
In order for me to change this configuration, would I need to add a page level configuration in the same file?

---

<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:** [October 6, 2021, 8:04pm UTC](https://discourse.gohugo.io/t/changing-page-not-section-sidebar-in-hugo-apero-theme/35031/4 "2021-10-06T20:04:06Z")

</div>

If it were me, I would [reach out to the theme author](https://github.com/hugo-apero/hugo-apero/issues) for guidance.

However, if you want to experiment:

```bash
mkdir -p layouts/partials/shared/
cp themes/hugo-apero/layouts/partials/shared/sidebar-scaffold.html layouts/partials/shared/

```

and change layouts/partials/shared/sidebar-scaffold.html from:

```nohighlight
{{ partial "shared/sidebar/sidebar-header.html" $section }}

```

to:

```nohighlight
{{ partial "shared/sidebar/sidebar-header.html" $page }}

```

But I don’t know what this would break…

---

<div class="post-metadata">

**Author:** ![G\_Kan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/g_kan/32/13421_2.png) [@G\_Kan](https://discourse.gohugo.io/u/G_Kan)\
**Post date:** [October 7, 2021, 5:11pm UTC](https://discourse.gohugo.io/t/changing-page-not-section-sidebar-in-hugo-apero-theme/35031/5 "2021-10-07T17:11:16Z")

</div>

Well naturally I went and did your recommendation 🙂 For the time being nothing has broken and I managed to put the text I wanted in there. Thank you very much for the help!

---

<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:** [October 9, 2021, 5:11pm UTC](https://discourse.gohugo.io/t/changing-page-not-section-sidebar-in-hugo-apero-theme/35031/6 "2021-10-09T17:11:37Z")

</div>

Closed on October 9, 2021, 5:11pm UTC

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