From d0fbb3e1a4cd345b29d592b989bd3b1444fb0b39 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 30 Aug 2023 14:55:09 +0200 Subject: [PATCH] doc: Fix links to language specific reference docs in Slint reference Instead of linking to the latest /docs/cpp, etc., link to /releases/XXX/docs/cpp. (Converted the getting started to markdown while at it ) --- docs/reference/conf.py | 7 +++++++ docs/reference/index.rst | 3 ++- docs/reference/src/introduction/index.md | 23 +++++++++++++++++++++ docs/reference/src/introduction/index.rst | 25 ----------------------- 4 files changed, 32 insertions(+), 26 deletions(-) create mode 100644 docs/reference/src/introduction/index.md delete mode 100644 docs/reference/src/introduction/index.rst diff --git a/docs/reference/conf.py b/docs/reference/conf.py index 2964d0511..b4dde14fb 100644 --- a/docs/reference/conf.py +++ b/docs/reference/conf.py @@ -95,6 +95,13 @@ myst_enable_extensions = [ "html_image", ] +myst_url_schemes = { + "slint-cpp": f"https://slint.dev/releases/{version}/docs/cpp/{{{{path}}}}", + "slint-rust": f"https://slint.dev/releases/{version}/docs/rust/slint/{{{{path}}}}", + "slint-node": f"https://slint.dev/releases/{version}/docs/node/{{{{path}}}}", + 'http': None, 'https': None, 'mailto': None, +} + # Annotate h1/h2 elements with anchors myst_heading_anchors = 4 diff --git a/docs/reference/index.rst b/docs/reference/index.rst index 1b16e1ac3..8b459aa83 100644 --- a/docs/reference/index.rst +++ b/docs/reference/index.rst @@ -1,7 +1,8 @@ .. Copyright © SixtyFPS GmbH .. SPDX-License-Identifier: MIT -.. include:: src/introduction/index.rst +.. include:: src/introduction/index.md + :parser: myst_parser.sphinx_ .. toctree:: :hidden: diff --git a/docs/reference/src/introduction/index.md b/docs/reference/src/introduction/index.md new file mode 100644 index 000000000..8d9dde1e5 --- /dev/null +++ b/docs/reference/src/introduction/index.md @@ -0,0 +1,23 @@ + + +# Getting Started + +First, you need `.slint` files, which contain a textual description of your user interface, written in the Slint language. +Next, you embed the `.slint` files in a project written in a supported programming language, like C++, Rust, or JavaScript. + +There are three different pathways to get started with Slint: + +1. [SlintPad](https://slint.dev/editor) - Use this to get a feel of the Slint language. + This is a web browser-based tool where you can try Slint out. + +2. As a UI Designer, working with Slint files locally, we recommend the following combination of software tools: + + - [Visual Studio Code](https://code.visualstudio.com) + - [The Slint for Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=Slint.slint) + +3. As a Software Developer, integrating Slint into a new or existing code base, choose one of these languages to + get started: + + - [C++](slint-cpp:index.html) + - [Rust](slint-rust:index.html) + - [JavaScript](slint-node:index.html) diff --git a/docs/reference/src/introduction/index.rst b/docs/reference/src/introduction/index.rst deleted file mode 100644 index 0548c1aef..000000000 --- a/docs/reference/src/introduction/index.rst +++ /dev/null @@ -1,25 +0,0 @@ -.. Copyright © SixtyFPS GmbH -.. SPDX-License-Identifier: MIT - -Getting Started -=============== - -First, you need :code:`.slint` files, which contain a textual description of your user interface, written in the Slint language. -Next, you embed the :code:`.slint` files in a project written in a supported programming language, like C++, Rust, or JavaScript. - -There are three different pathways to get started with Slint: - -1. `SlintPad `_ - Use this to get a feel of the Slint language. - This is a web browser-based tool where you can try Slint out. - -2. As a UI Designer, working with Slint files locally, we recommend the following combination of software tools: - - - `Visual Studio Code `_ - - `The Slint for Visual Studio Code Extension `_ - -3. As a Software Developer, integrating Slint into a new or existing code base, choose one of these languages to - get started: - - - `C++ `_ - - `Rust `_ - - `JavaScript `_