Keep your code snippets in README up-to-date!

Posted by Better-Banana4069@reddit | Python | View on Reddit | 13 comments

Code-Embedder

Links: GitHub, GitHub Actions Marketplace

What My Project Does

Code Embedder is a GitHub Action that automatically updates code snippets in your markdown (README) files. It finds code blocks in your README that reference specific scripts, then replaces these blocks with the current content of those scripts. This keeps your documentation in sync with your code.

Key features

Find more information in GitHub 🎉

Target Audience

It is a production-ready, tested Github Action that can be part of you CICD workflow to keep your READMEs up-to-date.

Comparison

It is a light-weight package with primary purpose to keep your code examples in READMEs up-to-date. MkDocs is a full solution to creating documentation as a code, which also offers embedding external files. Code-Embedder is a light-weight package that can be used for projects with or without MkDocs. It offers additional functionality to sync not only full scripts, but also a section of a script or a 🐍 Python function / class definition.