Linux 软件免费装
Banner图

SimpleTOC - Table of Contents Block

开发者 MarcDK
更新时间 2024年5月27日 19:44
捐献地址: 去捐款
PHP版本: 7.0 及以上
WordPress版本: 6.5
版权: GPLv2 or later
版权网址: 版权信息

标签

Gutenberg block FAQ TOC Table of Contents

下载

4.0.2 6.0.5 6.0.9 6.4 1.8 6.4.1 0.9 4.0.1 6.4.2 1.0 3.0 3.1 6.0.1 6.0.6 6.0.8 6.4.3 6.4.4 1.9 2.0 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4.0 4.1.1 4.4.2 4.4.5 4.4.7 4.4.8 4.4.9 4.4.9.1 4.4.9.2 4.5 5.0.6 4.0.3 4.1 5.0.2 5.0.31 5.0.38 4.7 5.0.39 5.0.8 5.0.40 5.0.41 5.0.43 5.0.52 5.0.56 5.0.37 5.0.42 5.0.46 5.0.45 5.0.48 4.9 5.0.11 5.0.4 5.0.9 4.2 4.4 5.0.19 5.0.21 5.0.21.1 5.0.22 5.0.23 5.0.3 5.0.25 5.0.25.1 5.0.27 1.2 4.0.4 4.6 5.0.28 5.0.29 5.0.30 1.1 1.3 1.4 4.3 5.0.1 5.0.17 5.0.32 5.0.33 5.0.34 5.0.35 1.6 5.0 5.0.16 5.0.18 5.0.36 5.0.47 5.0.49 5.0.50 5.0.51 4.4.1 4.4.6 5.0.24 6.0.10 6.0.11 6.0.14 6.0.4 6.1.0 2.9.1 1.5 1.7 2.1 4.8 5.0.5 5.0.53 5.0.55 6.0.0 6.0.2 6.0.7 6.2.0 6.3.0 6.3.1 6.3.2

详情介绍:

Add a Table of Contents block to your posts and pages. The TOC is a nested list of links to all heading found in the post or page. To use it, simply add a block and search for "SimpleTOC" or just "TOC". The maximum depth of the toc can be configured in in the blocks' sidebar among many other options. There can hide the headline "Table of Contents" and add your own by using a normal heading block. SimpleTOC is open-source and developed on GitHub Pages. If you find a bug or have an idea for a feature please feel free to contribute and create a pull request. Spin up a new WordPress instance with the SimpleTOC plugin already installed. Features Customization Compatibility

安装:

SimpleTOC can be found and installed via the Plugin menu within WordPress administration (Plugins -> Add New). Alternatively, it can be downloaded from WordPress.org and installed manually... In Gutenberg, add a block and search for "SimpleTOC" or just "TOC". Please save your content before you use the block.

屏幕截图:

  • SimpleTOC in the post.
  • Simple but powerful. Customize each TOC as you like.
  • Control the maximum depth of the headings.
  • SimpleTOC styled with Gutenbergs native group styles.
  • SimpleTOC Advanced Features
  • Gutenberg Heading block: Set a custom anchor
  • SimpleTOC hidden in the accordion menu.
  • SimpleTOC global settings.

常见问题:

Configuring Global Settings in SimpleTOC

SimpleTOC allows you to configure global settings for your WordPress website. These settings can be enforced globally, overriding any block-level configurations that may exist. To access these settings, navigate to the SimpleTOC section of the WordPress Settings.

How do I add a background color to SimpleTOC using Gutenberg groups?

Select the block and select "group" in the context menu. Apply "background color", "link color" and "text color" to this group. SimpleTOC will inherit these styles. You would like to use this styled SimpleTOC group next time you write a post? Convert it to a reusable block.

How to exclude a single heading from the TOC?

If you really want to hide a single heading from the table of contents, then add the CSS class "simpletoc-hidden" to a heading block. You can find this field in the same place as the HTML anchor field: In the Block > Advanced sidebar. But first, think about the reason you would like to hide a specific heading. Maybe you would like to remove all headings of a specific depth level. Then there is an option for that in the blocks options in Gutenberg. If you think this heading should not be part of the toc perhaps it is not needed in the post itself? = I would like to save my SimpleTOC settings as default. Is that possible? You can convert your configured SimpleTOC block into a reusable block in Gutenberg. It will keep its settings. This way, you can use your desired settings for each new post by adding the reusable block.

How to add a div tag wrapper to the TOC?

If you add a custom class to the SimpleTOC block in "Advanced" and then "Additional CSS Class(es)" a div with that class will be wrapped around the HTML output.

How to allow developers to exclude specific headings programmatically?

Use the 'simpletoc_excluded_blocks' filter. For example, this code will exclude heading blocks that are inside a column block. Example: add_filter( 'simpletoc_excluded_blocks', function ( array $blocks ) { $blocks[] = 'core/column'; return $blocks; } );

How do I change the color of the accordion menu?

The heavy plus character I used can not be colored with css without hacks. But you can change the icon to something else and change the color of the new icon. .simpletoc-collapsible::after { content: "✖"; color: #e94c89; }

How do I add SimpleTOC to all articles automatically?

I don’t see an easy solution at the moment. SimpleTOC is only a block that can be placed in your post. If there was a plugin that adds blocks to every post, then this would be the solution. I think this should be another separate plug-in to keep the code of SimpleTOC clean and … well, simple.

更新日志:

6.4.3 6.4.3 6.3.2 6.3.0 6.2.0 6.1.0 6.0.10 6.0.9