docsy
docsy copied to clipboard
[Feature Request] Insert a footer on every documentation page using a template
We have a use case where we want to put a footer at the end of every published page. It's a short line: "Disclaimer: xxx is yy, not zz." Currently, we've put this in the footer section of the entire site, next to the Privacy/All Right Reserved. But we want this line to be auto-included in every page (the white section) at the end, such that it shows up even when printing the document using the "Print entire section" button.
A quick way to do this would be to override this entire layout adding the content or a new "disclaimer" partial: https://github.com/google/docsy/blob/main/layouts/_default/content.html ...or even just add the additional disclaimer content into your own version of the partial at the bottom of the current content layout (the last modified info): https://github.com/google/docsy/blob/main/layouts/partials/page-meta-lastmod.html
Would that help?
Thank you. I tried adding it to the page-meta-lastmod.html
and it shows up on the page but not in the "print" version ("Print entire section"). Is there a way that it also shows up on the exported PDF?
Within the content, is there a way to add the string to this .Content
variable? Perhaps then it will show up under "print"?
I also tried creating a new partial under layouts/partials/disclaimer.html
. Then, tried to link this under layouts/_default/content
as follows:
...
</header>
{{ .Content }}
{{ partial "disclaimer.html" . }}
...
But it doesn't show up on the pages, and even if it did, not sure if it will show up on "print." I'm guessing only content under the variable .Content
is printed?
Hi can you please assign this issue to me
Hi @ShlokJswl we don't assign issues in this project. If you would like to contribute please check out our Contributing Guidelines.