Skip to main content

Crystal language doc generator for mkdocstrings

Project description

mkdocstrings-crystal

Crystal language doc generator for MkDocs, via mkdocstrings.

PyPI GitHub GitHub Workflow Status

Introduction

mkdocstrings-crystal allows you to insert API documentation (generated from Crystal's source code and doc comments) as part of any page on a MkDocs site.

See it in action.

To install it, run (possibly in a virtualenv):

pip install mkdocstrings-crystal

Continue to the documentation site.

Usage

With MkDocs, add/merge this base config as your mkdocs.yml:

site_name: My Project

theme:
  name: material

plugins:
  - search
  - mkdocstrings:
      default_handler: crystal

markdown_extensions:
  - pymdownx.highlight
  - deduplicate-toc

Then, in any docs/**/*.md file, you can mention a Crystal identifier alone on a line, after ::::

::: MyClass

::: Other::Class#some_method

::: Foo::CONSTANT

-- and in the output this will be replaced with generated API documentation for it, much like Crystal's own doc generator does.

This, of course, happens as part of a normal MkDocs build process:

mkdocs build  # generate from docs/ into site/
mkdocs serve  # live preview

Continue to the documentation site.

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

mkdocstrings-crystal-0.3.1.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

mkdocstrings_crystal-0.3.1-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file mkdocstrings-crystal-0.3.1.tar.gz.

File metadata

  • Download URL: mkdocstrings-crystal-0.3.1.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.11.1-arch1-1

File hashes

Hashes for mkdocstrings-crystal-0.3.1.tar.gz
Algorithm Hash digest
SHA256 312ea22d4f29dc623d81c602fca640f86d6b35480dc4a8abaa127e6996b05551
MD5 dd6a2b61d51044488c34b18b6cf44ccd
BLAKE2b-256 532b1ddc5f514cd0afcfdfc48aca5b137181b6fe8c99ad2073002038b23bd97e

See more details on using hashes here.

File details

Details for the file mkdocstrings_crystal-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocstrings_crystal-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9f0ad1bcc4713b13577224d3a0496c72254632c2bde6b2b74504836011c42fdc
MD5 9fc3858d4eef0699c2f1ba852db140ed
BLAKE2b-256 0c24ba177ee6a2d9fe915b71c7f8cf23dfaffb8dc282e392154b297dfd3011e4

See more details on using hashes here.

Supported by

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