Skip to content

Commit 69ecfb1

Browse files
Merge pull request #52 from Free60Project/fix/strict_mkdocs
Stricter mkdocs, Docker deployment, CI separation, README additions
2 parents 0a88d9c + b0d074d commit 69ecfb1

File tree

148 files changed

+743
-823
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+743
-823
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
name: Build and Deploy
2-
on:
3-
push:
4-
branches:
5-
- master
1+
name: Build site
2+
on: [push, pull_request]
63

74
jobs:
85
build:
96
runs-on: ubuntu-latest
107
steps:
11-
- name: Checkout master
12-
uses: actions/checkout@v2.4.0
13-
- name: Deploy MkDocs
14-
uses: mhausenblas/mkdocs-deploy-gh-pages@master
15-
env:
16-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8+
- uses: actions/checkout@v3
9+
with:
10+
fetch-depth: 0
11+
- name: Install python
12+
uses: actions/setup-python@v5
13+
with:
14+
python-version: 3.x
15+
- name: Install deps
16+
run: pip install -U -r requirements.txt
17+
- name: Build
18+
run: mkdocs build --strict

.github/workflows/deploy.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy Website
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: true
18+
19+
jobs:
20+
deploy:
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
- uses: actions/setup-python@v5
30+
with:
31+
python-version: 3.x
32+
- run: pip install -U -r requirements.txt
33+
- run: mkdocs build --strict
34+
- uses: actions/upload-pages-artifact@v3
35+
with:
36+
path: 'site'
37+
- id: deployment
38+
if: github.ref_name == 'master'
39+
uses: actions/deploy-pages@v4

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM python:3.11-alpine
2+
3+
RUN apk add git
4+
5+
WORKDIR /wiki
6+
COPY requirements.txt .
7+
RUN pip install -U -r requirements.txt
8+
9+
# Force /wiki directory to be considered safe for git
10+
RUN git config --global --add safe.directory /wiki
11+
12+
RUN echo $'#!/bin/sh\n\
13+
cd /wiki\n\
14+
mkdocs serve -a $(hostname -i):8000 --strict' > /docker-entrypoint.sh
15+
16+
RUN chmod +x /docker-entrypoint.sh
17+
18+
ENTRYPOINT ["/docker-entrypoint.sh"]

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
build: ## Build docs locally
2-
mkdocs build --clean
2+
mkdocs build --strict --clean
33

44
serve: ## Serve live version of your docs
5-
mkdocs serve
5+
mkdocs serve --strict
66

77
all: build

README.md

Lines changed: 47 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Contributions are very welcome. Here's how you can help:
1616
- Correct spelling / grammar
1717
- Fix links
1818

19-
### Workflow
19+
## Workflow
2020

2121
1. __Fork__ this repo
2222
1. Make changes
@@ -26,6 +26,7 @@ Contributions are very welcome. Here's how you can help:
2626
### Step by step instructions
2727

2828
**NOTE**: The following instructions are targeted towards Unix OS' - needed steps on windows may vary.
29+
2930
**NOTE 2**: You need python3 and python3-venv installed. Please look at your OS' package manager to find the correct packages.
3031

3132
1. At first: Fork the repository to your account!
@@ -42,41 +43,22 @@ or
4243
git clone https://github.com/<username>/wiki.git
4344
```
4445

45-
3. Prepare your python virtual environment and dependencies
46+
3. Navigate into wiki repository folder
4647

4748
```sh
48-
# Navigate to the cloned repo
4949
cd wiki/
50-
51-
# Create a python3 virtual environment in your cloned repository
52-
python -m venv venv
53-
54-
# Activate the virtual environment
55-
source venv/bin/activate
5650
```
5751

58-
4. Install needed python dependencies using python package manager -> pip
52+
4. Choose one of the two deployment methods below.
5953

6054
```sh
6155
pip install mkdocs mkdocs-material mkdocs-redirects
6256
```
6357

64-
5. At this point, load up the clone repository in a text editor that has live-markdown preview function.
58+
5. At this point, load up the cloned repository in a text editor that has live-markdown preview function.
6559
- For example: Visual Studio Code. Instructions: (https://code.visualstudio.com/Docs/languages/markdown)
6660

67-
6. When you are done, use the following steps to build & preview the documentation / changes locally.
68-
69-
Build the documentation
70-
```sh
71-
make build
72-
```
73-
74-
Serve the documentation
75-
```sh
76-
make serve
77-
```
78-
79-
7. Once you are happy and the added changes are looking proper, you are ready to submit your work.
61+
6. Once you are happy and the added changes are looking proper, you are ready to submit your work.
8062

8163
Add modified files for commiting
8264
```sh
@@ -100,3 +82,44 @@ git push
10082
```
10183

10284
8. Send a Pull Request :)
85+
86+
## Deployment / Usage of mkdocs
87+
88+
### Native deployment
89+
90+
1. Create & activate python virtual-environment (might need dependency `python3-venv`, see: <https://docs.python.org/3/library/venv.html>)
91+
92+
```
93+
python3 -m venv venv
94+
source venv/bin/activate
95+
```
96+
97+
2. Install mkdocs and dependencies
98+
99+
```
100+
pip install -r requirements.txt
101+
```
102+
103+
3. Edit docs and verify with the following commands:
104+
105+
Serve the documentation (<http://127.0.0.1:8000>)
106+
```
107+
mkdocs serve --strict
108+
```
109+
110+
Build the documentation
111+
```
112+
mkdocs build --strict
113+
```
114+
115+
### Docker deployment
116+
117+
1. Execute docker container:
118+
119+
```
120+
docker compose up
121+
```
122+
123+
2. Navigate to <http://127.0.0.1:8000>
124+
3. Make your changes and verify the formatting / linking still checks out.
125+

docker-compose.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: "3"
2+
3+
services:
4+
wiki:
5+
build:
6+
context: .
7+
ports:
8+
- "127.0.0.1:8000:8000"
9+
volumes:
10+
- ./:/wiki

docs/!Pages_That_Need_Updates.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
Some pages need edits to remain useful or become more beautiful.
44

5-
- [STFS](/System-Software/Formats/STFS) needs the base sequence written up
5+
- [STFS](./System-Software/Formats/STFS.md) needs the base sequence written up
66
- halotroop2288 is working on this!
77
- https://github.com/halotroop2288/kaitai_struct_formats/blob/pr/xbox/filesystem/stfs.ksy
8-
- [XCP](/System-Software/Formats/XCP) needs a full file format spec written up for it.
8+
- [XCP](./System-Software/Formats/XCP.md) needs a full file format spec written up for it.
99
- halotroop2288 is working on this!
1010
- https://gitlab.com/0x8081/libxcp/-/blob/main/src/xcp.h
1111
- https://gitlab.com/0x8081/libxcp/-/blob/main/src/xcp.c
12-
- [XConfig](/System-Software/Formats/XConfig)'s spec (Notes section) should be converted to a markdown table.
12+
- [XConfig](./System-Software/XConfig.md)'s spec (Notes section) should be converted to a markdown table.

docs/!Pages_with_missing_images.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Pages with missing images
22

3-
- [DVD Drive](Hardware/Console/DVD_Drive)
4-
- [NAND](Hardware/Console/NAND) "Atmel2.jpg"
5-
- [Wifi Adapter](Hardware/Accessories/Wifi_Adapter.md)
3+
- [DVD Drive](./Hardware/Console/DVD_Drive.md)
4+
- [NAND](./Hardware/Console/NAND/index.md) "Atmel2.jpg"
5+
- [Wifi Adapter](./Hardware/Accessories/Wifi_Adapter.md)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Category: Template documentation
22

3-
[Old Main Page](/Old_Main_Page)
3+
[Old Main Page](./Old_Main_Page.md)
44

5-
[Other OS Loader](/Other_OS_Loader)
5+
[Other OS Loader](./Other_OS_Loader.md)

docs/Development/Cross_Compiler.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Cross Compiler
22

3-
The Xbox 360 [CPU](../Xenon_(CPU)) is based on IBM's Power
3+
The Xbox 360 [CPU](../Hardware/Console/Xenon_(CPU).md) is based on IBM's Power
44
Architecture. Unless you have a machine with PowerPC CPU and Linux
55
running (such as an older Mac or a PS3), you need to set up a cross
6-
compiler toolchain in order to compile code like the [Linux Kernel](../Linux_Kernel)
6+
compiler toolchain in order to compile code like the [Linux Kernel](../Linux/Linux_Kernel.md)
77
for your Xbox 360.
88

99
A typical cross compiler toolchain for the GNU compiler collection
@@ -21,7 +21,7 @@ well.
2121

2222
## Using the Xenon Toolchain
2323

24-
The easiest way to set up a complete cross compiler toolchain is the [Xenon Toolchain](../Xenon_Toolchain).
24+
The easiest way to set up a complete cross compiler toolchain is the [Xenon Toolchain](./Xenon_Toolchain.md).
2525
Its using current gcc and does not take as long as crossotool to compile.
2626

2727

@@ -70,7 +70,7 @@ cd crosstool-0.43/
7070
./demo-powerpc-970.sh
7171
```
7272

73-
4. **Get a drink**, go for a walk or use the time to remove the resistor [R6T3](../R6T3)
73+
4. **Get a drink**, go for a walk or use the time to remove the resistor [R6T3](../Hardware/R6T3.md)
7474
from the mainboard of your Xbox 360... Compilation of your cross compiler will just take a while.
7575

7676
5. **When finished**, you may want to add your cross compiler binaries to your PATH environment
@@ -80,6 +80,6 @@ variable.
8080
export PATH=$PATH:/opt/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc64-unknown-linux-gnu/bin
8181
```
8282

83-
You're done. Feel free to configure and compile your [Linux Kernel](../Linux_Kernel).
83+
You're done. Feel free to configure and compile your [Linux Kernel](../Linux/Linux_Kernel.md).
84+
8485

85-
[Category: Development](/Development)

0 commit comments

Comments
 (0)