How to put the current heading (of level 1) on page header

Hi,

I understand that my question might seem very similar to others with regards to finding the current heading etc. But i also wish to retain the style the heading is shown as.

Something like this:

This is my simplistic code:

set page(
    ... // Configuring the page
    header: {
      set align(center)
      block({
        grid(
          columns: (auto,1fr,auto),
          {
            [1\. Introduction]
          },{},
          {
            context counter(page).display()
          }
        )
        line(length: 100%)
      }, width: 100%)
    },
  )

Thank you for your time!

Hi @Xristos_Dosis and welcome to the forum.

This seems to be a duplicate of How can I add the top level heading title to the header of each page?

Also How to customize the behaviour of how hydra displays a section or heading?

@vmartel08 Thank you so much!