mkdocs-childpages-card-grid-plugin


Namemkdocs-childpages-card-grid-plugin JSON
Version 0.1.7 PyPI version JSON
download
home_pagehttps://github.com/faustool/mkdocs-childpages-card-grid-plugin
SummaryCreate card grids with links to child pages on your MkDocs site
upload_time2023-01-06 19:40:29
maintainer
docs_urlNone
authorFausto Oliveira
requires_python>=3.7
licenseApache License, Version 2.0
keywords mkdocs plugin python child-pages card-grid
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://github.com/wilhelmer/mkdocs-add-teaser).

## Config

```yaml
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

```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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/faustool/mkdocs-childpages-card-grid-plugin",
    "name": "mkdocs-childpages-card-grid-plugin",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "mkdocs,plugin,python,child-pages,card-grid",
    "author": "Fausto Oliveira",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/73/bc/aaa32dbc8f0735213617ec5139156ae528fdfddbe46992685cf5e93fe92e/mkdocs-childpages-card-grid-plugin-0.1.7.tar.gz",
    "platform": null,
    "description": "# MkDocs Child Pages Card Grid Plugin\n\n**Under development, use with caution!**\n\nThis plugin allows users to automatically add card grids on their pages with links to child pages.\n\nUsers can include card grids on all pages or configure using Markdown metadata to include or exclude specific pages.\n\nTODO items:\n\n- [ ] Add linters, build, versioning, tests, etc. Professional stuff \ud83d\ude04\n- [ ] Add config to always include or exclude a page in their parent card grid.\n- [ ] Add support to include `teaser` content from metadata, possibly in conjunction with the [wilhelmer/mkdocs-add-teaser plugin](https://github.com/wilhelmer/mkdocs-add-teaser).\n\n## Config\n\n```yaml\ntheme: \n  name: material\n  features:\n    - navigation.indexes\n\nextra_css:\n  - stylesheets/childpages_card_grid.css\n\nplugins:\n  - childpages-card-grid:\n      # include card grids on all pages (default True)\n      include_all: True\n      # the title shown above the card grid (default: 'Child pages')\n      cards_title: 'Child pages'\n```\n\n## Page Metadata\n\n### `childpages_card_grid`\n\nWhen `include_all: True`, it possible to exclude the card grid from a page with the metadata: `childpages_card_grid: exclude`.\n\nLikewise, when `include_all: False`, it is possible to include the card grid in a page using `childpages_card_grid: include`.\n\n### `childpages_card_grid_title`\n\nIt is possible to customize the card grid title of a specific page with the `childpages_card_grid_title` metadata.\n\n## Sample childpages_card_grid.css\n\n```css\n.cards {\n    max-width: 1200px;\n    margin: 0 auto;\n    display: grid;\n    gap: 1rem;\n    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n}\n\n.card {\n    /* Add shadows to create the \"card\" effect */\n    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);\n    transition: 0.3s;\n}\n\n.card_title {\n    padding: 1rem 0 1rem 0;\n    border-top: 1px;\n    border-top-color: gray;\n    border-top-style: solid;\n}\n\n.card:hover {\n    /* On mouse-over, add a deeper shadow */\n    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);\n}\n\n.card_container {\n    /* Add some padding inside the card container */\n    padding: 2px 16px;\n}\n```\n\n## Limitations\n\nThis 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.\n",
    "bugtrack_url": null,
    "license": "Apache License, Version 2.0",
    "summary": "Create card grids with links to child pages on your MkDocs site",
    "version": "0.1.7",
    "split_keywords": [
        "mkdocs",
        "plugin",
        "python",
        "child-pages",
        "card-grid"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "71d2644283cfa7ad0d9a694b737e0651d7609457da0064d9d44fbe37fa52bfa4",
                "md5": "f806c1caa7eddaf917e82f8e323fe8fe",
                "sha256": "5eb881f2d9f7b17ba3b18b005e002c8bd27ffa02f53c56ef21f595ea4864d5fb"
            },
            "downloads": -1,
            "filename": "mkdocs_childpages_card_grid_plugin-0.1.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f806c1caa7eddaf917e82f8e323fe8fe",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 12278,
            "upload_time": "2023-01-06T19:40:28",
            "upload_time_iso_8601": "2023-01-06T19:40:28.487444Z",
            "url": "https://files.pythonhosted.org/packages/71/d2/644283cfa7ad0d9a694b737e0651d7609457da0064d9d44fbe37fa52bfa4/mkdocs_childpages_card_grid_plugin-0.1.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "73bcaaa32dbc8f0735213617ec5139156ae528fdfddbe46992685cf5e93fe92e",
                "md5": "c19907ce62b168162f85c57103e13e2c",
                "sha256": "bce7a6875d2ddc6f69d474121b8d5204da63517e34e98c2bb59d9778f110ab5f"
            },
            "downloads": -1,
            "filename": "mkdocs-childpages-card-grid-plugin-0.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "c19907ce62b168162f85c57103e13e2c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 9211,
            "upload_time": "2023-01-06T19:40:29",
            "upload_time_iso_8601": "2023-01-06T19:40:29.844668Z",
            "url": "https://files.pythonhosted.org/packages/73/bc/aaa32dbc8f0735213617ec5139156ae528fdfddbe46992685cf5e93fe92e/mkdocs-childpages-card-grid-plugin-0.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-06 19:40:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "faustool",
    "github_project": "mkdocs-childpages-card-grid-plugin",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "mkdocs-childpages-card-grid-plugin"
}
        
Elapsed time: 0.02891s