Skip to main content

MkDocs Child Pages Card Grid Plugin

Under development, use with caution!

This plugin allows users to automatically add card grids on their pages with links to child pages.

Users can include card grids on all pages or configure using Markdown metadata to include or exclude specific pages.

TODO items:

  • Add linters, build, versioning, tests, etc. Professional stuff 😄
  • Add config to always include or exclude a page in their parent card grid.
  • Add support to include teaser content from metadata, possibly in conjunction with the wilhelmer/mkdocs-add-teaser plugin.

Config

theme: 
  name: material
  features:
    - navigation.indexes

extra_css:
  - stylesheets/childpages_card_grid.css

plugins:
  - childpages-card-grid:
      # include card grids on all pages (default True)
      include_all: True
      # the title shown above the card grid (default: 'Child pages')
      cards_title: 'Child pages'

Page Metadata

childpages_card_grid

When include_all: True, it possible to exclude the card grid from a page with the metadata: childpages_card_grid: exclude.

Likewise, when include_all: False, it is possible to include the card grid in a page using childpages_card_grid: include.

childpages_card_grid_title

It is possible to customize the card grid title of a specific page with the childpages_card_grid_title metadata.

Sample childpages_card_grid.css

.cards {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
    /* Add shadows to create the "card" effect */
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    transition: 0.3s;
}

.card_title {
    padding: 1rem 0 1rem 0;
    border-top: 1px;
    border-top-color: gray;
    border-top-style: solid;
}

.card:hover {
    /* On mouse-over, add a deeper shadow */
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
}

.card_container {
    /* Add some padding inside the card container */
    padding: 2px 16px;
}

Limitations

This plugin was only tested with MkDocs Material Theme and the navigation.indexes feature enabled. It may be that other themes or other features of the Material theme generate a different nav tree and this plugin will not be able to figure out the parent/child pages.

Metadata

Release files for mkdocs-childpages-card-grid-plugin 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkdocs-childpages-card-grid-plugin 0.1.7
File Size Uploaded Provenance Actions
mkdocs-childpages-card-grid-plugin-0.1.7.tar.gz 9.2 kB Without provenance Details for mkdocs-childpages-card-grid-plugin-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mkdocs-childpages-card-grid-plugin 0.1.7
File Interpreter ABI Platform Actions
mkdocs_childpages_card_grid_plugin-0.1.7-py3-none-any.whl Python 3 none any Details for mkdocs_childpages_card_grid_plugin-0.1.7-py3-none-any.whl

Total release size: 21.5 kB

Release files / mkdocs-childpages-card-grid-plugin-0.1.7.tar.gz

Download URL mkdocs-childpages-card-grid-plugin-0.1.7.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bce7a6875d2ddc6f69d474121b8d5204da63517e34e98c2bb59d9778f110ab5f
BLAKE2b-256 checksum
How to use checksums
73bcaaa32dbc8f0735213617ec5139156ae528fdfddbe46992685cf5e93fe92e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / mkdocs_childpages_card_grid_plugin-0.1.7-py3-none-any.whl

Download URL mkdocs_childpages_card_grid_plugin-0.1.7-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5eb881f2d9f7b17ba3b18b005e002c8bd27ffa02f53c56ef21f595ea4864d5fb
BLAKE2b-256 checksum
How to use checksums
71d2644283cfa7ad0d9a694b737e0651d7609457da0064d9d44fbe37fa52bfa4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Security for mkdocs-childpages-card-grid-plugin 0.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page