vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
13.29k stars 2.15k forks source link

Default theme optional banner(s) #4190

Closed jasonkuhrt closed 1 month ago

jasonkuhrt commented 2 months ago

Is your feature request related to a problem? Please describe.

I was looking at the default theme extension slots for how to add a banner to the website but didn't find anything ideal. I ended up using nav bar content with some hacky CSS to create a new row, but this doesn't look great yet and it already took me a bit of time so far.

CleanShot 2024-09-09 at 17 20 02@2x

Describe the solution you'd like

I would like there to be a central place to pass some data to a banner content array that when populated will display a strip above the nav bar consisting of a colour and text.

Describe alternatives you've considered

A slot would work too, but lower level. I think banner is common enough to support is as first class data in the theme config?

Additional context

No response

Validations

brc-dd commented 1 month ago

Duplicate of #2071