Skip to content

Commit bb463b9

Browse files
authored
Merge pull request #1053 from sphinx-contrib/add-more-doc-guides
Add more guides into the documentation
2 parents bebcbb2 + 1817332 commit bb463b9

File tree

5 files changed

+102
-0
lines changed

5 files changed

+102
-0
lines changed

doc/configuration.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,6 +1496,8 @@ Advanced publishing configuration
14961496

14971497
See also :lref:`confluence_publish_denylist`.
14981498

1499+
.. _confluence_publish_debug:
1500+
14991501
.. confval:: confluence_publish_debug
15001502

15011503
.. versionadded:: 1.8
@@ -1623,6 +1625,8 @@ Advanced publishing configuration
16231625
16241626
confluence_publish_force = True
16251627
1628+
.. _confluence_publish_headers:
1629+
16261630
.. confval:: confluence_publish_headers
16271631

16281632
.. versionadded:: 1.5
@@ -1759,6 +1763,8 @@ Advanced publishing configuration
17591763
17601764
confluence_request_session_override = my_request_session_override
17611765
1766+
.. _confluence_server_auth:
1767+
17621768
.. confval:: confluence_server_auth
17631769

17641770
An authentication handler which can be directly provided to a REST API
@@ -1787,6 +1793,8 @@ Advanced publishing configuration
17871793
resource_owner_key=resource_owner_key,
17881794
resource_owner_secret=resource_owner_secret)
17891795
1796+
.. _confluence_server_cookies:
1797+
17901798
.. confval:: confluence_server_cookies
17911799

17921800
.. versionadded:: 1.2

doc/guide-highlight-default.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Configuring the default highlighter
2+
===================================
3+
4+
Sphinx's default highlight language is ``python``. For any documentation
5+
processed by this extension that does not have an explicit language type
6+
provided will fallback to Sphinx's default.
7+
8+
Users wishing to override the default highlight language can use the
9+
:lref:`confluence_lang_overrides` configuration. For example, adding the
10+
following option inside a project's ``conf.py`` file:
11+
12+
.. code-block:: python
13+
14+
confluence_lang_overrides = {
15+
'default': 'none',
16+
}

doc/guide-sso.rst

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
Single Sign-On (SSO) and OAuth Environments
2+
===========================================
3+
4+
A percentage of extension users may be trying to operate with a
5+
Confluence instance which deploys some sort of single sign-on (SSO) or
6+
OAuth capability. How an instance is configured and the means to interact
7+
can vary per organization, even per instance. There are no definitive steps
8+
for configuring this extension to guarantee a graceful setup. That being
9+
said, there should be a means to allow interaction when using this extension.
10+
This guide may be useful for users configuring this extension for the first
11+
time in a corporate environment.
12+
13+
Confluence Authentication Token
14+
-------------------------------
15+
16+
Users be using either an API token (Confluence Cloud) or personal access
17+
token (PAT; Confluence Data Center) for authenticating with Confluence.
18+
This means that :lref:`confluence_api_token` (along with
19+
:lref:`confluence_server_user`) should be used in a Confluence Cloud
20+
setting, and :lref:`confluence_publish_token` should be used in a Confluence
21+
Data Center setting (e.g. corporate/self-hosted).
22+
23+
Initial Test
24+
------------
25+
26+
Once a token has been configured, it is recommended to perform a connection
27+
attempt. This is to help ensure a project configuration and extension is
28+
ready to perform interaction with a Confluence instance, as well as to
29+
perform a sanity check that additional SSO/OAuth configuration is required.
30+
31+
From the working directory of a project, perform a
32+
:ref:`connection test <confluence_connection_troubleshooting>`:
33+
34+
.. code-block:: shell-session
35+
36+
$ python -m sphinxcontrib.confluencebuilder connection-test
37+
Fetching configuration information...
38+
...
39+
40+
Configuring for Identity or Authorization Instance
41+
--------------------------------------------------
42+
43+
This extension uses Requests_ for HTTP requests. Options are available to
44+
help allow a user tailor requests. These options can be used to inject
45+
additional token/session information in a request required for a front-end
46+
of a Confluence instance.
47+
48+
The following options may help:
49+
50+
- :lref:`confluence_publish_headers`: Used to set HTTP headers for
51+
requests made to a Confluence instance.
52+
- :lref:`confluence_server_cookies`: Used to provide cookie data for
53+
requests made to a Confluence instance.
54+
- :lref:`confluence_server_auth`: Used to provide a custom Requests-capable
55+
authentication handler for requests made to a Confluence instance.
56+
57+
Which option and values to use will vary. It is recommended, if available,
58+
to refer to any documentation provided by the Confluence instance about
59+
what setup is used and what header/cookie data they expect. If no such
60+
information is available, it is recommended to either create a ticket with
61+
the service desk associated with the Confluence instance or talk with a
62+
system administrator for the Confluence instance.
63+
64+
Additional information
65+
----------------------
66+
67+
- To help debug the network traffic between this extension and a Confluence
68+
instance, the :lref:`confluence_publish_debug` option may be used.
69+
- Refer to `connection-issused issues`_ reported by users.
70+
71+
.. references ------------------------------------------------------------------
72+
73+
.. _Requests: https://requests.readthedocs.io/
74+
.. _connection-issused issues: https://github.com/sphinx-contrib/confluencebuilder/issues?q=label%3Aconnection-issues

doc/guides.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ the Confluence Builder extension in a Sphinx-enabled environment.
1010
guide-class-hints
1111
guide-collapse
1212
guide-confluence-macros
13+
guide-highlight-default
1314
guide-math
1415
guide-strike
1516
guide-ci
17+
guide-sso

doc/tips.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ By default, this extension does not define any timeouts for a publish event. It
7676
is recommended to provide a timeout value based on the environment being used
7777
(see :lref:`confluence_timeout`).
7878

79+
.. _confluence_connection_troubleshooting:
80+
7981
Connection troubleshooting
8082
--------------------------
8183

0 commit comments

Comments
 (0)