From 118c8b836f7fb3e81fc4f89268f3c72d011576f5 Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Sun, 21 Feb 2016 22:40:01 +0800 Subject: [PATCH] Update README --- doc/SUMMARY.md | 10 +++++++++- doc/book.json | 17 +++++++++++++++++ doc/database/database.md | 20 +++++++++++++++++++- 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/doc/SUMMARY.md b/doc/SUMMARY.md index dea1d177..28c2ffdb 100644 --- a/doc/SUMMARY.md +++ b/doc/SUMMARY.md @@ -1,6 +1,14 @@ # Summary -* [GORM](README.md) +* [GORM GITHUB](http://github.com/jinzhu/gorm) +* [Getting Start](README.md) +{% for path, chapter in book.chapters %} +* [{{ chapter.name }}]({{ path }}) + {% for section in chapter.sections %} + * [{{ section.name }}]({{ section.path }}) + {% endfor %} +{% endfor %} + * [Database](database/database.md) * [Connecting to a Database](database/connect-database.md) * [Migration](database/migration.md) diff --git a/doc/book.json b/doc/book.json index bcf750b9..65889b54 100644 --- a/doc/book.json +++ b/doc/book.json @@ -16,5 +16,22 @@ "base": "https://github.com/jinzhu/gorm/edit/gh-pages", "label": "Edit This Page" } + }, + "sections": [ + { + "content": "

Hello

", + "type": "normal" + } + ], + "variables": { + "chapters": { + "database/database.md": { + "name": "Databae", + "sections": [ + {"name": "Connection to a Database", "path": "database/connect-database.md"}, + {"name": "Migration", "path": "database/migration.md"} + ] + } + } } } diff --git a/doc/database/database.md b/doc/database/database.md index ccd8d176..913a283f 100644 --- a/doc/database/database.md +++ b/doc/database/database.md @@ -1,4 +1,22 @@ ## Database - +{% for section in book.chapters["database/database.md"].sections %} +* [**{{section.name}}**](../{{section.path}}) +{% endfor %} +{{book.chapters}} +