docus icon indicating copy to clipboard operation
docus copied to clipboard

[Request] Ability to add custom buttons in header

Open notKamui opened this issue 1 year ago • 2 comments

It would be great to be able to add custom buttons (or any elements or components) in the top right section of the header, alongside the theme button. For example, a locale select, or preferred programming language select.

notKamui avatar Jul 07 '23 21:07 notKamui

You can copy AppHeader.vue from the docus project and create a component with the same name in your project. The later will overwrite the former. You will then be able to customize the header to your need.

As an example you can add your custom my-custom-comp component on the right side:

      <div class="section right">
        <AppSearch v-if="hasDocSearch" />
        <ThemeSelect />
        <div class="social-icons">
          <AppSocialIcons />
        </div>
        <my-custom-comp />
      </div>

PhE avatar Jul 13 '23 15:07 PhE

@PhE Thanks a lot, that's a good workaround, so I'm gonna do that for now.

Still, I think it would be good to have an actually implemented solution without working around the template.

notKamui avatar Jul 14 '23 13:07 notKamui