diff --git a/config.toml b/config.toml index e815c7e..3248153 100644 --- a/config.toml +++ b/config.toml @@ -17,3 +17,5 @@ baseURL = "https://actix.rs" [params] actixVersion = "0.7" actixWebVersion = "1.0" +actixWebMinRustVersion = "1.34" +actixMinRustVersion = "1.31" diff --git a/content/docs/installation.md b/content/docs/installation.md index a4e09b3..5ad24b6 100644 --- a/content/docs/installation.md +++ b/content/docs/installation.md @@ -12,9 +12,10 @@ installation. The [official rust guide](https://doc.rust-lang.org/book/ch01-01-installation.html) has a wonderful section on getting started. -We currently require at least Rust 1.24 so make sure you run `rustup update` -to have the latest and greatest Rust version available. In particular this -guide will assume that you actually run Rust 1.26 or later. +We currently require at least Rust {{< rust-version "actix-web" >}} so make sure you +run `rustup update` to have the latest and greatest Rust version available. In +particular this guide will assume that you actually run Rust +{{< rust-version "actix-web" >}} or later. # Installing `actix-web` diff --git a/content/docs/whatis.md b/content/docs/whatis.md index 0b60368..6a097d3 100644 --- a/content/docs/whatis.md +++ b/content/docs/whatis.md @@ -23,5 +23,5 @@ server `actix-web` is powerful enough to provide HTTP 1 and HTTP 2 support as well as SSL/TLS. This makes it useful for building small services ready for distribution. -Most importantly: `actix-web` runs on Rust 1.26 or later and it works with -stable releases. +Most importantly: `actix-web` runs on Rust {{< rust-version "actix-web" >}} or later +and it works with stable releases. diff --git a/layouts/shortcodes/rust-version.html b/layouts/shortcodes/rust-version.html new file mode 100644 index 0000000..9f50a46 --- /dev/null +++ b/layouts/shortcodes/rust-version.html @@ -0,0 +1,5 @@ +{{- if eq (.Get 0) "actix" -}} + {{- .Page.Site.Params.actixMinRustVersion -}} +{{- else if eq (.Get 0) "actix-web" -}} + {{- .Page.Site.Params.actixWebMinRustVersion -}} +{{- end -}}