|
| 1 | +# Welcome to Docs Hub |
| 2 | + |
| 3 | +For full documentation visit [mkdocs.org](https://www.mkdocs.org). |
| 4 | + |
| 5 | +## Projects |
| 6 | + |
| 7 | +<script> |
| 8 | + function includeHTML() { |
| 9 | + var z, i, elmnt, file, xhttp; |
| 10 | + /*loop through a collection of all HTML elements:*/ |
| 11 | + z = document.getElementsByTagName("*"); |
| 12 | + for (i = 0; i < z.length; i++) { |
| 13 | + elmnt = z[i]; |
| 14 | + /*search for elements with a certain atrribute:*/ |
| 15 | + file = elmnt.getAttribute("w3-include-html"); |
| 16 | + if (file) { |
| 17 | + /*make an HTTP request using the attribute value as the file name:*/ |
| 18 | + xhttp = new XMLHttpRequest(); |
| 19 | + xhttp.onreadystatechange = function() { |
| 20 | + if (this.readyState == 4) { |
| 21 | + if (this.status == 200) {elmnt.innerHTML = this.responseText;} |
| 22 | + if (this.status == 404) {elmnt.innerHTML = "Page not found.";} |
| 23 | + /*remove the attribute, and call this function once more:*/ |
| 24 | + elmnt.removeAttribute("w3-include-html"); |
| 25 | + includeHTML(); |
| 26 | + } |
| 27 | + } |
| 28 | + xhttp.open("GET", file, true); |
| 29 | + xhttp.send(); |
| 30 | + /*exit the function:*/ |
| 31 | + return; |
| 32 | + } |
| 33 | + } |
| 34 | + }; |
| 35 | +</script> |
| 36 | + |
| 37 | +<body> |
| 38 | + <div w3-include-html="sub_docs.html"></div> |
| 39 | + <script> |
| 40 | + includeHTML(); |
| 41 | + </script> |
| 42 | +</body> |
| 43 | + |
| 44 | +## Commands |
| 45 | + |
| 46 | +* `mkdocs new [dir-name]` - Create a new project. |
| 47 | +* `mkdocs serve` - Start the live-reloading docs server. |
| 48 | +* `mkdocs build` - Build the documentation site. |
| 49 | +* `mkdocs -h` - Print help message and exit. |
| 50 | + |
| 51 | +## Project layout |
| 52 | + |
| 53 | + mkdocs.yml # The configuration file. |
| 54 | + docs/ |
| 55 | + index.md # The documentation homepage. |
| 56 | + ... # Other markdown pages, images and other files. |
0 commit comments