Skip to content

Admonition: generate <details> with ??? #96

@randomstuff

Description

@randomstuff

Context

The admonition module supports ??? and ???+ for collapsible admonitions. This is inspired by mkdocs-material.

In this case, mdit-py-plugins generates:

<div class="admonition note is-collapsible collapsible-closed">
  <div class="admonition-title"></div>
</div>
<div class="admonition note is-collapsible collapsible-open">
    <div class="admonition-title"></div>
</div>

On the other hand, mkdocs-material generates:

<details class="note">
  <summary></summary>
</detail>
<details class="note" open="open">
    <summary></summary>
</detail>

Proposal

It should be possible to generate <details> and <summary> using ??? and ???+. An option should be provided to opt-in the new behavior (or bring back the current one).

Tasks and updates

  • Add option for implementing ??? with details and summary

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions