Skip to content

Commit fb1856f

Browse files
Aleksandar GrbicAleksandar Grbic
authored andcommitted
Update Docusaurus configuration and enhance Mikrotik networking documentation
1 parent 7f19361 commit fb1856f

File tree

23 files changed

+112
-77
lines changed

23 files changed

+112
-77
lines changed

docusaurus/docusaurus.config.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@ import type * as Preset from "@docusaurus/preset-classic";
22
import type { Config } from "@docusaurus/types";
33
import { themes as prismThemes } from "prism-react-renderer";
44

5-
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
6-
75
const config: Config = {
86
title: "Learn K3S",
9-
tagline: "Learn K3S, the lightweight Kubernetes distribution",
7+
tagline: "Building a home mini data center using K3s, Mikrotik, and more",
108
favicon: "img/favicon.ico",
119
markdown: {
1210
mermaid: true,
@@ -47,7 +45,7 @@ const config: Config = {
4745
],
4846

4947
themeConfig: {
50-
image: "img/docusaurus-social-card.jpg",
48+
image: "img/mini-data-center-social-card.jpg",
5149
navbar: {
5250
title: "K3s.guide",
5351
logo: {

docusaurus/src/components/DataCenterOverview/index.tsx

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ const DataCenterOverview = () => (
2222
<div className="flex flex-col items-center space-y-4">
2323
<h4 className="font-semibold text-blue-400">1. Hardware Setup</h4>
2424
<DiagramBox className="w-full hover:border-blue-500">
25-
<p className="font-bold text-white !mb-2">
26-
🛠️ Physical Infrastructure
27-
</p>
25+
<p className="font-bold !mb-2">🛠️ Physical Infrastructure</p>
2826
<ul className="text-sm space-y-2 !mb-0">
2927
<li>📦 Server Rack</li>
3028
<li>🍓 Raspberry Pi Cluster</li>
@@ -38,9 +36,7 @@ const DataCenterOverview = () => (
3836
<div className="flex flex-col items-center space-y-4">
3937
<h4 className="font-semibold text-green-400">2. Network Setup</h4>
4038
<DiagramBox className="w-full hover:border-green-500">
41-
<p className="font-bold text-white !mb-2">
42-
🌐 Network Infrastructure
43-
</p>
39+
<p className="font-bold !mb-2">🌐 Network Infrastructure</p>
4440
<ul className="text-sm space-y-2 !mb-0">
4541
<li>📡 Mikrotik Router</li>
4642
<li>🔄 Managed Switch</li>
@@ -54,7 +50,7 @@ const DataCenterOverview = () => (
5450
<div className="flex flex-col items-center space-y-4">
5551
<h4 className="font-semibold text-purple-400">3. K3s Setup</h4>
5652
<DiagramBox className="w-full hover:border-purple-500">
57-
<p className="font-bold text-white !mb-2">☸️ Kubernetes Layer</p>
53+
<p className="font-bold !mb-2">☸️ Kubernetes Layer</p>
5854
<ul className="text-sm space-y-2 !mb-0">
5955
<li>🎮 Control Plane</li>
6056
<li>👷 Worker Nodes</li>
@@ -69,9 +65,7 @@ const DataCenterOverview = () => (
6965
4. Applications & Services
7066
</h4>
7167
<DiagramBox className="w-full hover:border-yellow-500">
72-
<p className="font-bold text-white !mb-2">
73-
🚀 Applications & Services
74-
</p>
68+
<p className="font-bold !mb-2">🚀 Applications & Services</p>
7569
<ul className="text-sm space-y-2 !mb-0">
7670
<li>🗄️ Databases - PostgreSQL, Redis</li>
7771
<li>🚪 Ingress - Traefik</li>

docusaurus/src/components/MikrotikNetworking/CodeBlock/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const CodeBlock = ({ code }: CodeBlockProps) => {
2020
</pre>
2121
<button
2222
onClick={handleCopy}
23-
className="absolute top-2 right-2 bg-gray-700 hover:bg-gray-600 text-white px-2 py-1 text-xs opacity-0 group-hover:opacity-100 transition-opacity"
23+
className="absolute top-2 right-2 bg-gray-700 hover:bg-gray-600 px-2 py-1 text-xs opacity-0 group-hover:opacity-100 transition-opacity"
2424
>
2525
{copied ? "Copied!" : "Copy"}
2626
</button>

docusaurus/src/components/MikrotikNetworking/CoreConcepts/index.tsx

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,12 @@ const CoreConcepts = () => (
2525
</p>
2626
<p className="mt-4">
2727
By segmenting, we assume{" "}
28-
<strong className="text-white">
29-
no device is inherently trustworthy.
30-
</strong>{" "}
31-
We build digital walls between groups of devices. Traffic can't cross
32-
these walls unless we create a specific, explicit firewall rule to
33-
allow it. This approach drastically reduces the attack surface and
34-
contains potential breaches, which is essential when self-hosting
35-
production-grade services.
28+
<strong>no device is inherently trustworthy.</strong> We build digital
29+
walls between groups of devices. Traffic can't cross these walls
30+
unless we create a specific, explicit firewall rule to allow it. This
31+
approach drastically reduces the attack surface and contains potential
32+
breaches, which is essential when self-hosting production-grade
33+
services.
3634
</p>
3735
</div>
3836

@@ -60,9 +58,8 @@ const CoreConcepts = () => (
6058
<p className="mt-4">
6159
Devices plugged into ports assigned to VLAN 10 can talk to each other
6260
at full speed, but they are fundamentally unaware that devices on VLAN
63-
20 even exist. This is called{" "}
64-
<strong className="text-white">Layer 2 Isolation.</strong> It's the
65-
most basic and powerful form of network separation, and the switch
61+
20 even exist. This is called <strong>Layer 2 Isolation.</strong> It's
62+
the most basic and powerful form of network separation, and the switch
6663
hardware (the CRS326) enforces it at wire-speed.
6764
</p>
6865
</div>
@@ -83,8 +80,8 @@ const CoreConcepts = () => (
8380
are isolated, we need a way to let <em>some</em> traffic pass between
8481
them in a controlled way. This is the job of the router (the RB3011).
8582
The "Router-on-a-Stick" (RoaS) model uses a single physical cable,
86-
configured as a <strong className="text-white">VLAN Trunk</strong>, to
87-
connect the switch to the router.
83+
configured as a <strong>VLAN Trunk</strong>, to connect the switch to
84+
the router.
8885
</p>
8986
<p className="mt-4">
9087
Every packet of data that travels over this trunk cable gets a digital
@@ -94,10 +91,8 @@ const CoreConcepts = () => (
9491
to its destination VLAN. If it is, the router stamps it with a new
9592
passport for the destination VLAN and sends it back to the switch.
9693
This process provides
97-
<strong className="text-white">
98-
centralized control and security inspection
99-
</strong>{" "}
100-
for all cross-network communication.
94+
<strong>centralized control and security inspection</strong> for all
95+
cross-network communication.
10196
</p>
10297
</div>
10398
</div>

docusaurus/src/components/MikrotikNetworking/DeviceChart/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ const DeviceChart = () => {
9999

100100
return (
101101
<div className="border border-gray-800 p-6 bg-[#1c1c1c]">
102-
<h3 className="font-bold text-xl mb-4 text-white">
103-
Device Roles & Strengths
104-
</h3>
102+
<h3 className="font-bold text-xl mb-4">Device Roles & Strengths</h3>
105103
<p className="mb-6">
106104
Each device is assigned a role that plays to its hardware strengths,
107105
ensuring optimal performance.

docusaurus/src/components/MikrotikNetworking/DeviceConfiguration/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const DeviceConfiguration = () => {
1414
<Section description="In this section, we will walk through the configuration for each device. It is best to start with a factory reset device.">
1515
<div className="border-b border-gray-800 mb-6">
1616
<nav className="-mb-px flex space-x-6 overflow-x-auto">
17-
{Object.keys(deviceConfigData).map(key => (
17+
{Object.keys(deviceConfigData).map((key) => (
1818
<button
1919
key={key}
2020
onClick={() => setActiveTab(key as keyof typeof deviceConfigData)}
@@ -32,15 +32,15 @@ const DeviceConfiguration = () => {
3232
</div>
3333
<Accordion
3434
items={activeDevice.steps}
35-
getTitle={item => item.title}
36-
renderContent={item => (
35+
getTitle={(item) => item.title}
36+
renderContent={(item) => (
3737
<>
3838
<p className="text-sm mb-4">{item.description}</p>
3939
<CodeBlock code={item.code} />
4040
</>
4141
)}
42-
stepPrefix={idx => (
43-
<span className="font-semibold text-white">Step {idx + 1}:</span>
42+
stepPrefix={(idx) => (
43+
<span className="font-semibold">Step {idx + 1}:</span>
4444
)}
4545
/>
4646
</Section>

docusaurus/src/components/MikrotikNetworking/FirewallLogic/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ const FirewallLogic = () => (
1010
>
1111
<Accordion
1212
items={firewallConfigData.steps}
13-
getTitle={item => item.title}
14-
renderContent={item => (
13+
getTitle={(item) => item.title}
14+
renderContent={(item) => (
1515
<>
1616
<p className="text-sm mb-4">{item.description}</p>
1717
<CodeBlock code={item.code} />
1818
</>
1919
)}
20-
stepPrefix={idx => (
21-
<span className="font-semibold text-white">Step {idx + 1}:</span>
20+
stepPrefix={(idx) => (
21+
<span className="font-semibold">Step {idx + 1}:</span>
2222
)}
2323
/>
2424
</Section>

docusaurus/src/components/MikrotikNetworking/NetworkOverview/index.tsx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,19 @@ const NetworkOverview = () => (
2929
<div>
3030
<div className="flex flex-col items-center space-y-4">
3131
<DiagramBox>
32-
<h3 className="font-bold text-white !mb-0">☁️ Internet</h3>
32+
<h3 className="font-bold !mb-0">☁️ Internet</h3>
3333
</DiagramBox>
3434
<div className="w-px h-8 bg-gray-700"></div>
3535
<DiagramBox>
36-
<h3 className="font-bold text-white !mb-0">
37-
RB3011 Router (The Brain)
38-
</h3>
36+
<h3 className="font-bold !mb-0">RB3011 Router (The Brain)</h3>
3937
<p className="text-sm !mb-0">Inter-VLAN Routing & Firewall</p>
4038
</DiagramBox>
4139
<div className="w-full text-center text-sm font-semibold text-[#ffab00]">
4240
VLAN Trunk (Single Cable)
4341
<div className="w-px h-8 bg-[#ffab00]/50 mx-auto border-l-2 border-dashed border-[#ffab00]/50"></div>
4442
</div>
4543
<DiagramBox>
46-
<h3 className="font-bold text-white !mb-0">
47-
CRS326 Switch (The Muscle)
48-
</h3>
44+
<h3 className="font-bold !mb-0">CRS326 Switch (The Muscle)</h3>
4945
<p className="text-sm !mb-0">High-Speed Layer 2 Switching</p>
5046
</DiagramBox>
5147
<div className="w-full h-px bg-gray-800 my-4"></div>
@@ -56,7 +52,7 @@ const NetworkOverview = () => (
5652
</h4>
5753
<div className="w-px h-4 bg-red-700"></div>
5854
<DiagramBox className="w-full hover:border-red-500">
59-
<p className="font-bold text-white !mb-0">K3S Nodes</p>
55+
<p className="font-bold !mb-0">K3S Nodes</p>
6056
<p className="text-sm !mb-0">(RPis, Mini PCs)</p>
6157
</DiagramBox>
6258
</div>
@@ -66,7 +62,7 @@ const NetworkOverview = () => (
6662
</h4>
6763
<div className="w-px h-4 bg-blue-700"></div>
6864
<DiagramBox className="w-full hover:border-blue-500">
69-
<p className="font-bold text-white !mb-0">PCs & Laptops</p>
65+
<p className="font-bold !mb-0">PCs & Laptops</p>
7066
<p className="text-sm !mb-0">(Wired)</p>
7167
</DiagramBox>
7268
</div>
@@ -76,7 +72,7 @@ const NetworkOverview = () => (
7672
</h4>
7773
<div className="w-px h-4 bg-orange-700"></div>
7874
<DiagramBox className="w-full hover:border-orange-500">
79-
<h3 className="font-bold text-white !mb-0">RB2011 AP</h3>
75+
<h3 className="font-bold !mb-0">RB2011 AP</h3>
8076
<p className="text-sm text-blue-400 !mb-0">
8177
SSID: Home (VLAN 10)
8278
</p>

docusaurus/src/components/MikrotikNetworking/Scenarios/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ const Scenarios = () => (
1010
>
1111
<Accordion
1212
items={scenariosConfigData.steps}
13-
getTitle={item => item.title}
14-
renderContent={item => (
13+
getTitle={(item) => item.title}
14+
renderContent={(item) => (
1515
<>
1616
<p className="text-sm mb-4">{item.description}</p>
1717
<CodeBlock code={item.code} />
1818
</>
1919
)}
20-
stepPrefix={idx => (
21-
<span className="font-semibold text-white">Step {idx + 1}:</span>
20+
stepPrefix={(idx) => (
21+
<span className="font-semibold">Step {idx + 1}:</span>
2222
)}
2323
/>
2424
</Section>

docusaurus/src/components/MikrotikNetworking/Section/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const Section = ({ title, description, children }: SectionProps) => (
1010
<div className="mb-12" id={title?.toLowerCase().replace(/[^a-z0-9]/g, "-")}>
1111
{" "}
1212
{/* anchor for sidebar links */}
13-
{title && <h2 className="text-3xl font-bold text-white mb-2">{title}</h2>}
13+
{title && <h2 className="text-3xl font-bold mb-2">{title}</h2>}
1414
{description && <p className="mb-8">{description}</p>}
1515
{children}
1616
</div>

0 commit comments

Comments
 (0)