Skip to content

Commit a8af2fe

Browse files
committed
2 parents 485edf0 + 13265f3 commit a8af2fe

File tree

16 files changed

+430
-0
lines changed

16 files changed

+430
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy Docs
2+
on:
3+
push:
4+
branches: ["main"]
5+
workflow_dispatch:
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Python
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: '3.11'
23+
24+
- name: Install dependencies
25+
run: |
26+
pip install mkdocs-material
27+
pip install mkdocs-awesome-pages-plugin
28+
29+
- name: Build
30+
run: mkdocs build -f docs/mkdocs.yaml --strict
31+
32+
- name: Upload artifact
33+
uses: actions/upload-pages-artifact@v3
34+
with:
35+
path: 'docs/site'
36+
37+
deploy:
38+
needs: build
39+
runs-on: ubuntu-latest
40+
environment:
41+
name: github-pages
42+
url: ${{ steps.deployment.outputs.page_url }}
43+
steps:
44+
- name: Deploy to GitHub Pages
45+
id: deployment
46+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
!mods/panorama/
99
!panoramas/
1010
!scripts/
11+
!docs/
12+
!.github/
13+
1114

1215
# Add files in main directory
1316
!.gitattributes

docs/CONTRIBUTING.md

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# Contributor Info / Styleguide
2+
3+
For consistency, please follow the following styleguide when submitting PRs.
4+
This page is directly lifted from [GregTech Modern] (https://github.com/GregTechCEu/GregTech-Modern)
5+
6+
7+
## Filenames & Basic Page Structure
8+
9+
The file structure and basic page layout must follow these conventions:
10+
11+
- For each section, create a directory with a short, descriptive name in `Title Case`.
12+
- File names should only contain `A-Z`, `a-z`, `0-9`, `-` and `_` (no spaces).
13+
- Directory names must use dashes (`-`) instead of spaces.
14+
- If you want to add a short description of what a section is about, include an `index.md` in its directory.
15+
- Every page of the docs must include a Markdown front matter block, containing _at least_ its title, followed by
16+
two empty lines.
17+
- Every page must start with a level-1 heading. No other level-1 headings may be added.
18+
19+
Note that the page name/title must be as short and descriptive as possible, as it's displayed in the navigation area.
20+
You can, however, choose a longer version for the page _header_:
21+
22+
```markdown
23+
---
24+
title: My Page Name
25+
---
26+
27+
28+
# This is my Custom Page Header!
29+
30+
Page content here...
31+
```
32+
33+
Contrary to filenames, both the title and header are **not** limited to specific characters.
34+
35+
36+
## Empty Lines
37+
38+
Please consider the following conventions for empty lines:
39+
40+
- At least two empty lines before each heading
41+
- Exactly one line after each heading
42+
- Separate each "element" of a page by an empty line inbetween
43+
(code blocks, lists, [admonitions](https://squidfunk.github.io/mkdocs-material/reference/admonitions/), etc.)
44+
45+
46+
## Formatting
47+
48+
Please use the following formatting rules for standard markdown:
49+
50+
- Use double asterisks for bold text (`**bold**`) and underscores for italics (`_italics_`)
51+
- Each code block must include a language whenever possible, so that syntax highlighting is applied correctly
52+
53+
54+
## Index Pages
55+
56+
Only use index pages for a short description of what the current section is about.
57+
58+
Do not include any important documentation on index pages!
59+
You may link to certain relevant pages (either inside the current section, or in other sections) though.
60+
61+
62+
## Admonitions
63+
64+
Use [admonitions](https://squidfunk.github.io/mkdocs-material/reference/admonitions/) in the following situations:
65+
66+
- If you want to provide potentially useful, additional info about a feature, use an `info` admonition.
67+
- For "see also" references, use an `info inline end` admonition.
68+
- For tips / recommendations on _when_ or _how_ to use a feature, use he `tip` admonition type.
69+
- For general notes on _when_ or _how_ to use a specific feature (in development related docs), use the `note` type.
70+
- For warning about possible bugs or unwanted behavior, use the `warning` type.
71+
- If a feature may result in destructive actions in certain scenarios, use the `danger` type.
72+
- For providing code examples, use the `example` type.
73+
- **Always** provide a title for code examples, even if it's simply "Example usage".
74+
- Use collapsible blocks (`??? example "my example title"` instead of `!!!`) for code examples where possible.
75+
_In some situations this might not be as useful as using a non-collapsible block. Just fall back to `!!!` in these cases._
76+
- For pages or sections that are not documented yet, use `!!! failure "Not yet documented"`
77+
- For links, use the (custom) `link` type.
78+
79+
We suggest adding an empty line after the title for consistency, like in the following example.
80+
It is **strongly recommended** to include a custom, descriptive title for your admonition, if possible.
81+
82+
83+
```markdown
84+
!!! note "My descriptive title"
85+
86+
This is my note's content
87+
```
88+
89+
90+
### Admonitions for experimental or not-yet-merged features
91+
92+
If a feature is either not yet merged or simply not stable yet, please add a title-only `warning inline end` before its
93+
description, as shown below.
94+
95+
For additional info (e.g. which branch the feature is currently in), add a `<br>` tag in the title, followed by the
96+
additional info in italics.
97+
If your additional information needs to be more detailed than that, consider using a collapsible admonition instead.
98+
99+
```markdown
100+
!!! warning inline end "Not merged yet.<br>_Branch: `my-branch-name`_"
101+
102+
Paragraph containing the feature's description...
103+
```
104+
105+
Here are some good examples you could use as the first line of your warning:
106+
107+
- Experimental
108+
- Unstable
109+
- Not yet implemented
110+
- Not merged yet
111+
112+
113+
## Annotations
114+
115+
Use [annotations](https://squidfunk.github.io/mkdocs-material/reference/annotations/) in the following situations:
116+
117+
- Explanatory comments in code examples (preferred over including these as an actual comment)
118+
- Additional explanations to a specific aspect of your documented feature
119+
- An explanation for a technical term used in your documentation
120+
121+
There must be an empty line before the first annotation or they won't work properly.
122+
123+
Also add an empty line between each annotation if at least one in the current block is longer than a single line.
124+
In that case, add two empty lines after the end of the annotation list.
125+
126+
Annotations must be numbered starting at 1 **for each block** of consecutive annotations.
127+
If they are separated by another element, you need to start at 1 again for the next block of annotations:
128+
129+
130+
~~~markdown
131+
```java
132+
someVar.someMethod(); // (1)
133+
return someVar; // (2)
134+
```
135+
136+
1. annotation 1 for the first code block
137+
2. annotation 2 for the first code block
138+
139+
140+
```java
141+
someVar.anotherMethod(); // (1)
142+
```
143+
144+
1. annotation 1 for the second code block
145+
~~~

docs/README.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# AstroGregExsilium Documentation
2+
3+
This documentation project is built using [MkDocs](https://www.mkdocs.org/#).
4+
This page is directly lifted from [GregTech Modern] (https://github.com/GregTechCEu/GregTech-Modern)
5+
For an automatically updating live preview in your browser, run `mkdocs serve`
6+
7+
## Contributing
8+
9+
When contributing to this project, please refer to the [Styleguide](./CONTRIBUTING.md).
10+
This helps us in keeping the documentation consistent.
11+
You will also find examples of when to use specific features of `mkdoc` and `mkdocs-material`.
12+
13+
## Quickstart Guide
14+
If you want to contribute to the docs without setting up a dedicated code environment, you can go to the `<> Code` button on the main page of the repository.
15+
16+
![image](https://github.com/user-attachments/assets/27458f12-15af-475e-9e79-f45b890d4707)
17+
18+
Then, click `Codespaces` and create a new codespace on `1.20.1`
19+
20+
![image](https://github.com/user-attachments/assets/42b23f92-5277-4825-8a61-a44855f4e33c)
21+
22+
From there, you'll be taken to a VSCode instance in your browser, where you can edit any of the docs files in `/content`.
23+
If you want to preview your changes, just run `mkdocs serve` and click the link it gives you.
24+
25+
Once you're happy, commit these changes and make a pull request for us to review using the `Source Control` tab on the left. This will automatically create a fork of our repository for you.
26+
27+
If you come back to work on the docs, you can use a codespace again. You might need to `pull` to bring your codespace up to date, which you can do by pressing this button in the `Source Control` tab.
28+
29+
![image](https://github.com/user-attachments/assets/7d1246d2-f091-4452-bdb3-edf221902503)
30+
31+
## Running in Gradle
32+
33+
To run mkdocs locally, run the mkdocsServe task in gradle.
34+
35+
Either in the gradle sidebar, click documentation/mkdocsServe, or run .`/gradlew mkdocsServe`.
36+
37+
Click on the link it gives you at the bottom to open the local copy, and pages will automatically update with content as you save your files.
38+
39+
You can also run documentation/mkdocsBuild. This will build the documentation in `docs/site`, which you can either host yourself or just open in a browser.
40+
41+
## Installing Required Dependencies & Run Locally
42+
43+
If you want to manually install and go through the steps to run locally, you can follow the steps below.
44+
45+
Please run all commands from this section inside the `docs` folder!
46+
47+
**First, setup a venv for python:**
48+
49+
```bash
50+
python -m venv .venv
51+
```
52+
or:
53+
```bash
54+
python3 -m venv .venv
55+
```
56+
57+
**Now activate the venv:**
58+
59+
Windows:
60+
```cmd
61+
.venv\Scripts\activate
62+
```
63+
Linux / MacOS:
64+
```bash
65+
source .venv/bin/activate
66+
```
67+
68+
**Install the required dependencies:**
69+
```bash
70+
pip install -r requirements.txt
71+
```
72+
73+
**Run locally**:
74+
```bash
75+
mkdocs serve
76+
```
77+
78+
## MkDocs Plugins
79+
80+
The following plugins for MkDocs are being used:
81+
- https://squidfunk.github.io/mkdocs-material/
82+
- https://github.com/lukasgeiter/mkdocs-awesome-pages-plugin
83+
84+
When working on the docs locally, the plain `mkdocs` commands should be used to view the changes made to the version of the docs you are currently working on, like the previously mentioned `mkdocs serve`.

docs/content/.pages

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
nav:
2+
- 'Home': 'index.md'
3+
- 'Gameplay'
4+
- 'Development'

docs/content/Development.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Developer Documentation
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Development

docs/content/Gameplay.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Gameplay Overview
2+
3+
Welcome to the core of **AstroGregExsilium**. This guide covers the primary changes and additions to the GregTech ecosystem.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Machines
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Progression
2+

0 commit comments

Comments
 (0)