Skip to main content

A MkDocs extension to improve the visual of ordered lists.

Project description

StepsList

PyPI PyPI - Python Version License

Extension for Python-Markdown: to be used on Mkdocs and Material for Mkdocs

This Python package provides a custom Markdown extension that allows users to define step blocks in their Markdown documents. The extension recognizes specific markers and formats the enclosed content for better readability.

Features

  • Define step blocks using --steps-- and --!steps-- markers.
  • Automatically wraps the content in a <div> with a class for custom styling.
  • Easy integration with the existing Markdown parser.

Installation

To use this extension, ensure you have the markdown library installed. You can install it using pip:

pip install markdown

You can install this package using pip:

pip install stepslist

Usage

To use this extension, add it to your MkDocs configuration file (mkdocs.yml):

markdown_extensions:
  - stepslist

Now, you can use the --steps-- --!steps-- tag in your Markdown files:

[!IMPORTANT] Note that you will need blank lines between the tags and your list otherwise it will not work!

Markdown

--steps--

1. Step one
2. Step two
3. Step three

--!steps--

Output example

This will be rendered as an ordered list within a div that you can style:

<div class="md-steps">
  <ol>
    <li>Step one</li>
    <li>Step two</li>
    <li>Step three</li>
  </ol>
</div>

Styling

To style in CSS you need the following selectors: You can also style the ::before and ::after pseudo elements.
It's recommended to keep the .md-steps styling for the div itself unchanged unless you need to

.md-steps ol {
  /* Styling goes here */
}

.md-steps>ol>li {
  /* Styling goes here */
}

/* Optional */
.md-steps>ol>li::before {
  /* Styling goes here */
}

.md-steps>ol>li::after {
  /* Styling goes here */
}

If you like this extension consider buying me a :coffee:coffee.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stepslist-0.7.5.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stepslist-0.7.5-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file stepslist-0.7.5.tar.gz.

File metadata

  • Download URL: stepslist-0.7.5.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for stepslist-0.7.5.tar.gz
Algorithm Hash digest
SHA256 8d08f815231895bbb239aee7ea34a4e1e8d589f8322ffc3697081cc70de93eee
MD5 dfb7d755980fc6e04366e9350c61a3fd
BLAKE2b-256 ca8a1b1b56599af0ca876a1a165eba346414667062b3088a43eb239051e3523e

See more details on using hashes here.

File details

Details for the file stepslist-0.7.5-py3-none-any.whl.

File metadata

  • Download URL: stepslist-0.7.5-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for stepslist-0.7.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d432b8aabb1338aba5480c12e4e665d79c81d0edafb7adcffe80035c3f0dd649
MD5 7f015d1daab105daa5a53ffadd7318ed
BLAKE2b-256 6f0dcbc21c48d27816b75e1fb64c9407b9638fc7179d3f649f0ab965298e5396

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page