diff --git a/docs/en/index.md b/docs/en/index.md index 8b76c4a7..ba964dec 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -2,7 +2,7 @@ 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). -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. +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. ## 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` folder in the repository on GitHub. diff --git a/docs/en/lua-developer-faq.md b/docs/en/lua-developer-faq.md index 58bbd763..fb757568 100644 --- a/docs/en/lua-developer-faq.md +++ b/docs/en/lua-developer-faq.md @@ -8,7 +8,7 @@ This FAQ does not aim to help you to learn to program or even how to program in ## What has changed since the first version of this FAQ? -The [NodeMCU company](http://NodeMCU.com/index_en.html) was set up by [Zeroday](zeroday@nodemcu.com) to develop and to market a set of Lua firmware-based development boards which employ the Espressif ESP8266 SoC. The initial development of the firmware was done by Zeroday and a colleague, Vowstar, in-house with the firmware being first open-sourced on Github in late 2014. In mid-2015, Zeroday decided to open the firmware development to a wider group of community developers, so the core group of developers now comprises 6 community developers (including this author), and we are also supported by another dozen or so active contributors, and two NodeMCU originators. +The [NodeMCU company](http://NodeMCU.com/index_en.html) was set up by [Zeroday](mailto:zeroday@nodemcu.com) to develop and to market a set of Lua firmware-based development boards which employ the Espressif ESP8266 SoC. The initial development of the firmware was done by Zeroday and a colleague, Vowstar, in-house with the firmware being first open-sourced on Github in late 2014. In mid-2015, Zeroday decided to open the firmware development to a wider group of community developers, so the core group of developers now comprises 6 community developers (including this author), and we are also supported by another dozen or so active contributors, and two NodeMCU originators. This larger active team has allowed us to address most of the outstanding issues present at the first version of this FAQ. These include: diff --git a/docs/en/start.md b/docs/en/start.md deleted file mode 100644 index 9e2f59f0..00000000 --- a/docs/en/start.md +++ /dev/null @@ -1,5 +0,0 @@ -# Getting started -## Obtain the firmware -[Build the firmware](build.html) or download it from ? -## Flash the firmware -There are a number of tools for flashing the firmware. diff --git a/docs/js/extra.js b/docs/js/extra.js index 0cc3a7ba..1f8c5209 100644 --- a/docs/js/extra.js +++ b/docs/js/extra.js @@ -1,4 +1,5 @@ var nodemcu = nodemcu || {}; + (function () { 'use strict'; //var languageCodeToNameMap = {en: 'English', de: 'Deutsch'}; @@ -112,7 +113,7 @@ var nodemcu = nodemcu || {}; * replaces the relative path with an absolute path based on the selected branch. */ function replaceRelativeLinksWithStaticGitHubUrl() { - var relativePath = "../../../.."; + var relativePath = isOnRtd() ? "../../../.." : "../../.."; var gitHubPath = "https://github.com/nodemcu/nodemcu-firmware/tree/" + determineSelectedBranch(); var gitHubLinks = $("a[href^='" + relativePath + "']").each(function (index) { var url = $(this).attr('href'); @@ -148,7 +149,7 @@ var nodemcu = nodemcu || {}; */ function determineSelectedLanguageCode() { var selectedLanguageCode, path = window.location.pathname; - if (window.location.origin.indexOf('readthedocs') > -1) { + if (isOnRtd()) { // path is like /en///build/ -> extract 'lang' // split[0] is an '' because the path starts with the separator selectedLanguageCode = path.split('/')[3]; @@ -171,7 +172,7 @@ var nodemcu = nodemcu || {}; */ function determineSelectedBranch() { var branch = 'dev', path = window.location.pathname; - if (window.location.origin.indexOf('readthedocs') > -1) { + if (isOnRtd()) { // path is like /en///build/ -> extract 'lang' // split[0] is an '' because the path starts with the separator var thirdPathSegment = path.split('/')[2]; @@ -192,4 +193,8 @@ var nodemcu = nodemcu || {}; } return values; } + + function isOnRtd() { + return window.location.origin.indexOf('readthedocs') > -1; + } }()); diff --git a/mkdocs.yml b/mkdocs.yml index 2e4579e9..5dfec2dd 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -19,7 +19,7 @@ extra_css: extra_javascript: - js/extra.js -pages: +nav: - Overview: 'index.md' - English: - Home: 'en/index.md'