From 1ce4aa81eee4e5dd91e86655210033a18fa77fd2 Mon Sep 17 00:00:00 2001
From: Sergey Lyubka <sergey.lyubka@cesanta.com>
Date: Wed, 25 May 2016 20:54:28 +0300
Subject: [PATCH] Simplify doc generation infra

PUBLISHED_FROM=80e77fda1c358294f251ca77d3dd64e8ca9160e5
---
 docs/build-options/intro.md    |  5 +++++
 docs/build-options/items.json  |  9 ---------
 docs/design-concept/intro.md   |  5 +++++
 docs/design-concept/items.json |  9 ---------
 docs/intro.md                  | 14 ++++++++++++++
 docs/items.json                |  8 --------
 docs/usage-example/items.json  |  5 -----
 7 files changed, 24 insertions(+), 31 deletions(-)
 delete mode 100644 docs/build-options/items.json
 delete mode 100644 docs/design-concept/items.json
 create mode 100644 docs/intro.md
 delete mode 100644 docs/items.json
 delete mode 100644 docs/usage-example/items.json

diff --git a/docs/build-options/intro.md b/docs/build-options/intro.md
index f418a963c..5af9ff7aa 100644
--- a/docs/build-options/intro.md
+++ b/docs/build-options/intro.md
@@ -1,5 +1,10 @@
 ---
 title: Build Options
+items:
+  - { type: file, name: enabling-flags.md }
+  - { type: file, name: disabling-flags.md }
+  - { type: file, name: platform-spec.md }
+  - { type: file, name: tunables.md }
 ---
 
 Mongoose source code ships in a single .c file that contains functionality
diff --git a/docs/build-options/items.json b/docs/build-options/items.json
deleted file mode 100644
index 2d8c57bdc..000000000
--- a/docs/build-options/items.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-  "items": [
-    { "type": "markdown", "name": "intro.md" },
-    { "type": "markdown", "name": "enabling-flags.md" },
-    { "type": "markdown", "name": "disabling-flags.md" },
-    { "type": "markdown", "name": "platform-spec.md" },
-    { "type": "markdown", "name": "tunables.md" }
-  ]
-}
diff --git a/docs/design-concept/intro.md b/docs/design-concept/intro.md
index 2142b62fd..b0cd08ae5 100644
--- a/docs/design-concept/intro.md
+++ b/docs/design-concept/intro.md
@@ -1,5 +1,10 @@
 ---
 title: Design Concept
+items:
+  - { type: file, name: memory-buffers.md }
+  - { type: file, name: event-handler.md }
+  - { type: file, name: events.md }
+  - { type: file, name: conn-flags.md }
 ---
 
 Mongoose is a multi-protocol networking library that implements non-blocking,
diff --git a/docs/design-concept/items.json b/docs/design-concept/items.json
deleted file mode 100644
index c939cbe9b..000000000
--- a/docs/design-concept/items.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-  "items": [
-    { "type": "markdown", "name": "intro.md" },
-    { "type": "markdown", "name": "memory-buffers.md" },
-    { "type": "markdown", "name": "event-handler.md" },
-    { "type": "markdown", "name": "events.md" },
-    { "type": "markdown", "name": "conn-flags.md" }
-  ]
-}
diff --git a/docs/intro.md b/docs/intro.md
new file mode 100644
index 000000000..3f8a8f5fd
--- /dev/null
+++ b/docs/intro.md
@@ -0,0 +1,14 @@
+---
+title: Mongoose - a networking library
+color: '#1D6482'
+repo: https://github.com/cesanta/mongoose
+items:
+  - { type: dir, name: usage-example }
+  - { type: dir, name: design-concept }
+  - { type: dir, name: build-options }
+  - { type: flat, name: c-api }
+---
+
+Mongoose is a multi-protocol embedded networking library with
+that implements TCP, UDP, HTTP, WebSocket, CoAP, MQTT, JSON-RPC,
+both client and server mode.
diff --git a/docs/items.json b/docs/items.json
deleted file mode 100644
index 7360d0150..000000000
--- a/docs/items.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "items": [
-    { "type": "section", "name": "usage-example" },
-    { "type": "section", "name": "design-concept" },
-    { "type": "section", "name": "build-options" },
-    { "type": "flat_sections_set", "name": "c-api" }
-  ]
-}
diff --git a/docs/usage-example/items.json b/docs/usage-example/items.json
deleted file mode 100644
index bc7e70d8d..000000000
--- a/docs/usage-example/items.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-  "items": [
-    { "type": "markdown", "name": "intro.md" }
-  ]
-}
-- 
GitLab