Skip to content

Commit

Permalink
Adds codespaces to repo for easy docs contribution (#2590)
Browse files Browse the repository at this point in the history
  • Loading branch information
krossgg authored Dec 19, 2024
1 parent cd19a78 commit 8899ada
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 20 deletions.
47 changes: 47 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Docs Codespace",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"workspaceMount": "source=${localWorkspaceFolder},target=/modern,type=bind",
"workspaceFolder": "/modern/docs",
"features": {
"ghcr.io/devcontainers/features/python:1": {
"installTools": true,
"version": "3.11"
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [8000],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip3 install --user -r requirements.txt",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"settings": {
"yaml.schemas": {
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml"
},
"yaml.customTags": [
"!ENV scalar",
"!ENV sequence",
"tag:yaml.org,2002:python/name:material.extensions.emoji.to_svg",
"tag:yaml.org,2002:python/name:material.extensions.emoji.twemoji",
"tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format"
],
"git.openRepositoryInParentFolders": "always",
"git.autofetch": "all",
"git.autoStash": true
},
"extensions": ["redhat.vscode-yaml"]
}
}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<a href="https://github.com/GregTechCEu/GregTech-Modern/releases"><img src="https://img.shields.io/github/downloads/GregTechCEu/GregTech-Modern/total?sort=semver&logo=github&label=&style=for-the-badge&color=2d2d2d&labelColor=545454&logoColor=FFFFFF" alt="GitHub"></a>
</h1>

### [Wiki](https://gregtechceu.github.io/gtceu-modern-docs/)
### [Wiki](https://gregtechceu.github.io/GregTech-Modern/)

## Developers

Expand Down
7 changes: 0 additions & 7 deletions RELEASE.md

This file was deleted.

37 changes: 25 additions & 12 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,37 @@
# GregTech CEu Modern Documentation

This documentation project is built using [MkDocs](https://www.mkdocs.org/#).
# GregTech Modern Documentation

This documentation project is built using [MkDocs](https://www.mkdocs.org/#).
For an automatically updating live preview in your browser, run `mkdocs serve`

## Contributing

When contributing to this project, please refer to the [Styleguide](./CONTRIBUTING.md).
This helps us in keeping the documentation consistent.
You will also find examples of when to use specific features of `mkdoc` and `mkdocs-material`.

## Quickstart Guide
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.

![image](https://github.com/user-attachments/assets/27458f12-15af-475e-9e79-f45b890d4707)

Then, click `Codespaces` and create a new codespace on `1.20.1`

![image](https://github.com/user-attachments/assets/42b23f92-5277-4825-8a61-a44855f4e33c)

From there, you'll be taken to a VSCode instance in your browser, where you can edit any of the docs files in `/content`.
If you want to preview your changes, just run `mkdocs serve` and click the link it gives you.

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.

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.

![image](https://github.com/user-attachments/assets/7d1246d2-f091-4452-bdb3-edf221902503)
## Installing Required Dependencies

To install the required dependencies, please run `pip install -r requirements.txt`


## Used MkDocs Plugins
## MkDocs Plugins

The following plugins for MkDocs are being used:

- https://squidfunk.github.io/mkdocs-material/
- https://github.com/lukasgeiter/mkdocs-awesome-pages-plugin

## Contributing

When contributing to this project, please refer to the [Styleguide](./CONTRIBUTING.md).
I know it's kinda long, but it will help in keeping the documentation consistent. You will also find examples of
when to use specific features of mkdocs and mkdocs-material.

0 comments on commit 8899ada

Please sign in to comment.