Skip to content

How to display ancestors, not just first section? #63

Closed Answered by razonyang
TetraTheta asked this question in Q&A
Discussion options

You must be logged in to vote

With github.com/hbstack/[email protected], you can disable the first section by configuring cascade.

// hugo.yaml
cascade:
  - _target:
      path: /**
    params:
      meta:
        first_section: false

And then create hb-blog-post-meta hook, and save it as layouts/partials/hugopress/modules/hb-custom/hooks/hb-blog-post-meta.html, please do not forgot to configure it in params.yaml to tell hooks system to load it.

// params.yaml
// ...
hugopress:
  modules:
    hb-custom:
      // ...
      hooks:
        hb-blog-post-meta:
          cacheable: false

With this, you don't have to care about upstream changes, you can append any meta you want.

Replies: 3 comments 33 replies

Comment options

You must be logged in to vote
3 replies
@TetraTheta
Comment options

@razonyang
Comment options

@TetraTheta
Comment options

Comment options

You must be logged in to vote
5 replies
@TetraTheta
Comment options

@razonyang
Comment options

@razonyang
Comment options

@TetraTheta
Comment options

@razonyang
Comment options

Comment options

You must be logged in to vote
25 replies
@TetraTheta
Comment options

@razonyang
Comment options

@TetraTheta
Comment options

@razonyang
Comment options

@TetraTheta
Comment options

Answer selected by TetraTheta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants