Adds optional banner hooks for docs and blog pages
Makes it possible to optionally add banners to the top of the doc and blog pages, just above the content.
NOTE: I haven't updated the userguide yet, will do it if the users who reported the related issues think this PR is good enough to solve their problem.
Related issues: https://github.com/google/docsy/issues/1784 and https://github.com/google/docsy/issues/1773
To trigger the banner, you have to:
- Create a file in your project called
layouts/partials/hooks/banner.html - Add the HTML code you want in the banner to appear
- Set the
banner: yesparameter in the frontmatter of the page you want the banner on.
If you want to use multiple different banners in your docs, you can create multiple files like: layouts/partials/hooks/<custom-banner-filename>, and set banner: yes and banner_file: <custom-banner-filename> in the frontmatter to display the specified file as banner. Note that currently only one banner can be displayed on a page
I've added a page to the userguide about this feature, so it's ready for review.