-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Mark commercial documentation more clearly #8535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I don't think we need an extension for this. I think we can just use an emoji and a normal admonition at the top of the page? |
We'd still need to set some metadata on every page, and probably want different admonitions I'm guessing over time :) I don't think this is a problem that needs a solution other than writing content. |
If we want to do an extension, it can be done in a similar way as https://github.com/humitos/sphinx-version-warning . It used to add an extra docutils node for the admonition. While using an extension like that may be simple, I think it may be too much for this. I think we can just add a CSS class to do this job: .. admonition: Title
:class: commercial
Content Then in a CSS file: .commercial {
...
} An improved version of this could be to use |
I concede that creating an extension for this might be premature optimization, but do we really want different admonitions for each page? I think we should strive for consistency. Even if we don't block this work on creating an extension, I don't think this use case is so niche. I bet other projects would benefit from it. |
I think that depends on what we want. With more clear requirements on the work wanted here, it would be easier to give better feedback here. A Sphinx extension can be "as simple as a Python function" ™️ in our |
Hah, not so fast 😛 sphinx-doc/sphinx#6751 (it just needs to be in |
I'm all for simple solutions until we have a strong need for more creative solutions. If we are going to put the same block at the top of pages/sections that are specific to commercial hosting, we can always just start with an A complementary (or I might say underlying, even) issue we have with commercial-specific documentation is that this documentation is scattered and rather buried. Much of the current content is either in guides, or under a Read the Docs for Business section, at the bottom of our TOC and the bottom of our front page of our documentation, barely above "Legal Documents" 🙃 If I was looking for information on a commercial-specific feature, I would expect it to be under "Features" -- not "Advanced Features" or "RTD for business". I think this change alone would preempt a special classification for commercial hosting pages, though I could see this being really helpful metadata to have in our TOC. Anyways, this could all very well require an admonition still, so maybe this is a good indicator to start small. We can always come back to this and get fancy if we don't feel reorganizing clarified enough. |
This is the solution that's currently implemented:
This was part of the Diataxis work we've done. |
Creating a custom admonition was harder than expected 🙃 But even so, I think the right approach would be to mark a page or a section with
:commercial:
, and have some extension code that does the rest (changing the color? adding an admonition on top? adding an emoji to the title?). Also, it should work on PDF and EPUB, not only on HTML.The text was updated successfully, but these errors were encountered: