Skip to content

Commit 601dbbc

Browse files
Skullians0xnim
andcommitted
Update from upstream
Co-Authored-By: Niklas Wojtkowiak <[email protected]>
1 parent 1a39a17 commit 601dbbc

File tree

6 files changed

+157
-31
lines changed

6 files changed

+157
-31
lines changed

astro.config.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import starlight from '@astrojs/starlight';
44

55
// https://astro.build/config
66
export default defineConfig({
7-
site: 'https://ferrumc-rs.github.io/',
8-
base: 'docs',
97
integrations: [
108
starlight({
119
title: 'FerrumC Docs',
@@ -31,6 +29,9 @@ export default defineConfig({
3129
},
3230
],
3331
favicon: "/favicon.ico",
32+
customCss: [
33+
'src/style/theme.css',
34+
],
3435
}),
3536
],
3637
});

src/components/HeadlessTabs.astro

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
import { Tabs } from '@astrojs/starlight/components';
3+
import type { ComponentProps } from 'astro/types';
4+
type Props = ComponentProps<typeof Tabs>;
5+
---
6+
<div class="hide-tablist">
7+
<Tabs {...Astro.props}><slot /></Tabs>
8+
</div>
9+
<style>
10+
.hide-tablist :global(.tablist-wrapper) {
11+
display: none;
12+
}
13+
</style>

src/content/docs/about/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: Frequently asked questions about FerrumC.
77
Yes! It is not currently on our list of priorities, and it is very unlikely that we will be able to mirror Vanilla world generation 1:1. However, we do plan on implementing some form of terrain generation as soon as we can.
88

99
## What does 'FerrumC' mean?
10-
It's a play on words. Ferrum is the Lain word for iron and it ***rusts***. And MC (Minecraft) is in the end. So it becomes Ferru*mc*. Get it?
10+
It's a play on words. Ferrum is the Latin word for iron and it ***rusts***. And MC (Minecraft) is in the end. So it becomes Ferru*mc*. Get it?
1111

1212
## How does this project differ from:
1313
1. **[Valence](https://valence.rs/)**:\

src/content/docs/index.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
---
22
title: FerrumC
33
description: Get started building your docs site with Starlight.
4-
template: splash
4+
template: doc
5+
tableOfContents: false
6+
next: false
7+
prev: false
8+
banner:
9+
content: |
10+
We are still in alpha development!
511
hero:
612
tagline: A lightweight 1.21 Minecraft server implementation in Rust.
713
image:

src/content/docs/start/getting_started.mdx

Lines changed: 104 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
---
22
title: 🚀 Getting Started
33
description: Quickly get up and running with FerrumC.
4+
5+
perv: false
46
---
57

68
import { Aside, Badge, FileTree, Tabs, TabItem, Steps } from '@astrojs/starlight/components';
9+
import HeadlessTabs from '~/components/HeadlessTabs.astro';
710

811
## Prerequisites
912
<Aside type="tip">You will not need to install these prerequisites if you are not compiling it yourself!</Aside>
@@ -153,45 +156,105 @@ Before starting, make sure you have the following prerequisites:
153156
</Steps>
154157
This will create a `ferrumc` executable in the `target/release` directory.
155158

156-
### Pre-Run
159+
## Pre-Run
157160
<Steps>
158161
1. **Move the FerrumC binary to your desired server directory**
159162

160163
2. Select the **latest** successful workflow
161164

162165
2. <Badge text="Optional" variant="note" /> **Generate a config file**
163-
~~~bash
164-
./ferrumc --setup
165-
~~~
166+
<Tabs syncKey="os">
167+
<TabItem label="Linux">
168+
~~~bash
169+
./ferrumc --setup
170+
~~~
171+
</TabItem>
172+
<TabItem label="macOS">
173+
~~~bash
174+
./ferrumc --setup
175+
~~~
176+
</TabItem>
177+
<TabItem label="Windows">
178+
~~~powershell
179+
.\ferrumc.exe --setup
180+
~~~
181+
</TabItem>
182+
</Tabs>
166183

167184
3. **Import an existing world**
168185

169186
Place the region files (.mca) in the folder named import then run
170-
~~~bash
171-
./ferrumc --import
172-
~~~
187+
<Tabs syncKey="os">
188+
<TabItem label="Linux">
189+
~~~bash
190+
./ferrumc --import
191+
~~~
192+
</TabItem>
193+
<TabItem label="macOS">
194+
~~~bash
195+
./ferrumc --import
196+
~~~
197+
</TabItem>
198+
<TabItem label="Windows">
199+
~~~powershell
200+
.\ferrumc.exe --import
201+
~~~
202+
</TabItem>
203+
</Tabs>
173204
The location of these files in minecraft is explained [here](https://minecraft.wiki/w/Region_file_format#Location)
174-
<FileTree>
175-
176-
- import region files in here
177-
- ...
178-
- config.toml
179-
- ferrumc
180-
181-
</FileTree>
205+
<HeadlessTabs syncKey="os">
206+
<TabItem label="Linux">
207+
<FileTree>
208+
- import region files in here
209+
- ...
210+
- config.toml
211+
- ferrumc
212+
</FileTree>
213+
</TabItem>
214+
<TabItem label="macOS">
215+
<FileTree>
216+
- import region files in here
217+
- ...
218+
- config.toml
219+
- ferrumc
220+
</FileTree>
221+
</TabItem>
222+
<TabItem label="Windows">
223+
<FileTree>
224+
- import region files in here
225+
- ...
226+
- config.toml
227+
- ferrumc.exe
228+
</FileTree>
229+
</TabItem>
230+
</HeadlessTabs>
182231
<Aside type="tip">
183232
If you want to modify batch size (default 150), you can use
184-
~~~bash
185-
./ferrumc --import --batch_size=<num>
186-
~~~
233+
<HeadlessTabs syncKey="os">
234+
<TabItem label="Linux">
235+
~~~bash
236+
./ferrumc --import --batch_size=<num>
237+
~~~
238+
</TabItem>
239+
<TabItem label="macOS">
240+
~~~bash
241+
./ferrumc --import --batch_size=<num>
242+
~~~
243+
</TabItem>
244+
<TabItem label="Windows">
245+
~~~cmd
246+
.\ferrumc.exe --import --batch_size=<num>
247+
~~~
248+
</TabItem>
249+
</HeadlessTabs>
187250
Basically the number of chunks to import at once, higher => faster but more CPU intensive.
188251
Max is 1024, since that's the max number of chunks in a region(.mca) file.
189252
</Aside>
190253
</Steps>
191254

192-
### Run
255+
## Run
193256

194-
<Tabs syncKey="os">
257+
<HeadlessTabs syncKey="os">
195258
<TabItem label="Linux">
196259
~~~bash
197260
./ferrumc
@@ -203,16 +266,30 @@ This will create a `ferrumc` executable in the `target/release` directory.
203266
~~~
204267
</TabItem>
205268
<TabItem label="Windows">
206-
~~~bash
269+
~~~cmd
207270
.\ferrumc.exe
208271
~~~
209272
</TabItem>
210-
</Tabs>
273+
</HeadlessTabs>
211274

212275
You can change logging level by using ```--log=<level>```:
213-
~~~bash
214-
./ferrumc --log=info #for info level logging
215-
~~~
276+
<Tabs syncKey="os">
277+
<TabItem label="Linux">
278+
~~~bash
279+
./ferrumc --log=info #for info level logging
280+
~~~
281+
</TabItem>
282+
<TabItem label="macOS">
283+
~~~bash
284+
./ferrumc --log=info #for info level logging
285+
~~~
286+
</TabItem>
287+
<TabItem label="Windows">
288+
~~~cmd
289+
.\ferrumc.exe --log=info #for info level logging
290+
~~~
291+
</TabItem>
292+
</Tabs>
216293

217294
###### Logging values:
218295
- trace (Extremely verbose)
@@ -229,7 +306,7 @@ You can change logging level by using ```--log=<level>```:
229306
export FERRUMC_ROOT=/home/YourUser/Documents/Code/Rust/ferrumc
230307
~~~
231308
</TabItem>
232-
<TabItem label="macOS">
309+
<TabItem label="macOS">
233310
~~~bash
234311
export FERRUMC_ROOT=/home/YourUser/Documents/Code/Rust/ferrumc
235312
~~~
@@ -245,4 +322,4 @@ You can change logging level by using ```--log=<level>```:
245322

246323

247324

248-
---
325+
---

src/style/theme.css

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/* Dark mode colors. */
2+
:root {
3+
--sl-color-accent-low: #460b05;
4+
--sl-color-accent: #c60e00;
5+
--sl-color-accent-high: #e35519;
6+
--sl-color-white: #ffffff;
7+
--sl-color-gray-1: #f3ecea;
8+
--sl-color-gray-2: #c8c0be;
9+
--sl-color-gray-3: #978784;
10+
--sl-color-gray-4: #635451;
11+
--sl-color-gray-5: #423432;
12+
--sl-color-gray-6: #302321;
13+
--sl-color-black: #1d1715;
14+
}
15+
/* Light mode colors. */
16+
:root[data-theme='light'] {
17+
--sl-color-accent-low: #ffc8be;
18+
--sl-color-accent: #c90e00;
19+
--sl-color-accent-high: #640300;
20+
--sl-color-white: #1d1715;
21+
--sl-color-gray-1: #302321;
22+
--sl-color-gray-2: #423432;
23+
--sl-color-gray-3: #635451;
24+
--sl-color-gray-4: #978784;
25+
--sl-color-gray-5: #c8c0be;
26+
--sl-color-gray-6: #f3ecea;
27+
--sl-color-gray-7: #f9f5f5;
28+
--sl-color-black: #ffffff;
29+
}

0 commit comments

Comments
 (0)