Skip to content

Commit 1756cba

Browse files
committed
Add current notes about new Blocks feature
1 parent 9c5224f commit 1756cba

File tree

4 files changed

+38
-5
lines changed

4 files changed

+38
-5
lines changed
+7-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
/// warning | Beta Release
2-
Blocks is currently only available in the Pymdown Extensions beta release. It is a work in progress and API and
3-
syntax are subject to change.
1+
/// new | 9.10 New Experimental Feature
2+
Blocks is currently a new, experimental extension type available in Pymdown Extensions that allows for writing a new
3+
kind of block extension in Python Markdown. With this new addition, we've added a number of new extensions utilizing
4+
this new extension type. While its intention is to hopefully replace extensions like Details and Tabbed, there are
5+
currently no immediate plans to deprecate those plugins.
46

5-
Any and all feedback regarding these experimental blocks is appreciated. Let us know what you think so we can improve
6-
and make these a stable feature. Please provide feedback here: https://github.com/facelessuser/pymdown-extensions/discussions/1961.
7+
Any and all feedback regarding these new, experimental blocks is appreciated. Please provide feedback here:
8+
https://github.com/facelessuser/pymdown-extensions/discussions/1973.
79
///

docs/src/markdown/extensions/blocks/plugins/tab.md

+23
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,29 @@ Some content
102102
///
103103
```
104104

105+
## Tab IDs
106+
107+
By default, tabs generate IDs for each tab using the following template `__tabbed_<tab_set_number>_<tab_number>`. If it
108+
is desired to implement jumping to a specific tab with more intuitive IDs, it may be preferable to generate IDs from
109+
slugs. To do so, two [options](#global-options) are provided: `slugify` and `separator`.
110+
111+
/// tip
112+
Jumping to tabs via IDs may require additional JavaScript to select the targeted tabs.
113+
///
114+
115+
If `slugify` is given a slug function (you can use any that [ship with Pymdownx Extensions](../../../extras/slugs.md)),
116+
the Tabbed extension will generate IDs from the tab titles just like headers. `separator` allows for the specifying of
117+
the word separator (`-` is the default).
118+
119+
## Additional Topics
120+
121+
As Tab shares the same output and functionality as the [Tabbed extension](../../tabbed.md), you can check out the
122+
documentation there to learn the following:
123+
124+
- [How to style the tabs?](../../tabbed.md#styling-with-css)
125+
- [How to link tab selection on an entire page?](../../tabbed.md#linked-tabs)
126+
- [What is the alternate style and how do I style them?](../../tabbed.md#alternate-style)
127+
105128
## Global Options
106129

107130
Options | Type | Descriptions

docs/src/markdown/extensions/details.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
# Details
44

5+
/// tip | 9.10 New Approach to Details
6+
9.10 has added a new approach to creating details. Checkout the new [Details extension here](./blocks/plugins/details.md)!
7+
///
8+
59
## Overview
610

711
Details is an extension that creates collapsible elements that hide their content. It uses the HTML5

docs/src/markdown/extensions/tabbed.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
# Tabbed
44

5+
/// tip | 9.10 New Approach to Tabs
6+
9.10 has added a new approach to creating tabs. Checkout the new [Tab extension here](./blocks/plugins/tab.md)!
7+
///
8+
59
## Overview
610

711
/// new | New 7.0

0 commit comments

Comments
 (0)