From b126c6b2d221b64bf026fa4f8a2a1b8338940630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20St=C3=B6r?= Date: Sun, 13 Jan 2019 22:01:57 +0100 Subject: [PATCH] Re-organize documentation Drop support for localized content, #2213 Restructure some content to match more closely what we have in master, #2542 --- docs/{en => }/build.md | 0 docs/{en => }/compiling.md | 0 docs/{en => }/extn-developer-faq.md | 0 docs/{en => }/flash.md | 13 +- docs/{en => }/getting-started.md | 2 +- docs/{en => }/hardware-faq.md | 0 docs/index.md | 10 +- docs/js/extra.js | 113 +------------- docs/{en => }/lcd.md | 0 docs/{en => }/lfs.md | 0 docs/{en => }/lua-developer-faq.md | 0 docs/{en => }/lua-modules/bh1750.md | 4 +- docs/{en => }/lua-modules/ds18b20.md | 4 +- docs/{en => }/lua-modules/ds3231.md | 4 +- docs/{en => }/lua-modules/ftpserver.md | 6 +- docs/{en => }/lua-modules/hdc1000.md | 4 +- docs/{en => }/lua-modules/httpserver.md | 4 +- docs/{en => }/lua-modules/imap.md | 4 +- docs/{en => }/lua-modules/lm92.md | 4 +- docs/{en => }/lua-modules/mcp23008.md | 4 +- docs/{en => }/lua-modules/redis.md | 4 +- docs/{en => }/lua-modules/yeelink.md | 4 +- docs/{en => }/modules/adc.md | 2 +- docs/{en => }/modules/ads1115.md | 2 +- docs/{en => }/modules/adxl345.md | 2 +- docs/{en => }/modules/am2320.md | 2 +- docs/{en => }/modules/apa102.md | 2 +- docs/{en => }/modules/bit.md | 2 +- docs/{en => }/modules/bloom.md | 2 +- docs/{en => }/modules/bme280.md | 2 +- docs/{en => }/modules/bme680.md | 2 +- docs/{en => }/modules/bmp085.md | 2 +- docs/{en => }/modules/cjson.md | 0 docs/{en => }/modules/coap.md | 2 +- docs/{en => }/modules/color-utils.md | 2 +- docs/{en => }/modules/cron.md | 2 +- docs/{en => }/modules/crypto.md | 2 +- docs/{en => }/modules/dht.md | 2 +- docs/{en => }/modules/ds18b20.md | 4 +- docs/{en => }/modules/encoder.md | 2 +- docs/{en => }/modules/enduser-setup.md | 4 +- docs/{en => }/modules/file.md | 2 +- docs/{en => }/modules/gdbstub.md | 2 +- docs/{en => }/modules/gpio.md | 2 +- docs/{en => }/modules/hdc1080.md | 2 +- docs/{en => }/modules/hmc5883l.md | 2 +- docs/{en => }/modules/http.md | 2 +- docs/{en => }/modules/hx711.md | 2 +- docs/{en => }/modules/i2c.md | 2 +- docs/{en => }/modules/l3g4200d.md | 2 +- docs/{en => }/modules/mcp4725.md | 2 +- docs/{en => }/modules/mdns.md | 2 +- docs/{en => }/modules/mqtt.md | 2 +- docs/{en => }/modules/net.md | 2 +- docs/{en => }/modules/node.md | 2 +- docs/{en => }/modules/ow.md | 2 +- docs/{en => }/modules/pcm.md | 6 +- docs/{en => }/modules/perf.md | 2 +- docs/{en => }/modules/pwm.md | 2 +- docs/{en => }/modules/rc.md | 2 +- docs/{en => }/modules/rfswitch.md | 2 +- docs/{en => }/modules/rotary.md | 2 +- docs/{en => }/modules/rtcfifo.md | 4 +- docs/{en => }/modules/rtcmem.md | 4 +- docs/{en => }/modules/rtctime.md | 2 +- docs/{en => }/modules/si7021.md | 2 +- docs/{en => }/modules/sigma-delta.md | 2 +- docs/{en => }/modules/sjson.md | 4 +- docs/{en => }/modules/sntp.md | 2 +- docs/{en => }/modules/somfy.md | 4 +- docs/{en => }/modules/spi.md | 2 +- docs/{en => }/modules/sqlite3.md | 6 +- docs/{en => }/modules/struct.md | 2 +- docs/{en => }/modules/switec.md | 2 +- docs/{en => }/modules/tcs34725.md | 2 +- docs/{en => }/modules/tls.md | 4 +- docs/{en => }/modules/tm1829.md | 2 +- docs/{en => }/modules/tmr.md | 2 +- docs/{en => }/modules/tsl2561.md | 2 +- docs/{en => }/modules/u8g2.md | 12 +- docs/{en => }/modules/uart.md | 2 +- docs/{en => }/modules/ucg.md | 6 +- docs/{en => }/modules/websocket.md | 2 +- docs/{en => }/modules/wifi.md | 8 +- docs/{en => }/modules/wifi_monitor.md | 2 +- docs/{en => }/modules/wps.md | 2 +- docs/{en => }/modules/ws2801.md | 2 +- docs/{en => }/modules/ws2812-effects.md | 2 +- docs/{en => }/modules/ws2812.md | 2 +- docs/{en => }/modules/xpt2046.md | 2 +- docs/{en => }/sdcard.md | 8 +- docs/{en => }/spiffs.md | 0 docs/{en => }/support.md | 2 +- docs/{en => }/upload.md | 2 +- lua_modules/bh1750/README.md | 2 +- lua_modules/ds18b20/README.md | 2 +- lua_modules/ds3231/README.md | 2 +- lua_modules/email/README.md | 2 +- lua_modules/ftp/README.md | 2 +- lua_modules/hdc1000/README.md | 2 +- lua_modules/http/README.md | 2 +- lua_modules/lm92/README.md | 2 +- lua_modules/mcp23008/README.md | 2 +- lua_modules/redis/README.md | 2 +- lua_modules/yeelink/README.md | 2 +- mkdocs.yml | 186 ++++++++++++------------ 106 files changed, 230 insertions(+), 350 deletions(-) rename docs/{en => }/build.md (100%) rename docs/{en => }/compiling.md (100%) rename docs/{en => }/extn-developer-faq.md (100%) rename docs/{en => }/flash.md (92%) rename docs/{en => }/getting-started.md (99%) rename docs/{en => }/hardware-faq.md (100%) rename docs/{en => }/lcd.md (100%) rename docs/{en => }/lfs.md (100%) rename docs/{en => }/lua-developer-faq.md (100%) rename docs/{en => }/lua-modules/bh1750.md (97%) rename docs/{en => }/lua-modules/ds18b20.md (93%) rename docs/{en => }/lua-modules/ds3231.md (97%) rename docs/{en => }/lua-modules/ftpserver.md (95%) rename docs/{en => }/lua-modules/hdc1000.md (98%) rename docs/{en => }/lua-modules/httpserver.md (91%) rename docs/{en => }/lua-modules/imap.md (95%) rename docs/{en => }/lua-modules/lm92.md (96%) rename docs/{en => }/lua-modules/mcp23008.md (92%) rename docs/{en => }/lua-modules/redis.md (94%) rename docs/{en => }/lua-modules/yeelink.md (91%) rename docs/{en => }/modules/adc.md (96%) rename docs/{en => }/modules/ads1115.md (98%) rename docs/{en => }/modules/adxl345.md (95%) rename docs/{en => }/modules/am2320.md (94%) rename docs/{en => }/modules/apa102.md (95%) rename docs/{en => }/modules/bit.md (98%) rename docs/{en => }/modules/bloom.md (97%) rename docs/{en => }/modules/bme280.md (99%) rename docs/{en => }/modules/bme680.md (98%) rename docs/{en => }/modules/bmp085.md (98%) rename docs/{en => }/modules/cjson.md (100%) rename docs/{en => }/modules/coap.md (99%) rename docs/{en => }/modules/color-utils.md (98%) rename docs/{en => }/modules/cron.md (96%) rename docs/{en => }/modules/crypto.md (99%) rename docs/{en => }/modules/dht.md (98%) rename docs/{en => }/modules/ds18b20.md (98%) rename docs/{en => }/modules/encoder.md (95%) rename docs/{en => }/modules/enduser-setup.md (97%) rename docs/{en => }/modules/file.md (99%) rename docs/{en => }/modules/gdbstub.md (97%) rename docs/{en => }/modules/gpio.md (99%) rename docs/{en => }/modules/hdc1080.md (91%) rename docs/{en => }/modules/hmc5883l.md (95%) rename docs/{en => }/modules/http.md (98%) rename docs/{en => }/modules/hx711.md (97%) rename docs/{en => }/modules/i2c.md (97%) rename docs/{en => }/modules/l3g4200d.md (95%) rename docs/{en => }/modules/mcp4725.md (98%) rename docs/{en => }/modules/mdns.md (96%) rename docs/{en => }/modules/mqtt.md (99%) rename docs/{en => }/modules/net.md (99%) rename docs/{en => }/modules/node.md (99%) rename docs/{en => }/modules/ow.md (98%) rename docs/{en => }/modules/pcm.md (92%) rename docs/{en => }/modules/perf.md (96%) rename docs/{en => }/modules/pwm.md (97%) rename docs/{en => }/modules/rc.md (98%) rename docs/{en => }/modules/rfswitch.md (99%) rename docs/{en => }/modules/rotary.md (98%) rename docs/{en => }/modules/rtcfifo.md (99%) rename docs/{en => }/modules/rtcmem.md (96%) rename docs/{en => }/modules/rtctime.md (99%) rename docs/{en => }/modules/si7021.md (98%) rename docs/{en => }/modules/sigma-delta.md (98%) rename docs/{en => }/modules/sjson.md (97%) rename docs/{en => }/modules/sntp.md (99%) rename docs/{en => }/modules/somfy.md (97%) rename docs/{en => }/modules/spi.md (99%) rename docs/{en => }/modules/sqlite3.md (90%) rename docs/{en => }/modules/struct.md (99%) rename docs/{en => }/modules/switec.md (98%) rename docs/{en => }/modules/tcs34725.md (96%) rename docs/{en => }/modules/tls.md (97%) rename docs/{en => }/modules/tm1829.md (88%) rename docs/{en => }/modules/tmr.md (99%) rename docs/{en => }/modules/tsl2561.md (98%) rename docs/{en => }/modules/u8g2.md (97%) rename docs/{en => }/modules/uart.md (98%) rename docs/{en => }/modules/ucg.md (98%) rename docs/{en => }/modules/websocket.md (99%) rename docs/{en => }/modules/wifi.md (99%) rename docs/{en => }/modules/wifi_monitor.md (99%) rename docs/{en => }/modules/wps.md (98%) rename docs/{en => }/modules/ws2801.md (97%) rename docs/{en => }/modules/ws2812-effects.md (99%) rename docs/{en => }/modules/ws2812.md (99%) rename docs/{en => }/modules/xpt2046.md (97%) rename docs/{en => }/sdcard.md (84%) rename docs/{en => }/spiffs.md (100%) rename docs/{en => }/support.md (97%) rename docs/{en => }/upload.md (99%) diff --git a/docs/en/build.md b/docs/build.md similarity index 100% rename from docs/en/build.md rename to docs/build.md diff --git a/docs/en/compiling.md b/docs/compiling.md similarity index 100% rename from docs/en/compiling.md rename to docs/compiling.md diff --git a/docs/en/extn-developer-faq.md b/docs/extn-developer-faq.md similarity index 100% rename from docs/en/extn-developer-faq.md rename to docs/extn-developer-faq.md diff --git a/docs/en/flash.md b/docs/flash.md similarity index 92% rename from docs/en/flash.md rename to docs/flash.md index 75935423..7e95fd95 100644 --- a/docs/en/flash.md +++ b/docs/flash.md @@ -37,23 +37,14 @@ Run the following command to flash an *aggregated* binary as is produced for exa ### NodeMCU PyFlasher > Self-contained [NodeMCU](https://github.com/nodemcu/nodemcu-firmware) flasher with GUI based on [esptool.py](https://github.com/espressif/esptool) and [wxPython](https://www.wxpython.org/). -![NodeMCU PyFlasher](../img/NodeMCU-PyFlasher.png "NodeMCU PyFlasher") +![NodeMCU PyFlasher](img/NodeMCU-PyFlasher.png "NodeMCU PyFlasher") Source: [https://github.com/marcelstoer/nodemcu-pyflasher](https://github.com/marcelstoer/nodemcu-pyflasher) -Supported platforms: anything that runs Python, runnable .exe available for Windows and .dmg for macOS +Supported platforms: anything that runs Python, runnable `.exe` available for Windows and `.dmg` for macOS Disclaimer: the availability of [NodeMCU PyFlasher was announced on the NodeMCU Facebook page](https://www.facebook.com/NodeMCU/posts/663197460515251) but it is not an official offering of the current NodeMCU firmware team. -### NodeMCU Flasher -> A firmware Flash tool for NodeMCU...We are working on next version and will use QT framework. It will be cross platform and open-source. - -Source: [https://github.com/nodemcu/nodemcu-flasher](https://github.com/nodemcu/nodemcu-flasher) - -Supported platforms: Windows - -Note that this tool was created by the initial developers of the NodeMCU firmware. **It hasn't seen updates since September 2015** and is not maintained by the current NodeMCU *firmware* team. Be careful to not accidentally flash the very old default firmware the tool is shipped with. - ## Putting Device Into Flash Mode To enable ESP8266 firmware flashing GPIO0 pin must be pulled low before the device is reset. Conversely, for a normal boot, GPIO0 must be pulled high or floating. diff --git a/docs/en/getting-started.md b/docs/getting-started.md similarity index 99% rename from docs/en/getting-started.md rename to docs/getting-started.md index 3d1a1c78..76da932f 100644 --- a/docs/en/getting-started.md +++ b/docs/getting-started.md @@ -325,4 +325,4 @@ Once the LFS image file is on SPIFFS, you can execute the [node.flashreload()](. Do a protected call of this `_init` code: `pcall(node.flashindex("_init"))` and check the error status. See [Programming Techniques and Approachs](lfs.md#programming-techniques-and-approachs) in the LFS whitepaper for a more detailed description. -[↑ back to matrix](#task-os-selector) \ No newline at end of file +[↑ back to matrix](#task-os-selector) diff --git a/docs/en/hardware-faq.md b/docs/hardware-faq.md similarity index 100% rename from docs/en/hardware-faq.md rename to docs/hardware-faq.md diff --git a/docs/index.md b/docs/index.md index ea345dcf..c8d2999e 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,10 +1,10 @@ # NodeMCU Documentation -NodeMCU is an open source [Lua](https://www.lua.org/) based firmware for the [ESP8266 WiFi SOC from Espressif](http://espressif.com/en/products/esp8266/) and uses an on-module flash-based [SPIFFS](https://github.com/pellepl/spiffs) file system. NodeMCU is implemented in C and is layered on the [Espressif NON-OS SDK](https://github.com/espressif/ESP8266_NONOS_SDK). +NodeMCU is an open source [Lua](https://www.lua.org/) based firmware for the [ESP8266 WiFi SOC from Espressif](http://espressif.com/products/esp8266/) and uses an on-module flash-based [SPIFFS](https://github.com/pellepl/spiffs) file system. NodeMCU is implemented in C and is layered on the [Espressif NON-OS SDK](https://github.com/espressif/ESP8266_NONOS_SDK). The firmware was initially developed as is a companion project to the popular ESP8266-based [NodeMCU development modules](https://github.com/nodemcu/nodemcu-devkit-v1.0), but the project is now community-supported, and the firmware can now be run on _any_ ESP module. -→ [Getting Started](en/getting-started.md) +→ [Getting Started](getting-started.md) ## Programming Model The NodeMCU programming model is similar to that of [Node.js](https://en.wikipedia.org/wiki/Node.js), only in Lua. It is asynchronous and event-driven. Many functions, therefore, have parameters for callback functions. To give you an idea what a NodeMCU program looks like study the short snippets below. For more extensive examples have a look at the [`/lua_examples`](https://github.com/nodemcu/nodemcu-firmware/tree/master/lua_examples) folder in the repository on GitHub. @@ -45,10 +45,10 @@ gpio.write(pin, gpio.HIGH) print(gpio.read(pin)) ``` -→ [Getting Started](en/getting-started.md) +→ [Getting Started](getting-started.md) ## Lua Flash Store (LFS) -In September 2018 support for a [Lua Flash Store (LFS)](en/lfs.md) was introduced. LFS allows Lua code and its associated constant data to be executed directly out of flash-memory; just as the firmware itself is executed. This now enables NodeMCU developers to create Lua applications with up to 256Kb Lua code and read-only constants executing out of flash. All of the RAM is available for read-write data! +In September 2018 support for a [Lua Flash Store (LFS)](lfs.md) was introduced. LFS allows Lua code and its associated constant data to be executed directly out of flash-memory; just as the firmware itself is executed. This now enables NodeMCU developers to create Lua applications with up to 256Kb Lua code and read-only constants executing out of flash. All of the RAM is available for read-write data! ## Releases @@ -57,4 +57,4 @@ This project uses two main branches, `master` and `dev`. `dev` is actively worke A new tag is created every time `dev` is merged back to `master`. They are listed in the [releases section on GitHub](https://github.com/nodemcu/nodemcu-firmware/releases). Tag names follow the `-master_yyyymmdd` pattern. ## Up-To-Date Documentation -At the moment the only up-to-date documentation maintained by the current NodeMCU team is in English. It is part of the source code repository (`/docs` subfolder) and kept in sync with the code. \ No newline at end of file +At the moment the only up-to-date documentation maintained by the current NodeMCU team is in English. It is part of the source code repository (`/docs` subfolder) and kept in sync with the code. diff --git a/docs/js/extra.js b/docs/js/extra.js index 1f8c5209..e2fef36d 100644 --- a/docs/js/extra.js +++ b/docs/js/extra.js @@ -1,16 +1,9 @@ var nodemcu = nodemcu || {}; - (function () { 'use strict'; - //var languageCodeToNameMap = {en: 'English', de: 'Deutsch'}; - var languageCodeToNameMap = {en: 'English'}; - var languageNames = values(languageCodeToNameMap); - var defaultLanguageCode = 'en'; $(document).ready(function () { addToc(); - hideNavigationForAllButSelectedLanguage(); - addLanguageSelectorToRtdFlyOutMenu(); replaceRelativeLinksWithStaticGitHubUrl(); }); @@ -45,75 +38,13 @@ var nodemcu = nodemcu || {}; } } - function hideNavigationForAllButSelectedLanguage() { - var selectedLanguageCode = determineSelectedLanguageCode(); - var selectedLanguageName = languageCodeToNameMap[selectedLanguageCode]; - // Finds all subnav elements and hides them if they're /language/ subnavs. Hence, all 'Modules' subnav elements - // won't be hidden. - //