docsy icon indicating copy to clipboard operation
docsy copied to clipboard

[Feature Request] Insert a footer on every documentation page using a template

Open amirootyet opened this issue 2 years ago • 2 comments

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.

amirootyet avatar Jun 06 '22 20:06 amirootyet

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?

LisaFC avatar Jun 30 '22 22:06 LisaFC

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?

amirootyet avatar Jul 06 '22 21:07 amirootyet

Hi can you please assign this issue to me

ShlokJswl avatar Jan 23 '23 14:01 ShlokJswl

Hi @ShlokJswl we don't assign issues in this project. If you would like to contribute please check out our Contributing Guidelines.

emckean avatar Jan 23 '23 23:01 emckean