sphinx-contrib / confluencebuilder

Confluence Markup Builder Plugin for Sphinx
BSD 2-Clause "Simplified" License
317 stars 99 forks source link

Feature request: Allow customisation of `confluence_page_generation_notice` #928

Closed adamtheturtle closed 7 months ago

adamtheturtle commented 8 months ago

I'd like to add my own warning / styling to the notice.

jdknight commented 8 months ago

If the level of customization is a simple text replacement for the notice, I do not see any major issues to support this. For example, supporting either:

confluence_page_generation_notice = True
 (or)
confluence_page_generation_notice = 'My custom notice message.'

Although, complete styling is a bit tricky, as the styling now varies between which Confluence editor used, and* there is a mix of translator/node building and template building (for index, search, etc. pages) that would need some tweaking.

If you would like a more detailed customization of the notice, maybe using a custom confluence_header_file instead would be best? This would allow you to generate any custom message, tags or styling support by the Confluence instance you are targeting.

If this is related to a translation capability (i.e. wanting to use a non-English message), we do accept translation for messages via Crowdin.

That all being said, if there is a customization ideas I missed, I'm open for any details describing the use case.

adamtheturtle commented 8 months ago

Thank you for the quick and thorough response.

The text-only option would be a nice bonus, and plenty for me. This is not translation-related. I want to add a warning about inline comments getting wiped (#698, related) .

jdknight commented 8 months ago

Initial implementation for this has been added in #930. Feel free to try it out using the following command:

pip install git+https://github.com/sphinx-contrib/confluencebuilder.git@support-custom-page-gen-notice
adamtheturtle commented 8 months ago

Amazingly fast - thank you @jdknight !

jdknight commented 7 months ago

v2.5 is now available on PyPI -- marking as closed.