[Demo] Add a tidelift footer block into the docs layout and a ToC link#2708
[Demo] Add a tidelift footer block into the docs layout and a ToC link#2708webknjaz wants to merge 2 commits into
Conversation
|
Thanks for this webknjaz. The two techniques demonstrated herein are helpful in understanding some of the techniques that might be available to enable tidelift notices in a doc suite. I particularly like the Sphinx plugin for altering the ToC, because anything that's a Sphinx plugin could be easily integrated using Python packaging without having to edit the source of any file. This capability could be extracted from the conf.py file and put into What I'm not fond of in this demo is how big the block is on every page. I would like to have a big, prominent block, preferably on the home page (index.html) or wherever the project decides to place it. Is there a way that the tidelift referral banner could be indicated by an RST directive and a plugin could generate the doc elements necessary to render the banner? Something like this: setuptools docs/tidelift-autointegration $ git diff docs/index.rst
diff --git a/docs/index.rst b/docs/index.rst
index b9a796476..559af014b 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -18,3 +18,6 @@ Documentation content:
Development guide <development/index>
Backward compatibility & deprecated practice <deprecated/index>
Changelog <history>
+
+
+.. tidelift-referral-banner:: |
|
@jaraco I noticed you adopted my hacky demo HTML snippet as is in your directive. Let me point out that since it was a demo, I didn't make it very clean — ideally, the styles should go to the CSS files and not be inline. Also, I didn't optimize for mobile and because of that it doesn't look great on phones at all — https://setuptools--2465.org.readthedocs.build/en/2465/ |
Summary of changes
This is mainly a demo for @jaraco of how to solve problems raised in #2465 and jaraco/tidelift#2.
Pull Request Checklist
changelog.d/.(See documentation for details)