Skip to content

Commit b841aee

Browse files
committed
feat: rename installation guide, update core configuration
1 parent 7667328 commit b841aee

9 files changed

+18
-18
lines changed

.gitmodules

-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "CounterStrikeSharp"]
2-
path = CounterStrikeSharp
3-
url = https://github.com/roflmuffin/CounterStrikeSharp

CounterStrikeSharp

-1
This file was deleted.

src/assets/gameinfogi-example.png

275 KB
Loading

src/components/DynamicCode.astro

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
import { Code } from "@astrojs/starlight/components"
3-
const { path } = Astro.props;
3+
const { path, lang } = Astro.props;
44
55
const title = path.split("/").pop()
66
const res = await fetch(`https://raw.githubusercontent.com/roflmuffin/CounterStrikeSharp/main/${path}`)
77
const text = await res.text()
88
---
9-
<Code code={text} lang="csharp" title={title}/>
9+
<Code code={text} lang={lang ?? 'csharp'} title={title}/>

src/content/docs/guides/dependency-injection.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Dependency Injection
33
description: How to make use of dependency injection in CounterStrikeSharp
44
sidebar:
5-
order: 1
5+
order: 2
66
---
77

88
`CounterStrikeSharp` uses a standard <a href="https://learn.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection?view=aspnetcore-8.0" target="_blank">`IServiceCollection`</a> to allow for dependency injection in plugins.

src/content/docs/guides/hello-world-plugin.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Hello World Plugin
33
description: How to write your first plugin for CounterStrikeSharp
44
sidebar:
5-
order: 0
5+
order: 1
66
---
77

88
How to write your first plugin for CounterStrikeSharp

src/content/docs/guides/getting-started.md renamed to src/content/docs/guides/installation.mdx

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
2-
title: Getting Started
2+
title: Installation
33
description: How to get started installing & using CounterStrikeSharp.
44
sidebar:
55
order: 0
66
---
7+
import example from "../../../assets/gameinfogi-example.png";
78

89
In this guide you will learn how to install CounterStrikeSharp onto your vanilla Counter-Strike 2 server. `CounterStrikeSharp` uses `Metamod:Source` as its main way of communicating with the game server, so both frameworks will need to be installed.
910

@@ -20,7 +21,7 @@ If you're more of a visual person, here is a <a href="https://www.youtube.com/wa
2021
3. Create a new line underneath `Game_LowViolence csgo_lv` and add `Game csgo/addons/metamod`.
2122
4. Restart your game server.
2223

23-
Your `gameinfo.gi` should look like <a href="../../images/gameinfogi-example.png" target="_blank">this</a>. Type `meta list` in your server console to see if Metamod is loaded.
24+
Your `gameinfo.gi` should look like <a href={example.src} target="_blank">this</a>. Type `meta list` in your server console to see if Metamod is loaded.
2425

2526
## Installing CounterStrikeSharp
2627

src/content/docs/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ hero:
66
tagline: <code class="csharp">CounterStrikeSharp</code> is a simpler way to write CS2 server plugins.
77
actions:
88
- text: Get started
9-
link: ./guides/getting-started/
9+
link: ./guides/installation/
1010
icon: right-arrow
1111
variant: primary
1212
- text: Download

src/content/docs/reference/core-configuration.md renamed to src/content/docs/reference/core-configuration.mdx

+10-7
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,21 @@
22
title: Core Configuration
33
description: Summary for core configuration values
44
---
5+
import DynamicCode from '../../../components/DynamicCode.astro';
56

6-
Summary for core configuration values
7+
## `core.json` Configuration Reference
78

8-
## `PublicChatTrigger`
9+
<DynamicCode lang="json" path="configs/addons/counterstrikesharp/configs/core.example.json"/>
10+
11+
### `PublicChatTrigger`
912

1013
List of characters to use for public chat triggers.
1114

12-
## `SilentChatTrigger`
15+
### `SilentChatTrigger`
1316

1417
List of characters to use for silent chat triggers.
1518

16-
## `FollowCS2ServerGuidelines`
19+
### `FollowCS2ServerGuidelines`
1720

1821
Per [CS2 Server Guidelines](https://blog.counter-strike.net/index.php/server_guidelines/), certain plugin
1922
functionality will trigger all of the game server owner's Game Server Login Tokens
@@ -27,14 +30,14 @@ receive a ban.
2730
Disable this option at your own risk.
2831
:::
2932

30-
## `PluginHotReloadEnabled`
33+
### `PluginHotReloadEnabled`
3134

3235
When enabled, plugins are automatically reloaded when their .dll file is updated.
3336

34-
## `PluginAutoLoadEnabled`
37+
### `PluginAutoLoadEnabled`
3538

3639
When enabled, plugins are automatically loaded from the plugins directory on server start.
3740

38-
## `ServerLanguage`
41+
### `ServerLanguage`
3942

4043
Configures the default language to use for server commands & messages. The format for the culture name based on RFC 4646 is `languagecode2-country`/`regioncode2`, where `languagecode2` is the two-letter language code and `country/regioncode2` is the two-letter subculture code. Examples include `ja-JP` for Japanese (Japan) and `en-US` for English (United States). Defaults to "en".

0 commit comments

Comments
 (0)