pydoc-markdown-nuxt


Namepydoc-markdown-nuxt JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryA Nuxt.js renderer for pydoc-markdown that generates documentation compatible with Nuxt Content and MDC
upload_time2025-07-25 18:13:05
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2025 Uriel Curiel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords pydoc-markdown nuxt documentation python mdc nuxt-content
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pydoc-markdown-nuxt

A pydoc-markdown renderer for generating documentation compatible with Nuxt Content and MDC (Markdown Components).

## Overview

`pydoc-markdown-nuxt` extends [pydoc-markdown](https://github.com/NiklasRosenstein/pydoc-markdown) with a renderer that generates Markdown files following the [Nuxt Content](https://content.nuxtjs.org/) structure and conventions. This allows you to seamlessly integrate Python API documentation into Nuxt.js websites.

## Features

- **Nuxt Content Compatible**: Generates Markdown files with YAML frontmatter that work with Nuxt Content's file-based routing
- **Flexible Directory Structure**: Configure custom directory structures and file organization
- **YAML Frontmatter**: Full control over page metadata through configurable frontmatter
- **MDC Support**: Ready for MDC (Markdown Components) syntax extensions
- **Clean Integration**: Works with existing pydoc-markdown configurations and processors

## Installation

```bash
pip install pydoc-markdown-nuxt
```

## Quick Start

Create a `pydoc-markdown.yml` configuration file:

```yaml
loaders:
  - type: python
    search_path: [src]

renderers:
  - type: nuxt
    content_directory: content/docs
    default_frontmatter:
      layout: docs
      navigation: true
    pages:
      - title: API Documentation
        contents:
          - '*'
```

Then run:

```bash
pydoc-markdown
```

This will generate Nuxt Content compatible Markdown files in the `content/docs` directory.

## Configuration

### Basic Options

- `content_directory`: Directory where content files are generated (default: `content`)
- `clean_render`: Whether to clean previous files before rendering (default: `true`)
- `default_frontmatter`: Default YAML frontmatter applied to all pages
- `use_mdc`: Enable MDC syntax features (default: `true`)
- `base_url`: Base URL for documentation (default: `/`)

### Page Configuration

Pages support all standard pydoc-markdown page options plus:

- `frontmatter`: Custom YAML frontmatter for the page
- `directory`: Custom subdirectory for the page
- `extension`: File extension (default: `.md`)

### Example Configuration

```yaml
loaders:
  - type: python
    search_path: [src]

processors:
  - type: filter
    expression: not name.startswith('_')
  - type: smart
  - type: crossref

renderers:
  - type: nuxt
    content_directory: content/docs
    use_mdc: true
    base_url: /docs/
    default_frontmatter:
      layout: docs
      navigation: true
      sidebar: true
    pages:
      - title: Home
        name: index
        source: README.md
        frontmatter:
          description: "Welcome to our API documentation"
          icon: "home"
      - title: Getting Started
        name: getting-started
        source: docs/getting-started.md
        frontmatter:
          description: "Quick start guide"
          icon: "rocket"
      - title: API Reference
        name: api
        directory: reference
        frontmatter:
          description: "Complete API reference"
          icon: "code"
        contents:
          - mypackage.*
```

## Generated Output

The renderer generates Markdown files with YAML frontmatter:

```markdown
---
title: API Documentation
layout: docs
navigation: true
description: Complete API reference
icon: code
---

# MyClass

A sample class for demonstration.

## Methods

### my_method(param1, param2='default')

A sample method that does something useful.

**Arguments:**
- `param1`: First parameter
- `param2`: Second parameter with default value

**Returns:**
Something useful
```

## Integration with Nuxt Content

The generated files work seamlessly with Nuxt Content:

1. **File-based Routing**: Files in `content/` automatically become pages
2. **Navigation**: Use frontmatter to control navigation appearance
3. **Layouts**: Specify custom layouts through frontmatter
4. **Metadata**: Rich metadata support for SEO and organization

## MDC Support

When `use_mdc: true`, the renderer is ready for MDC enhancements:

```markdown
::alert{type="info"}
This is an info alert using MDC syntax
::

::code-group
```python
# Python example
def hello():
    return "Hello, World!"
```
::
```

## Development

To contribute to this project:

```bash
git clone https://github.com/UrielCuriel/pydoc-markdown-nuxt
cd pydoc-markdown-nuxt
pip install -e .
```

Run tests:

```bash
python test_renderer.py
```

## License

MIT License - see LICENSE file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pydoc-markdown-nuxt",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "pydoc-markdown, nuxt, documentation, python, mdc, nuxt-content",
    "author": null,
    "author_email": "Uriel Curiel <kratoz.00616@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/73/1d/294207f947707eac28c89e5c4d6b38159be9f47932d97f2aaa7eb24abab0/pydoc_markdown_nuxt-0.1.1.tar.gz",
    "platform": null,
    "description": "# pydoc-markdown-nuxt\r\n\r\nA pydoc-markdown renderer for generating documentation compatible with Nuxt Content and MDC (Markdown Components).\r\n\r\n## Overview\r\n\r\n`pydoc-markdown-nuxt` extends [pydoc-markdown](https://github.com/NiklasRosenstein/pydoc-markdown) with a renderer that generates Markdown files following the [Nuxt Content](https://content.nuxtjs.org/) structure and conventions. This allows you to seamlessly integrate Python API documentation into Nuxt.js websites.\r\n\r\n## Features\r\n\r\n- **Nuxt Content Compatible**: Generates Markdown files with YAML frontmatter that work with Nuxt Content's file-based routing\r\n- **Flexible Directory Structure**: Configure custom directory structures and file organization\r\n- **YAML Frontmatter**: Full control over page metadata through configurable frontmatter\r\n- **MDC Support**: Ready for MDC (Markdown Components) syntax extensions\r\n- **Clean Integration**: Works with existing pydoc-markdown configurations and processors\r\n\r\n## Installation\r\n\r\n```bash\r\npip install pydoc-markdown-nuxt\r\n```\r\n\r\n## Quick Start\r\n\r\nCreate a `pydoc-markdown.yml` configuration file:\r\n\r\n```yaml\r\nloaders:\r\n  - type: python\r\n    search_path: [src]\r\n\r\nrenderers:\r\n  - type: nuxt\r\n    content_directory: content/docs\r\n    default_frontmatter:\r\n      layout: docs\r\n      navigation: true\r\n    pages:\r\n      - title: API Documentation\r\n        contents:\r\n          - '*'\r\n```\r\n\r\nThen run:\r\n\r\n```bash\r\npydoc-markdown\r\n```\r\n\r\nThis will generate Nuxt Content compatible Markdown files in the `content/docs` directory.\r\n\r\n## Configuration\r\n\r\n### Basic Options\r\n\r\n- `content_directory`: Directory where content files are generated (default: `content`)\r\n- `clean_render`: Whether to clean previous files before rendering (default: `true`)\r\n- `default_frontmatter`: Default YAML frontmatter applied to all pages\r\n- `use_mdc`: Enable MDC syntax features (default: `true`)\r\n- `base_url`: Base URL for documentation (default: `/`)\r\n\r\n### Page Configuration\r\n\r\nPages support all standard pydoc-markdown page options plus:\r\n\r\n- `frontmatter`: Custom YAML frontmatter for the page\r\n- `directory`: Custom subdirectory for the page\r\n- `extension`: File extension (default: `.md`)\r\n\r\n### Example Configuration\r\n\r\n```yaml\r\nloaders:\r\n  - type: python\r\n    search_path: [src]\r\n\r\nprocessors:\r\n  - type: filter\r\n    expression: not name.startswith('_')\r\n  - type: smart\r\n  - type: crossref\r\n\r\nrenderers:\r\n  - type: nuxt\r\n    content_directory: content/docs\r\n    use_mdc: true\r\n    base_url: /docs/\r\n    default_frontmatter:\r\n      layout: docs\r\n      navigation: true\r\n      sidebar: true\r\n    pages:\r\n      - title: Home\r\n        name: index\r\n        source: README.md\r\n        frontmatter:\r\n          description: \"Welcome to our API documentation\"\r\n          icon: \"home\"\r\n      - title: Getting Started\r\n        name: getting-started\r\n        source: docs/getting-started.md\r\n        frontmatter:\r\n          description: \"Quick start guide\"\r\n          icon: \"rocket\"\r\n      - title: API Reference\r\n        name: api\r\n        directory: reference\r\n        frontmatter:\r\n          description: \"Complete API reference\"\r\n          icon: \"code\"\r\n        contents:\r\n          - mypackage.*\r\n```\r\n\r\n## Generated Output\r\n\r\nThe renderer generates Markdown files with YAML frontmatter:\r\n\r\n```markdown\r\n---\r\ntitle: API Documentation\r\nlayout: docs\r\nnavigation: true\r\ndescription: Complete API reference\r\nicon: code\r\n---\r\n\r\n# MyClass\r\n\r\nA sample class for demonstration.\r\n\r\n## Methods\r\n\r\n### my_method(param1, param2='default')\r\n\r\nA sample method that does something useful.\r\n\r\n**Arguments:**\r\n- `param1`: First parameter\r\n- `param2`: Second parameter with default value\r\n\r\n**Returns:**\r\nSomething useful\r\n```\r\n\r\n## Integration with Nuxt Content\r\n\r\nThe generated files work seamlessly with Nuxt Content:\r\n\r\n1. **File-based Routing**: Files in `content/` automatically become pages\r\n2. **Navigation**: Use frontmatter to control navigation appearance\r\n3. **Layouts**: Specify custom layouts through frontmatter\r\n4. **Metadata**: Rich metadata support for SEO and organization\r\n\r\n## MDC Support\r\n\r\nWhen `use_mdc: true`, the renderer is ready for MDC enhancements:\r\n\r\n```markdown\r\n::alert{type=\"info\"}\r\nThis is an info alert using MDC syntax\r\n::\r\n\r\n::code-group\r\n```python\r\n# Python example\r\ndef hello():\r\n    return \"Hello, World!\"\r\n```\r\n::\r\n```\r\n\r\n## Development\r\n\r\nTo contribute to this project:\r\n\r\n```bash\r\ngit clone https://github.com/UrielCuriel/pydoc-markdown-nuxt\r\ncd pydoc-markdown-nuxt\r\npip install -e .\r\n```\r\n\r\nRun tests:\r\n\r\n```bash\r\npython test_renderer.py\r\n```\r\n\r\n## License\r\n\r\nMIT License - see LICENSE file for details.\r\n",
    "bugtrack_url": null,
    "license": "MIT License\r\n        \r\n        Copyright (c) 2025 Uriel Curiel\r\n        \r\n        Permission is hereby granted, free of charge, to any person obtaining a copy\r\n        of this software and associated documentation files (the \"Software\"), to deal\r\n        in the Software without restriction, including without limitation the rights\r\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n        copies of the Software, and to permit persons to whom the Software is\r\n        furnished to do so, subject to the following conditions:\r\n        \r\n        The above copyright notice and this permission notice shall be included in all\r\n        copies or substantial portions of the Software.\r\n        \r\n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n        SOFTWARE.\r\n        ",
    "summary": "A Nuxt.js renderer for pydoc-markdown that generates documentation compatible with Nuxt Content and MDC",
    "version": "0.1.1",
    "project_urls": null,
    "split_keywords": [
        "pydoc-markdown",
        " nuxt",
        " documentation",
        " python",
        " mdc",
        " nuxt-content"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b506384e4b66a863662068bdd73e56d10d2b9b2da482b7c58e67fe58071dddae",
                "md5": "407d3e07af905f538a1755a5886aeebd",
                "sha256": "28e2e8b681ead5ed0667ba849a3bb61982971a3239f49c7de86af7f39881c6fd"
            },
            "downloads": -1,
            "filename": "pydoc_markdown_nuxt-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "407d3e07af905f538a1755a5886aeebd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 17383,
            "upload_time": "2025-07-25T18:13:04",
            "upload_time_iso_8601": "2025-07-25T18:13:04.443965Z",
            "url": "https://files.pythonhosted.org/packages/b5/06/384e4b66a863662068bdd73e56d10d2b9b2da482b7c58e67fe58071dddae/pydoc_markdown_nuxt-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "731d294207f947707eac28c89e5c4d6b38159be9f47932d97f2aaa7eb24abab0",
                "md5": "c3bfbe982af77bb781fdb21ce2ea02e6",
                "sha256": "5ea0a663da45aad8b6f5bb63f0481933cfab745b1f869b0bb1fe4b184ab92346"
            },
            "downloads": -1,
            "filename": "pydoc_markdown_nuxt-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c3bfbe982af77bb781fdb21ce2ea02e6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 22924,
            "upload_time": "2025-07-25T18:13:05",
            "upload_time_iso_8601": "2025-07-25T18:13:05.773873Z",
            "url": "https://files.pythonhosted.org/packages/73/1d/294207f947707eac28c89e5c4d6b38159be9f47932d97f2aaa7eb24abab0/pydoc_markdown_nuxt-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-25 18:13:05",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pydoc-markdown-nuxt"
}
        
Elapsed time: 0.86489s