Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Replace Gitpod by Codespace on docs/main branch #2703

Merged
merged 6 commits into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// 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": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bookworm",

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

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

"waitFor": "onCreateCommand",
"updateContentCommand": "pip3 install --user -r requirements.txt",

"postAttachCommand": {
"server": "mkdocs serve"
},

"portsAttributes": {
"8000": {
"label": "Doc",
"onAutoForward": "openPreview"
}
},

"customizations": {
"vscode": {
"extensions": [
"ms-python.python"
]
}
}
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
2 changes: 1 addition & 1 deletion .github/workflows/lint-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: DavidAnson/markdownlint-cli2-action@v6
- uses: DavidAnson/markdownlint-cli2-action@v14
with:
globs: 'docs/**/*.md'
12 changes: 0 additions & 12 deletions .gitpod.yml

This file was deleted.

15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
# IoT Hub Portal Documentation

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/CGI-FR/IoT-Hub-Portal/tree/docs/main)

## Quick start

> The documentation of IoT Hub Portal is based on [https://squidfunk.github.io/mkdocs-material](mkdocs-material).

## Configure dev environment

To install mkdocs-material and required dependencies, you have to run the following command at the root of the project:

```console
pip install -r requirements.txt
```
To contribute to IoT Hub Portal's documentation:

After the installation python dependencies, your can start a local review of documentation site by the following command at the root of the project:
- Solution 1: Open this branch on Codespace
- Solutuion 2: Open this branch on a devcontainer using VS Code.

```console
mkdocs serve
```
On both solutions, a pre-configured development environment will be built, and the documentation website will be run and opened on an embedded browser.
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ markdown_extensions:
- pymdownx.caret
- pymdownx.details
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg
- pymdownx.highlight:
anchor_linenums: true
linenums: true
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
mkdocs-material==9.0.6
mike==1.1.2
mkdocs-macros-plugin==0.7.0
mkdocs-swagger-ui-tag==0.4.0
mkdocs-material==9.5.2
mike==2.0.0
mkdocs-macros-plugin==1.0.4
mkdocs-swagger-ui-tag==0.6.7
Loading