Skip to content

Commit 2d044fd

Browse files
committed
doc/starlight: Introduce re-usable components
1 parent e82ada6 commit 2d044fd

5 files changed

Lines changed: 63 additions & 1 deletion

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
import { Aside } from "@astrojs/starlight/components";
3+
---
4+
5+
<Aside type="tip" title="We don't bite, reach out for help!">
6+
<p>
7+
Do not be afraid to ask for help e.g. in <a
8+
href="https://forum.riot-os.org/">our forum</a
9+
> or <a href="https://matrix.to/#/#riot-os:matrix.org">Matrix chat</a>.
10+
</p>
11+
<p>
12+
We are happy to help you get started with RIOT, and we appreciate your
13+
feedback.
14+
</p>
15+
</Aside>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
:::note
2+
This tutorial assumes that you have already set up your development environment
3+
as described in the [Getting Started](/getting-started/installing/) guide.
4+
:::
5+
6+
Now that we have played around with the examples and have a basic understanding of how to use RIOT, let's create a new project from scratch. We will create a simple hello world program that will print "Hello World!" to the console.
7+
8+
#### Step 1: Create a new git repository
9+
10+
We start by creating a new git repository for our project. If you have never worked with git before, you can find a good introduction [here](https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control) or [here](https://docs.github.com/en/get-started/getting-started-with-git/set-up-git).
11+
12+
Let's create a new directory for our project in which we will store our code. We will call this directory `hello_world`.
13+
14+
```bash
15+
mkdir hello_world && cd hello_world
16+
```
17+
18+
Next, we initialize a new git repository in this directory. This will allow us to track changes to our code and collaborate with others and also allows us to easily get RIOT as a submodule.
19+
20+
```bash
21+
git init
22+
```
23+
24+
![The output of the git init command](img/gitsetup/01_empty_git.png)
25+
26+
Congratulations! You have now created a new empty git repository. In the next step, we will add RIOT as a submodule to our project.
27+
28+
#### Step 2: Add RIOT as a submodule
29+
30+
We want to import RIOT as a submodule to our project. This will allow us to easily update to newer versions of RIOT and also allows us to easily share our project with others on GitHub, Gitlab, or any other git hosting service.
31+
32+
To add RIOT as a submodule, we use the following command:
33+
34+
```bash
35+
git submodule add https://github.com/RIOT-OS/RIOT.git
36+
```
37+
38+
![Adding the submodule](img/gitsetup/02_riot_submodule.png)
39+
40+
When looking into our directory via `ls`, we can see that a new directory called `RIOT` has been created. This directory contains the RIOT source code. If you were to push your project to a git hosting service, the `RIOT` directory would not be included in the repository. Instead, the repository would contain a reference to the commit of the RIOT repository that you have added as a submodule. This way, the repository stays small and only contains the code that you have written and not the entire RIOT source code.
57.7 KB
Loading
62.8 KB
Loading

doc/starlight/tsconfig.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
22
"extends": "astro/tsconfigs/strict",
33
"include": [".astro/types.d.ts", "**/*"],
4-
"exclude": ["dist"]
4+
"exclude": ["dist"],
5+
"compilerOptions": {
6+
"baseUrl": ".",
7+
"paths": {
8+
"@components/*": ["src/components/*"],
9+
},
10+
"types": ["astro/client", "astro/astro-jsx"]
11+
}
512
}

0 commit comments

Comments
 (0)