diff --git a/docs/general/development.md b/docs/general/development.md index d8637819c..23c874b4b 100644 --- a/docs/general/development.md +++ b/docs/general/development.md @@ -85,4 +85,16 @@ There are 3 levels to add functionality: * **Standard ESP32-Sveltekit code**, e.g. Connections, Wifi and System. MoonBase files is also made using standard sveltekit as example but contains a few components used in MoonLight modules. Might be rewriteen as MoonLight Module in the future. * [MoonLight Modules](https://moonmodules.org/MoonLight/moonbase/modules/) e.g. Light Control, Editor, Info, Channel View. They are subclasses of Modules.h/cpp and implement setupDefinition, onUpdate and optional loop. New modules need to be defined in main.cpp and added to menu.svelte. All further UI is generated by Module.svelte. -* **MoonLight Nodes**: the easiest and recommended way. See Effects.h, Layouts.h, Modifiers.h and Mods.h for examples. They match closest WLED usermods. Each node has controls, a setup and a loop and can be switched on and off. For specific purposes hasLayout and hasModifier can be set. \ No newline at end of file +* **MoonLight Nodes**: the easiest and recommended way. See Effects.h, Layouts.h, Modifiers.h and Mods.h for examples. They match closest WLED usermods. Each node has controls, a setup and a loop and can be switched on and off. For specific purposes hasLayout and hasModifier can be set. + +### Adding a Board Definition + +Before starting, ensure you have the datasheet of your particular chip and board confirmed available. Many modules have near-identical markings that can hide varying hardware. + +There are 3 files to consider when making a board definition. + + boards/BOARD_NAME.csv + boards/BOARD_NAME.JSON + variants/BOARD_NAME.ini + +🚧 \ No newline at end of file diff --git a/docs/general/documentation.md b/docs/general/documentation.md new file mode 100644 index 000000000..1ff5fc628 --- /dev/null +++ b/docs/general/documentation.md @@ -0,0 +1,54 @@ +## Share Knowledge - Improve Documentation + +A software project includes its functional aspects and the knowledge surrounding it. Document your experience to make it easier to have fun making things and to get engaged in improving the project. + +### MKDocs Preview in VS Code - Installation + +This method can be used to see a live preview of changes to the docs while editing in VS Code. + +Download the ZIP: [https://github.com/libukai/mkdocs-preview](https://github.com/libukai/mkdocs-preview) + +Place the following in workspace settings (F1, if working in a workspace) or create .vscode/settings.json: + + { + "mkdocsPreview.port": 8000, + //"mkdocsPreview.port": 4001, + + // remove the '/docs' prefix from every URL + // rewrite "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/docs/XYZ" → "/XYZ" + "mkdocsPreview.baseDir": "", + "mkdocsPreview.urlReplace": "/docs/||/", + + "simpleBrowser.defaultUrl": "http://localhost:8000/" + //"simpleBrowser.defaultUrl": "http://127.0.0.1:8000/", + } + +Open Powershell in your working directory in VS Code. + +Run: + + python --version + python -m pip --version + python -m pip install --upgrade pip + python -m pip install mkdocs-material + +Run either: + + mkdocs serve -a localhost:8000 + mkdocs serve -a 127.0.0.1:8000 + +It should now be visible 🐉 + + +####Troubleshooting: +1. Try using these commands to manually test addresses after starting the service in VS Code: + + Ctl + Shft + P -> MKDocs Preview: Toggle MkDocs Preview + + Ctl+ Shft + P -> Simple Browser: Show + +2. Check the address in a browser: + + [https://localhost:8000](https://localhost:8000) + + [https://127.0.0.1:8000/](https://127.0.0.1:8000/) \ No newline at end of file diff --git a/docs/general/hardware.md b/docs/general/hardware.md index ae25c2bff..703bbe5d8 100644 --- a/docs/general/hardware.md +++ b/docs/general/hardware.md @@ -1,4 +1,4 @@ -# MoonLight hardware +# MoonLight Hardware ## MoonLight specific @@ -15,3 +15,6 @@ +## Adding a new board + +See [Adding a Board Definition](https://moonmodules.org/MoonLight/general/adding-a-board-definition) \ No newline at end of file