From bb3d8f7c9b2ceb778dc7733a6cc1db60997540fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Belin?= Date: Sun, 9 Apr 2023 18:16:54 +0200 Subject: [PATCH] Port the documentation to Docsify --- docs/.nojekyll | 0 docs/README.md | 19 +++++++++++++++++++ docs/_sidebar.md | 2 ++ docs/license.md | 20 ++++++++++++++++++++ docs/see_also.md | 5 +++++ scripts/Doc.hx | 8 ++++---- 6 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 docs/.nojekyll create mode 100644 docs/README.md create mode 100644 docs/_sidebar.md create mode 100644 docs/license.md create mode 100644 docs/see_also.md diff --git a/docs/.nojekyll b/docs/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..4e71ea4 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,19 @@ +# MC2IT Card +Business card of MC2IT, distribution and services, implemented in [Haxe](https://haxe.org). + +## Usage +Before you start, you need to make sure you have [Node.js](https://nodejs.org) up and running. +You can verify if you're already good to go with the following command: + +```shell +node --version +# v19.0.0 +``` + +Then, to display the business card, just type the following command in your terminal: + +```shell +npx @mc2it/card +``` + +And voila! diff --git a/docs/_sidebar.md b/docs/_sidebar.md new file mode 100644 index 0000000..af56d0a --- /dev/null +++ b/docs/_sidebar.md @@ -0,0 +1,2 @@ +- [License](license.md) +- [See also](see_also.md) diff --git a/docs/license.md b/docs/license.md new file mode 100644 index 0000000..1ee305d --- /dev/null +++ b/docs/license.md @@ -0,0 +1,20 @@ +# MIT License +Copyright © 2022-2023 MC2IT + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/docs/see_also.md b/docs/see_also.md new file mode 100644 index 0000000..b77fc4d --- /dev/null +++ b/docs/see_also.md @@ -0,0 +1,5 @@ +# See also +- [API reference](https://mc2it.github.io/card/api) +- [Git repository](https://github.com/mc2it/card) +- [npm package](https://www.npmjs.com/package/@mc2it/card) +- [Submit an issue](https://github.com/mc2it/card/issues) diff --git a/scripts/Doc.hx b/scripts/Doc.hx index 251316d..4c569c5 100644 --- a/scripts/Doc.hx +++ b/scripts/Doc.hx @@ -5,7 +5,7 @@ import sys.io.File; /** Builds the documentation. **/ function main() { - if (FileSystem.exists("docs")) Tools.removeDirectory("docs"); + if (FileSystem.exists("docs/api")) Tools.removeDirectory("docs/api"); Sys.command("haxe --define doc-gen --no-output --xml var/api.xml build.hxml"); Sys.command("lix", ["run", "dox", @@ -13,12 +13,12 @@ function main() { "--define", "source-path", "https://github.com/mc2it/card/blob/main/src", "--define", "themeColor", "0x165898", "--define", "version", Version.packageVersion, - "--define", "website", "https://github.com/mc2it/card", + "--define", "website", "https://mc2it.github.io/card", "--input-path", "var", - "--output-path", "docs", + "--output-path", "docs/api", "--title", "MC2IT Card", "--toplevel-package", "mc2it_card" ]); - File.copy("www/favicon.ico", "docs/favicon.ico"); + File.copy("docs/favicon.ico", "docs/api/favicon.ico"); }