Skip to content

Commit 9f6c832

Browse files
docs: use github admonition styles (#4263)
1 parent cadc89a commit 9f6c832

9 files changed

Lines changed: 224 additions & 158 deletions

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ LizardByte has the full documentation hosted on [Read the Docs](https://docs.liz
3434

3535
## 🖥️ System Requirements
3636

37-
@warning{These tables are a work in progress. Do not purchase hardware based on this information.}
37+
> [!WARNING]
38+
> These tables are a work in progress. Do not purchase hardware based on this information.
3839
3940
<table>
4041
<caption id="minimum_requirements">Minimum Requirements</caption>

docs/app_examples.md

Lines changed: 95 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
Since not all applications behave the same, we decided to create some examples to help you get started adding games
33
and applications to Sunshine.
44

5-
@attention{Throughout these examples, any fields not shown are left blank. You can enhance your experience by
6-
adding an image or a log file (via the `Output` field).}
5+
> [!TIP]
6+
> Throughout these examples, any fields not shown are left blank. You can enhance your experience by
7+
> adding an image or a log file (via the `Output` field).
78
8-
@note{When a working directory is not specified, it defaults to the folder where the target application resides.}
9+
> [!WARNING]
10+
> When a working directory is not specified, it defaults to the folder where the target application resides.
911
1012

1113
## Common Examples
@@ -18,8 +20,10 @@ adding an image or a log file (via the `Output` field).}
1820
| Image | @code{}desktop.png@endcode |
1921

2022
### Steam Big Picture
21-
@note{Steam is launched as a detached command because Steam starts with a process that self updates itself and the original
22-
process is killed.}
23+
24+
> [!NOTE]
25+
> Steam is launched as a detached command because Steam starts with a process that self updates itself and the original
26+
> process is killed.
2327
2428
@tabs{
2529
@tab{Linux | <!-- -->
@@ -49,7 +53,9 @@ process is killed.}
4953
}
5054

5155
### Epic Game Store game
52-
@note{Using URI method will be the most consistent between various games.}
56+
57+
> [!NOTE]
58+
> Using the URI method will be the most consistent between various games.
5359
5460
#### URI
5561

@@ -84,7 +90,9 @@ process is killed.}
8490
}
8591

8692
### Steam game
87-
@note{Using URI method will be the most consistent between various games.}
93+
94+
> [!NOTE]
95+
> Using the URI method will be the most consistent between various games.
8896
8997
#### URI
9098

@@ -169,49 +177,49 @@ process is killed.}
169177
| Do | @code{}sh -c "xrandr --output HDMI-1 --mode ${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT} --rate ${SUNSHINE_CLIENT_FPS}"@endcode |
170178
| Undo | @code{}xrandr --output HDMI-1 --mode 3840x2160 --rate 120@endcode |
171179

172-
@hint{The above only works if the xrandr mode already exists. You will need to create new modes to stream to macOS
173-
and iOS devices, since they use non-standard resolutions.
174-
175-
You can update the ``Do`` command to this:
176-
```bash
177-
bash -c "${HOME}/scripts/set-custom-res.sh \"${SUNSHINE_CLIENT_WIDTH}\" \"${SUNSHINE_CLIENT_HEIGHT}\" \"${SUNSHINE_CLIENT_FPS}\""
178-
```
179-
180-
The `set-custom-res.sh` will have this content:
181-
```bash
182-
#!/bin/bash
183-
set -e
184-
185-
# Get params and set any defaults
186-
width=${1:-1920}
187-
height=${2:-1080}
188-
refresh_rate=${3:-60}
189-
190-
# You may need to adjust the scaling differently so the UI/text isn't too small / big
191-
scale=${4:-0.55}
192-
193-
# Get the name of the active display
194-
display_output=$(xrandr | grep " connected" | awk '{ print $1 }')
195-
196-
# Get the modeline info from the 2nd row in the cvt output
197-
modeline=$(cvt ${width} ${height} ${refresh_rate} | awk 'FNR == 2')
198-
xrandr_mode_str=${modeline//Modeline \"*\" /}
199-
mode_alias="${width}x${height}"
200-
201-
echo "xrandr setting new mode ${mode_alias} ${xrandr_mode_str}"
202-
xrandr --newmode ${mode_alias} ${xrandr_mode_str}
203-
xrandr --addmode ${display_output} ${mode_alias}
204-
205-
# Reset scaling
206-
xrandr --output ${display_output} --scale 1
207-
208-
# Apply new xrandr mode
209-
xrandr --output ${display_output} --primary --mode ${mode_alias} --pos 0x0 --rotate normal --scale ${scale}
210-
211-
# Optional reset your wallpaper to fit to new resolution
212-
# xwallpaper --zoom /path/to/wallpaper.png
213-
```
214-
}
180+
> [!TIP]
181+
> The above only works if the xrandr mode already exists. You will need to create new modes to stream to macOS
182+
> and iOS devices, since they use non-standard resolutions.
183+
>
184+
> You can update the ``Do`` command to this:
185+
> ```bash
186+
> bash -c "${HOME}/scripts/set-custom-res.sh \"${SUNSHINE_CLIENT_WIDTH}\" \"${SUNSHINE_CLIENT_HEIGHT}\" \"${SUNSHINE_CLIENT_FPS}\""
187+
> ```
188+
>
189+
> The `set-custom-res.sh` will have this content:
190+
> ```bash
191+
> #!/bin/bash
192+
> set -e
193+
>
194+
> # Get params and set any defaults
195+
> width=${1:-1920}
196+
> height=${2:-1080}
197+
> refresh_rate=${3:-60}
198+
>
199+
> # You may need to adjust the scaling differently so the UI/text isn't too small / big
200+
> scale=${4:-0.55}
201+
>
202+
> # Get the name of the active display
203+
> display_output=$(xrandr | grep " connected" | awk '{ print $1 }')
204+
>
205+
> # Get the modeline info from the 2nd row in the cvt output
206+
> modeline=$(cvt ${width} ${height} ${refresh_rate} | awk 'FNR == 2')
207+
> xrandr_mode_str=${modeline//Modeline \"*\" /}
208+
> mode_alias="${width}x${height}"
209+
>
210+
> echo "xrandr setting new mode ${mode_alias} ${xrandr_mode_str}"
211+
> xrandr --newmode ${mode_alias} ${xrandr_mode_str}
212+
> xrandr --addmode ${display_output} ${mode_alias}
213+
>
214+
> # Reset scaling
215+
> xrandr --output ${display_output} --scale 1
216+
>
217+
> # Apply new xrandr mode
218+
> xrandr --output ${display_output} --primary --mode ${mode_alias} --pos 0x0 --rotate normal --scale ${scale}
219+
>
220+
> # Optional reset your wallpaper to fit to new resolution
221+
> # xwallpaper --zoom /path/to/wallpaper.png
222+
> ```
215223
216224
###### Wayland (wlroots, e.g. hyprland)
217225
@@ -220,7 +228,8 @@ xrandr --output ${display_output} --primary --mode ${mode_alias} --pos 0x0 --rot
220228
| Do | @code{}sh -c "wlr-xrandr --output HDMI-1 --mode \"${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}Hz\""@endcode |
221229
| Undo | @code{}wlr-xrandr --output HDMI-1 --mode 3840x2160@120Hz@endcode |
222230
223-
@hint{`wlr-xrandr` only works with wlroots-based compositors.}
231+
> [!TIP]
232+
> `wlr-xrandr` only works with wlroots-based compositors.
224233
225234
###### Gnome (X11)
226235
@@ -240,12 +249,12 @@ Installation instructions for displayconfig-mutter can be [found here](https://g
240249
[gnome-randr-rust](https://github.com/maxwellainatchi/gnome-randr-rust) and [gnome-randr.py](https://gitlab.com/Oschowa/gnome-randr), but both of those are
241250
unmaintained and do not support newer Mutter features such as HDR and VRR.
242251
243-
@hint{HDR support has been added to Gnome 48, to check if your display supports it you can run this:
244-
```
245-
displayconfig-mutter list
246-
```
247-
If it doesn't, then remove ``--hdr`` flag from both ``Do`` and ``Undo`` steps.
248-
}
252+
> [!TIP]
253+
> HDR support has been added to Gnome 48, to check if your display supports it, you can run this:
254+
> ```
255+
> displayconfig-mutter list
256+
> ```
257+
> If it doesn't, then remove ``--hdr`` flag from both ``Do`` and ``Undo`` steps.
249258
250259
###### KDE Plasma (Wayland, X11)
251260
@@ -254,22 +263,22 @@ If it doesn't, then remove ``--hdr`` flag from both ``Do`` and ``Undo`` steps.
254263
| Do | @code{}sh -c "kscreen-doctor output.HDMI-A-1.mode.${SUNSHINE_CLIENT_WIDTH}x${SUNSHINE_CLIENT_HEIGHT}@${SUNSHINE_CLIENT_FPS}"@endcode |
255264
| Undo | @code{}kscreen-doctor output.HDMI-A-1.mode.3840x2160@120@endcode |
256265
257-
@attention{The names of your displays will differ between X11 and Wayland.
258-
Be sure to use the correct name, depending on your session manager.
259-
e.g. On X11, the monitor may be called ``HDMI-A-0``, but on Wayland, it may be called ``HDMI-A-1``.
260-
}
261-
262-
@hint{Replace ``HDMI-A-1`` with the display name of the monitor you would like to use for Moonlight.
263-
You can list the monitors available to you with:
264-
```
265-
kscreen-doctor -o
266-
```
267-
268-
These will also give you the supported display properties for each monitor. You can select them either by
269-
hard-coding their corresponding number (e.g. ``kscreen-doctor output.HDMI-A1.mode.0``) or using the above
270-
``do`` command to fetch the resolution requested by your Moonlight client
271-
(which has a chance of not being supported by your monitor).
272-
}
266+
> [!CAUTION]
267+
> The names of your displays will differ between X11 and Wayland.
268+
> Be sure to use the correct name, depending on your session manager.
269+
> e.g., On X11, the monitor may be called ``HDMI-A-0``, but on Wayland, it may be called ``HDMI-A-1``.
270+
271+
> [!TIP]
272+
> Replace ``HDMI-A-1`` with the display name of the monitor you would like to use for Moonlight.
273+
> You can list the monitors available to you with:
274+
> ```
275+
> kscreen-doctor -o
276+
> ```
277+
>
278+
> These will also give you the supported display properties for each monitor. You can select them either by
279+
> hard-coding their corresponding number (e.g. ``kscreen-doctor output.HDMI-A1.mode.0``) or using the above
280+
> ``do`` command to fetch the resolution requested by your Moonlight client
281+
> (which has a chance of not being supported by your monitor).
273282
274283
###### NVIDIA
275284
@@ -281,9 +290,11 @@ hard-coding their corresponding number (e.g. ``kscreen-doctor output.HDMI-A1.mod
281290
##### macOS
282291
283292
###### displayplacer
284-
@note{This example uses the `displayplacer` tool to change the resolution.
285-
This tool can be installed following instructions in their
286-
[GitHub repository](https://github.com/jakehilborn/displayplacer)}.
293+
294+
> [!NOTE]
295+
> This example uses the `displayplacer` tool to change the resolution.
296+
> This tool can be installed following instructions in their
297+
> [GitHub repository](https://github.com/jakehilborn/displayplacer).
287298
288299
| Prep Step | Command |
289300
|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
@@ -295,8 +306,10 @@ Sunshine has built-in support for changing the resolution and refresh rate on Wi
295306
third-party tool, you can use *QRes* as an example.
296307
297308
###### QRes
298-
@note{This example uses the *QRes* tool to change the resolution and refresh rate.
299-
This tool can be downloaded from their [SourceForge repository](https://sourceforge.net/projects/qres).}
309+
310+
> [!NOTE]
311+
> This example uses the *QRes* tool to change the resolution and refresh rate.
312+
> This tool can be downloaded from their [SourceForge repository](https://sourceforge.net/projects/qres).
300313
301314
| Prep Step | Command |
302315
|-----------|---------------------------------------------------------------------------------------------------------------------------|
@@ -306,8 +319,10 @@ This tool can be downloaded from their [SourceForge repository](https://sourcefo
306319
### Additional Considerations
307320
308321
#### Linux (Flatpak)
309-
@attention{Because Flatpak packages run in a sandboxed environment and do not normally have access to the
310-
host, the Flatpak of Sunshine requires commands to be prefixed with `flatpak-spawn --host`.}
322+
323+
> [!CAUTION]
324+
> Because Flatpak packages run in a sandboxed environment and do not normally have access to the
325+
> host, the Flatpak of Sunshine requires commands to be prefixed with `flatpak-spawn --host`.
311326
312327
#### Windows
313328
**Elevating Commands (Windows)**

docs/building.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ Sunshine requires CUDA Toolkit for NVFBC capture. There are two caveats to CUDA:
2828
At the time of writing, the recommended version to use is CUDA ~12.9.
2929
See [CUDA compatibility](https://docs.nvidia.com/deploy/cuda-compatibility/index.html) for more info.
3030

31-
@tip{To install older versions, select the appropriate run file based on your desired CUDA version and architecture
32-
according to [CUDA Toolkit Archive](https://developer.nvidia.com/cuda-toolkit-archive)}
31+
> [!NOTE]
32+
> To install older versions, select the appropriate run file based on your desired CUDA version and architecture
33+
> according to [CUDA Toolkit Archive](https://developer.nvidia.com/cuda-toolkit-archive)
3334
3435
#### macOS
3536
You can either use [Homebrew](https://brew.sh) or [MacPorts](https://www.macports.org) to install dependencies.
@@ -127,8 +128,9 @@ cmake -B build -G Ninja -S .
127128
ninja -C build
128129
```
129130

130-
@tip{Available build options can be found in
131-
[options.cmake](https://github.com/LizardByte/Sunshine/blob/master/cmake/prep/options.cmake).}
131+
> [!TIP]
132+
> Available build options can be found in
133+
> [options.cmake](https://github.com/LizardByte/Sunshine/blob/master/cmake/prep/options.cmake).
132134
133135
### Package
134136

docs/contributing.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,15 @@ The following is a simple example of how to use it.
7373
}
7474
```
7575

76-
@note{The json keys should be sorted alphabetically. You can use [jsonabc](https://novicelab.org/jsonabc)
77-
to sort the keys.}
76+
> [!NOTE]
77+
> The JSON keys should be sorted alphabetically. You can use [jsonabc](https://novicelab.org/jsonabc)
78+
> to sort the keys.
7879
79-
@attention{Due to the integration with Crowdin, it is important to only add strings to the *en.json* file,
80-
and to not modify any other language files. After the PR is merged, the translations can take place
81-
on [CrowdIn][crowdin-url]. Once the translations are complete, a PR will be made
82-
to merge the translations into Sunshine.}
80+
> [!IMPORTANT]
81+
> Due to the integration with Crowdin, it is important to only add strings to the *en.json* file,
82+
> and to not modify any other language files. After the PR is merged, the translations can take place
83+
> on [CrowdIn][crowdin-url]. Once the translations are complete, a PR will be made
84+
> to merge the translations into Sunshine.
8385
8486
* Use the string in the Vue component.
8587
```html
@@ -90,8 +92,9 @@ The following is a simple example of how to use it.
9092
</template>
9193
```
9294

93-
@tip{More formatting examples can be found in the
94-
[Vue I18n guide](https://kazupon.github.io/vue-i18n/guide/formatting.html).}
95+
> [!TIP]
96+
> More formatting examples can be found in the
97+
> [Vue I18n guide](https://kazupon.github.io/vue-i18n/guide/formatting.html).
9598
9699
##### C++
97100

@@ -106,11 +109,13 @@ some situations. For example the system tray icon could be localized as it is us
106109
std::string msg = boost::locale::translate("Hello world!");
107110
```
108111

109-
@tip{More examples can be found in the documentation for
110-
[boost locale](https://www.boost.org/doc/libs/1_70_0/libs/locale/doc/html/messages_formatting.html).}
112+
> [!TIP]
113+
> More examples can be found in the documentation for
114+
> [boost locale](https://www.boost.org/doc/libs/1_70_0/libs/locale/doc/html/messages_formatting.html).
111115
112-
@warning{The below is for information only. Contributors should never include manually updated template files, or
113-
manually compiled language files in Pull Requests.}
116+
> [!WARNING]
117+
> The below is for information only. Contributors should never include manually updated template files, or
118+
> manually compiled language files in Pull Requests.
114119
115120
Strings are automatically extracted from the code to the `locale/sunshine.po` template file. The generated file is
116121
used by CrowdIn to generate language specific template files. The file is generated using the
@@ -135,10 +140,11 @@ required for this, along with the python dependencies in the `./scripts/requirem
135140
python ./scripts/_locale.py --compile
136141
```
137142

138-
@attention{Due to the integration with CrowdIn, it is important to not include any extracted or compiled files in
139-
Pull Requests. The files are automatically generated and updated by the workflow. Once the PR is merged, the
140-
translations can take place on [CrowdIn][crowdin-url]. Once the translations are
141-
complete, a PR will be made to merge the translations into Sunshine.}
143+
> [!IMPORTANT]
144+
> Due to the integration with CrowdIn, it is important to not include any extracted or compiled files in
145+
> Pull Requests. The files are automatically generated and updated by the workflow. Once the PR is merged, the
146+
> translations can take place on [CrowdIn][crowdin-url]. Once the translations are
147+
> complete, a PR will be made to merge the translations into Sunshine.
142148

143149
### Testing
144150

@@ -175,8 +181,8 @@ To see all available options, run the tests with the `--help` flag.
175181
./build/tests/test_sunshine --help
176182
```
177183

178-
@tip{See the googletest [FAQ](https://google.github.io/googletest/faq.html) for more information on how to use
179-
Google Test.}
184+
> [!TIP]
185+
> See the googletest [FAQ](https://google.github.io/googletest/faq.html) for more information on how to use Google Test.
180186

181187
We use [gcovr](https://www.gcovr.com) to generate code coverage reports,
182188
and [Codecov](https://about.codecov.io) to analyze the reports for all PRs and commits.

docs/gamestream_migration.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ to a specified directory.
1313
If you are using the Moonlight Internet Hosting Tool, you can remove it from your system when you migrate to Sunshine.
1414
To stream over the Internet with Sunshine and a UPnP-capable router, enable the UPnP option in the Sunshine Web UI.
1515

16-
@note{Running Sunshine together with versions of the Moonlight Internet Hosting Tool prior to v5.6 will cause UPnP
17-
port forwarding to become unreliable. Either uninstall the tool entirely or update it to v5.6 or later.}
16+
> [!NOTE]
17+
> Running Sunshine together with versions of the Moonlight Internet Hosting Tool prior to v5.6 will cause UPnP
18+
> port forwarding to become unreliable. Either uninstall the tool entirely or update it to v5.6 or later.
1819
1920
## Limitations
2021
Sunshine does have some limitations, as compared to Nvidia GameStream.
2122

2223
* Automatic game/application list.
23-
* Changing game settings automatically, to optimize streaming.
24+
* Changing game settings automatically to optimize streaming.
2425

2526
<div class="section_buttons">
2627

0 commit comments

Comments
 (0)