From 69c0e30519a43a570a2053f06b872daf5ce3d74d Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Thu, 23 Nov 2023 15:54:27 +0100 Subject: [PATCH] Reuse parts of `README.md` in `docs/index.md` We want to also include some basic information of the project in the documentation home page (but not all of it), so we use the include extension to reuse some README sections. Signed-off-by: Leandro Lucarella --- README.md | 8 ++++++++ docs/index.md | 24 ++++++++++++------------ mkdocs.yml | 1 + 3 files changed, 21 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 7633b2fd..e3bd5f61 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ ## Introduction + + Frequenz Channels is a *channels* implementation for Python. According to [Wikipedia](https://en.wikipedia.org/wiki/Channel_(programming)): @@ -20,14 +22,20 @@ Frequenz Channels are mostly designed after [Go channels](https://tour.golang.org/concurrency/2) but it also borrows ideas from [Rust channels](https://doc.rust-lang.org/book/ch16-02-message-passing.html). + + ## Supported Platforms + + The following platforms are officially supported (tested): - **Python:** 3.11 - **Operating System:** Ubuntu Linux 20.04 - **Architectures:** amd64, arm64 + + ## Quick Start We assume you are on a system with Python available. If that is not the case, diff --git a/docs/index.md b/docs/index.md index 8e2b2036..17590073 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,19 +2,19 @@ ## Introduction -Frequenz Channels is a *channels* implementation for Python. +{% + include-markdown "../README.md" + start="" + end="" +%} -According to [Wikipedia](https://en.wikipedia.org/wiki/Channel_(programming)): +## Supported Platforms -> A channel is a model for interprocess communication and synchronization via -> message passing. A message may be sent over a channel, and another process or -> thread is able to receive messages sent over a channel it has a reference to, -> as a stream. Different implementations of channels may be buffered or not, -> and either synchronous or asynchronous. - -Frequenz Channels are mostly designed after [Go -channels](https://tour.golang.org/concurrency/2) but it also borrows ideas from -[Rust channels](https://doc.rust-lang.org/book/ch16-02-message-passing.html). +{% + include-markdown "../README.md" + start="" + end="" +%} ## Installation @@ -77,5 +77,5 @@ $ python3 Python 3.11.4 (main, Jun 7 2023, 10:13:09) [GCC 12.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import frequenz.channels ->>> +>>> ``` diff --git a/mkdocs.yml b/mkdocs.yml index 4fce883f..c184f59c 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -133,3 +133,4 @@ plugins: watch: - "src" - CONTRIBUTING.md + - README.md