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}} +