You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/settings.rst
+94-58Lines changed: 94 additions & 58 deletions
Original file line number
Diff line number
Diff line change
@@ -10,63 +10,8 @@ Settings
10
10
11
11
The ``sphinx-versioned-docs`` reads options from two sources:
12
12
13
-
* From the sphinx ``conf.py`` file.
14
13
* From the provided command-line-arguments.
15
-
16
-
Configuration File Arguments
17
-
============================
18
-
19
-
.. option:: sv_project_url: <url>
20
-
21
-
Setting this variable will make sure that the ``Project home`` is listed on the versions selector badge/menu.
22
-
23
-
.. option:: sv_select_branch
24
-
25
-
Select any particular branches/tags to build.
26
-
The branch/tag names can be separated by ``,`` or ``|``.
27
-
28
-
Selecting a branch will always take precedence over excluding one.
29
-
30
-
Example: ``sv_select_branch=["main", "v2.0"]``
31
-
The option above will build ``main``, ``v2.0`` and will skip all others.
32
-
33
-
.. option:: sv_exclude_branch
34
-
35
-
Exclude any particular branches/tags from building workflow.
36
-
The branch/tag names can be separated by ``,`` or ``|``.
37
-
38
-
Selecting a branch will always take precedence over excluding one.
39
-
40
-
Example: ``sv_exclude_branch=["v1.0"]``
41
-
The option above will exclude ``v1.0`` and will build all others.
42
-
43
-
.. option:: sv_main_branch
44
-
45
-
Specify the main-branch to which the top-level ``index.html`` redirects to. Default is ``main``.
46
-
47
-
.. option:: sv_quite
48
-
49
-
Silents the output from `sphinx`. Use `--no-quite` to get complete-output from `sphinx`. Default is `True`.
50
-
51
-
.. option:: sv_verbose
52
-
53
-
Passed directly to sphinx. Specify more than once for more logging in sphinx. Default is `False`.
54
-
55
-
.. option:: sv_force_branches
56
-
57
-
Force branch selection. Use this option to build detached head/commits. Default is `False`.
58
-
59
-
.. option:: sv_floating_badge
60
-
61
-
Turns the version selector menu into a floating badge. Default is `False`.
62
-
63
-
.. option:: sv_reset_intersphinx
64
-
65
-
Resets intersphinx mapping; acts as a patch for issue `#17 <https://github.com/devanshshukla99/sphinx-versioned-docs/issues/17>`__. Default is `False`.
66
-
67
-
.. option:: sv_sphinx_compability
68
-
69
-
Adds compatibility for older sphinx versions by monkey patching certain functions. Default is `False`.
14
+
* From the sphinx ``conf.py`` file.
70
15
71
16
72
17
Command Line Arguments
@@ -111,6 +56,10 @@ These command line options must be specified when executing the ``sphinx-version
111
56
112
57
``sphinx-versioned --branch="main, -v*"``
113
58
59
+
.. note::
60
+
61
+
Selecting a branch will always take precedence over excluding one.
Specify the main-branch to which the top-level ``index.html`` redirects to. Default is ``main``.
@@ -121,10 +70,11 @@ These command line options must be specified when executing the ``sphinx-version
121
70
122
71
.. option:: --ignore-conf
123
72
124
-
Ignores conf.py configuration file arguments for sphinx-versioned-docs.
73
+
Ignores ``conf.py`` configuration file arguments for ``sphinx-versioned-docs``.
125
74
126
75
.. warning::
127
-
conf.py will still be used in sphinx!
76
+
77
+
``conf.py`` will still be used in sphinx!
128
78
129
79
.. option:: --quite, --no-quite
130
80
@@ -146,3 +96,89 @@ These command line options must be specified when executing the ``sphinx-version
146
96
.. option:: --help
147
97
148
98
Show the help message in command-line.
99
+
100
+
101
+
Configuration File Arguments
102
+
============================
103
+
104
+
.. warning::
105
+
106
+
Unfortunately, due to limitations of the current implementation, all path variables
107
+
like git-path, output path, local ``conf.py`` path cannot be select
108
+
via configuration file argument and must be specified in CLI arguments.
109
+
110
+
.. option:: sv_project_url: <url>
111
+
112
+
Setting this variable will make sure that the ``Project home`` is listed on the versions selector badge/menu.
113
+
114
+
.. option:: sv_select_branch
115
+
116
+
Select any particular branches/tags to build.
117
+
118
+
The branch/tag names can be specified in an array with names separated by ``,`` or ``|``.
119
+
120
+
Example: ``sv_select_branch=["main", "v2.0"]``
121
+
122
+
The option above will build ``main``, ``v2.0`` and will skip all others.
123
+
124
+
.. note::
125
+
126
+
Selecting a branch will always take precedence over excluding one.
127
+
128
+
.. option:: sv_exclude_branch
129
+
130
+
Exclude any particular branches/tags from building workflow.
131
+
The branch/tag names can be specified in an array with names separated by ``,`` or ``|``.
132
+
133
+
Example: ``sv_exclude_branch=["v1.0"]``
134
+
135
+
The option above will exclude ``v1.0`` and will build all others.
136
+
137
+
.. option:: sv_main_branch
138
+
139
+
Specify the main-branch to which the top-level ``index.html`` redirects to. Default is ``main``.
140
+
141
+
.. option:: sv_verbose
142
+
143
+
Passed directly to sphinx. Specify more than once for more logging in sphinx. Default is `False`.
144
+
145
+
.. option:: sv_force_branch
146
+
147
+
Force branch selection. Use this option to build detached head/commits. Default is `False`.
148
+
149
+
.. option:: sv_floating_badge
150
+
151
+
Turns the version selector menu into a floating badge. Default is `False`.
152
+
153
+
.. option:: sv_reset_intersphinx
154
+
155
+
Resets intersphinx mapping; acts as a patch for issue `#17 <https://github.com/devanshshukla99/sphinx-versioned-docs/issues/17>`__. Default is `False`.
156
+
157
+
.. option:: sv_sphinx_compability
158
+
159
+
Adds compatibility for older sphinx versions by monkey patching certain functions. Default is `False`.
160
+
161
+
Template for ``conf.py``
162
+
------------------------
163
+
164
+
.. code::
165
+
166
+
# conf.py
167
+
# sphinx arguments
168
+
# ...
169
+
# ...
170
+
171
+
# sphinx-versioned-docs arguments
172
+
# This template will have a project url for `sphinx-versioned-docs`
173
+
# will exclude `v1.0` branch
174
+
# will set `main` as the main branch
175
+
# other options can be enabled, if and as requried.
0 commit comments