Skip to content

Commit 8bf9e19

Browse files
committed
Refactor Arch page to Markdown, add dev resources
Replaces the Arch Linux installation guide from an Astro file to Markdown for consistency. Adds a new developer resources section with guides for Windows and macOS, updates layouts to support navigation, and links to developer resources from the home page.
1 parent 29e7d1a commit 8bf9e19

File tree

8 files changed

+193
-49
lines changed

8 files changed

+193
-49
lines changed

pages/src/layouts/Layout.astro

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ const { BASE_URL } = import.meta.env;
6666

6767
background-color: var(--color-white-box-bg);
6868
}
69+
70+
.astro-code {
71+
padding: 10px;
72+
}
6973
</style>
7074

7175
<style>

pages/src/layouts/MarkdownLayout.astro

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
import { joinURL } from "ufo";
3+
24
import Layout from './Layout.astro';
35
46
interface Props {
@@ -9,11 +11,14 @@ interface Props {
911
};
1012
}
1113
14+
const { BASE_URL } = import.meta.env;
1215
const { lang, title, description } = Astro.props.frontmatter;
1316
---
1417

1518
<Layout lang={lang} title={title} description={description}>
1619
<main class="white-box">
1720
<slot />
21+
22+
<p><a href={joinURL(BASE_URL, "/")}>Back to the top page</a></p>
1823
</main>
1924
</Layout>

pages/src/pages/arch.astro

Lines changed: 0 additions & 49 deletions
This file was deleted.

pages/src/pages/arch.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
layout: ../layouts/MarkdownLayout.astro
3+
lang: en
4+
title: How to use OBS Background Removal on Arch Linux
5+
description: How to use OBS Background Removal on Arch Linux
6+
---
7+
8+
# Download and Install on Arch Linux
9+
10+
You can install OBS Background Removal from the AUR.
11+
12+
```sh
13+
git clone https://aur.archlinux.org/obs-backgroundremoval.git
14+
cd obs-backgroundremoval
15+
makepkg -si
16+
```
17+
18+
You can also install the git version:
19+
20+
```sh
21+
git clone https://aur.archlinux.org/obs-backgroundremoval-git.git
22+
cd obs-backgroundremoval-git
23+
makepkg -si
24+
```
25+
26+
Or use any AUR helper, like yay:
27+
28+
```sh
29+
yay -S obs-backgroundremoval
30+
```
31+
32+
All set!

pages/src/pages/dev/index.astro

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
import { joinURL } from "ufo";
3+
4+
import Layout from "../../layouts/Layout.astro";
5+
6+
const { BASE_URL } = import.meta.env;
7+
---
8+
9+
<Layout
10+
lang="en"
11+
title="Developer resources for OBS Background Removal"
12+
description="Developer resources for OBS Background Removal"
13+
>
14+
<main class="white-box">
15+
<h1>Developer resources for OBS Background Removal</h1>
16+
17+
<ul>
18+
<li><a href={joinURL(BASE_URL, "dev/windows/")}>Development guide on Windows</a></li>
19+
<li><a href={joinURL(BASE_URL, "dev/macos/")}>Development guide on macOS</a></li>
20+
<li><a href={joinURL(BASE_URL, "dev/ubuntu/")}>Development guide on Ubuntu</a></li>
21+
</ul>
22+
</main>
23+
</Layout>

pages/src/pages/dev/macos.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
---
2+
layout: ../../layouts/MarkdownLayout.astro
3+
lang: en
4+
title: How to develop OBS Background Removal on macOS
5+
description: How to develop OBS Background Removal on macOS
6+
---
7+
# Step-by-Step Guide: Developing OBS Background Removal on macOS
8+
9+
Welcome! This guide will walk you through setting up your development environment for OBS Background Removal on macOS.
10+
11+
---
12+
13+
## 1. Install Xcode 16.4
14+
15+
You must use Xcode 16.4 (the App Store version will not work).
16+
Download it from [Apple Developer Downloads](https://developer.apple.com/download/applications/) (Apple ID required, Developer Program not needed):
17+
18+
```sh
19+
export DEVELOPER_DIR=/Applications/Xcode_16.4.0.app
20+
```
21+
22+
---
23+
24+
## 2. Install System Dependencies
25+
26+
Install [Homebrew](https://brew.sh/) if you haven't already.
27+
Then, install CMake:
28+
29+
```sh
30+
brew install cmake
31+
```
32+
33+
---
34+
35+
## 3. Clone the Source Code
36+
37+
Get the latest code from GitHub:
38+
39+
```sh
40+
git clone https://github.com/royshil/obs-backgroundremoval.git
41+
cd obs-backgroundremoval
42+
```
43+
44+
---
45+
46+
## 4. Set Up vcpkg
47+
48+
Install vcpkg to manage dependencies:
49+
50+
```sh
51+
git clone https://github.com/microsoft/vcpkg.git ~/vcpkg
52+
~/vcpkg/bootstrap-vcpkg.sh
53+
export VCPKG_ROOT=~/vcpkg
54+
```
55+
56+
---
57+
58+
## 5. Install Build Dependencies
59+
60+
This step may take 10–20 minutes:
61+
62+
```sh
63+
./.github/scripts/install-vcpkg-macos.bash
64+
```
65+
66+
---
67+
68+
## 6. Download ONNX Runtime
69+
70+
Use CMake to download ONNX Runtime:
71+
72+
```sh
73+
cmake -P cmake/DownloadOnnxruntime.cmake
74+
```
75+
76+
---
77+
78+
## 7. Configure and Build the Project
79+
80+
Configure using the CI preset:
81+
82+
```sh
83+
cmake --preset macos-ci
84+
```
85+
86+
Build using the CI preset:
87+
88+
```sh
89+
cmake --build --preset macos-ci
90+
```
91+
92+
---
93+
94+
## 8. Test the Plugin with System OBS
95+
96+
Install the plugin locally:
97+
98+
```sh
99+
cp -r build_macos/RelWithDebInfo/obs-backgroundremoval.plugin ~/Library/Application\ Support/obs-studio/plugins
100+
```
101+
102+
---
103+
104+
## 9. Lint Your Code
105+
106+
Install the required tools and run linters:
107+
108+
```sh
109+
brew install obsproject/tools/clang-format@19 obsproject/tools/gersemi
110+
./build-aux/run-clang-format
111+
./build-aux/run-gersemi
112+
```
113+
114+
---
115+
116+
You're all set! Happy coding!

pages/src/pages/dev/windows.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
layout: ../../layouts/MarkdownLayout.astro
3+
lang: en
4+
title: How to develop OBS Background Removal on Windows
5+
description: How to develop OBS Background Removal on Windows
6+
---
7+
# Step-by-Step Guide: Developing OBS Background Removal on Windows
8+
9+
TBD

pages/src/pages/index.astro

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ const { BASE_URL } = import.meta.env;
5151
on usage in OBS
5252
</p>
5353

54+
<p>
55+
<a href={joinURL(BASE_URL, "dev/")}>Developer resources</a>
56+
</p>
57+
5458
<p>
5559
<a
5660
href="https://github.com/royshil/obs-backgroundremoval"

0 commit comments

Comments
 (0)