Skip to content

Commit 0a312cd

Browse files
committed
change names of config options
1 parent 195e853 commit 0a312cd

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

docs/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ to your extensions list, e.g.:
7575
7676
This extension includes the bootstrap 4 CSS classes relevant to panels.
7777
They will be loaded by default but, if you are already using a bootstrap theme,
78-
you can disable this by adding ``add_boostrap_css = False`` to your ``conf.py``.
78+
you can disable this by adding ``panels_add_boostrap_css = False`` to your ``conf.py``.
7979

8080
You can also change the delimiters used by adding ``panel_delimiters`` to your ``conf.py``,
81-
e.g. the default value is:
81+
e.g. the default value (panels, header, footer) is:
8282

8383
.. code-block:: python
8484
85-
panel_delimiters = ("^", ".", "+")
85+
panels_delimiters = (".", "^", "+")
8686
8787
8888
Detailed Examples

sphinx_panels/__init__.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ def run(self):
202202
self.content,
203203
self.content_offset,
204204
default_classes,
205-
head_char=self.env.app.config.panel_delimiters[0],
206-
panel_char=self.env.app.config.panel_delimiters[1],
207-
foot_char=self.env.app.config.panel_delimiters[2],
205+
panel_char=self.env.app.config.panels_delimiters[0],
206+
head_char=self.env.app.config.panels_delimiters[1],
207+
foot_char=self.env.app.config.panels_delimiters[2],
208208
)
209209

210210
# set the top-level containers
@@ -278,21 +278,21 @@ def run(self):
278278

279279

280280
def validate_config(app, config):
281-
if len(app.config.panel_delimiters) != 3:
281+
if len(app.config.panels_delimiters) != 3:
282282
raise AssertionError(
283-
"panel_delimiters config must be of form: (header, body, footer)"
283+
"panels_delimiters config must be of form: (header, body, footer)"
284284
)
285-
if len(set(app.config.panel_delimiters)) != 3:
286-
raise AssertionError("panel_delimiters config must contain unique values")
287-
for delim in app.config.panel_delimiters:
285+
if len(set(app.config.panels_delimiters)) != 3:
286+
raise AssertionError("panels_delimiters config must contain unique values")
287+
for delim in app.config.panels_delimiters:
288288
if not (isinstance(delim, str) and len(delim) == 1):
289289
raise AssertionError(
290-
"panel_delimiters config must contain only length 1 strings"
290+
"panels_delimiters config must contain only length 1 strings"
291291
)
292292

293293

294294
def add_static_paths(app):
295-
if app.config.add_boostrap_css:
295+
if app.config.panels_add_boostrap_css:
296296
app.config.html_static_path.append(os.path.join(LOCAL_FOLDER, "css"))
297297
app.add_css_file("bs-grids.css")
298298
app.add_css_file("bs-cards.css")
@@ -313,9 +313,9 @@ def depart_container(self, node):
313313

314314
def setup(app):
315315
app.add_directive("panels", Panels)
316-
app.add_config_value("panel_delimiters", ("^", ".", "+"), "env")
316+
app.add_config_value("panels_delimiters", (".", "^", "+"), "env")
317317
app.connect("config-inited", validate_config)
318-
app.add_config_value("add_boostrap_css", True, "env")
318+
app.add_config_value("panels_add_boostrap_css", True, "env")
319319
app.connect("builder-inited", add_static_paths)
320320
# we override container html visitors,
321321
# to stop the default behaviour of adding the `container` class to all nodes

0 commit comments

Comments
 (0)