This document explains hbstack content_panel module
Summary content goes here.
The hb.content_panel module wires in a reusable panel that shows up on single-type pages (blog posts, docs pages, etc.). Out of the box it can surface three kinds of extras:
So it’s not required for a page to render, but it enriches every post/doc with these meta actions instead of you wiring them manually each time.
repo.subpath: exampleSite meansIn the doc snippet you noticed:
1[params.hb.content_panel.repo]
2 service = "github"
3 repo = "user/name"
4 branch = "main"
5 subpath = "exampleSite"
repo.subpath is the folder inside your repository where Hugo content lives. If your site repository looks like:
my-repo/
exampleSite/
content/
config/
…then subpath = "exampleSite" tells the module to insert that folder into the URLs it builds. Without it, the “Edit on GitHub” button would point to github.com/user/name/content/post.md; with subpath, it points to github.com/user/name/exampleSite/content/post.md, which is the real location. On your project, because content sits at the repo root, you can leave subpath blank (which is what we currently do).
If you truly don’t need edit links or translation hints, you can turn the module off by removing the repo block (or setting hb.blog.content_panel.enable = false), but it’s generally worth keeping because the cost is tiny and the convenience compounds.
Blog posts / docs (default integration) The HB blog and docs modules already look for the panel. In hb.blog.yaml you’ve got:
1hb:
2 blog:
3 content_panel:
4 repo:
5 service: github
6 repo: hbstack/theme # <- update this to your own repo if you want accurate edit links
7 branch: main
Update repo/branch to match your GitHub project (AbdulSayyed/ghafoors-blog and your active branch). The docs module fragment already points to your repo, so docs pages get the proper links today.
Footer or other sections
The content panel is just a partial called hb/modules/content-panel. You can drop it anywhere with:
{{ partial "hb/modules/content-panel" (dict "Page" .) }}
Use it sparingly (it’s pretty tall), but if you want a “Contribute” block in the footer or sidebar, that’s the hook.
Disabling per section If, say, you want it on blog posts but not on landing pages, you can override in front matter:
1hb:
2 content_panel:
3 enable: false
…or set hb.blog.content_panel.enable = false in params if you want to hide it across the entire blog section.
subpath is the repo subfolder the content lives in, leave empty if your content is at the root.hb.blog.content_panel (and hb.docs.content_panel, etc.) or call the partial manually if you want it someplace custom like the footer.