kotlin4example
mkdocstrings
kotlin4example | mkdocstrings | |
---|---|---|
1 | 9 | |
15 | 1,572 | |
- | 2.5% | |
6.0 | 8.4 | |
about 2 months ago | 8 days ago | |
Kotlin | Python | |
MIT License | ISC License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
kotlin4example
-
Technical documentation that just works
This tool seems like it is a nice markdown based CMS but I don't see too many features related to the more difficult parts of doing technical documentation. Like having working code samples.
I attempted a Kotlin centric documentation framework a while ago to address this: https://github.com/jillesvangurp/kotlin4example
I mainly use it to generate the documentation for my Elasticsearch Kotlin Client (jillesvangurp/es-kotlin-client). The idea there is that all examples and source samples are correctly compiling Kotlin code that I can get the output of when they run (e.g. a println). Running the tests, actually generates the documentation markdown. Using a dsl and multiline strings, I can mix lambda code blocks, markdown, or markdown inside files. For the lambda blocks, it figures out the source and line numbers using reflection. But it can also grab source samples based on comment markers. For bigger blobs of markdown, it's easier to grab the content from markdown files. For smaller sections of markdown, I can use inline multi line strings or a Kotlin DSL.
The main benefit of this is that my examples update as I change and refactor the code base. Also, since it runs as part of my tests, I know when examples break.
mkdocstrings
-
Starlite development updates January ’23
Mkdocs has the mkdocstrings plugin, offering limited automated API documentation capabilities. It is however nowhere near as capable as Sphinx' autodoc, missing granularity in its configuration, limited intersphinx-like cross-referencing support, and essential features like documentation of inherited members, or the ability to manually describe objects if needed.
-
what's a good documentation platform that you guys would recommend?
mkdocstrings works well, although it is not as powerful as the API documentation in Sphinx.
-
Stripe Open Sources Markdoc
Author of Materia for MkDocs here. MkDocstrings [1] implements automatic generation of reference documentation from sources. It's language-agnostic, actively maintained and currently supports Python [2] and Crystal [3]. It also integrates nicely with Material for MkDocs.
[1]: https://mkdocstrings.github.io/
- Mkdocstrings: Automatic Python documentation from sources, for MkDocs
- Technical documentation that just works
-
mkdocstrings: the "autodoc" plugin for MkDocs
Some time has passed since I first introduced mkdocstrings here on reddit. If you don't know what mkdocstrings is: it's the equivalent of the autodoc Sphinx extension, but for MkDocs, a Markdown static site generator. It works differently though, and supports multiple languages by design (not only Python). Someone actually wrote a very good handler for the Crystal language, and another user on GitHub recently expressed their interest for writing one for Go.
-
Python tutorials building large(r) projects
Write proper docstrings as you go along (every time you write a new class/method/function you can document what it’s doing as you’ll know why and what from the pattern you chose). Using a tool like mkdocstrings makes maintaining documentation for larger projects automatic.
-
[Project] mkgendocs - Generating documentation from Python docstrings for MkDocs
I learned of https://github.com/pawamoy/mkdocstrings recently. Is it similar ?
-
Python packages and plugins as namespace packages
A user of mkdocstrings wrote a Crystal handler for their own use-case. They asked on the Gitter channel if we could allow to load external handlers, so they don't have to fork the project and install the fork, but rather just install their lightweight package containing just the handler.
What are some alternatives?
ltex-ls - LTeX Language Server: LSP language server for LanguageTool :mag::heavy_check_mark: with support for LaTeX :mortar_board:, Markdown :pencil:, and others
mkdocs-material - Documentation that simply works
fastapi - FastAPI framework, high performance, easy to learn, fast to code, ready for production
sphinx - The Sphinx documentation generator
mike - Manage multiple versions of your MkDocs-powered documentation via Git
pydocstyle - docstring style checker
furo - A clean customizable documentation theme for Sphinx
crystal-book - Crystal reference with language specification, manuals and learning materials
cookietemple - A collection of best practice cookiecutter templates for all domains and languages with extensive Github support ⛺
pydantic - Data validation using Python type hints