summaryrefslogtreecommitdiffstats
path: root/docs/structure.md
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-02-26 09:41:26 +0100
committerSamy Pessé <samypesse@gmail.com>2016-02-26 09:41:26 +0100
commitd3d64f636c859f7f01a64f7774cf70bd8ccdc562 (patch)
tree4f7731f37c3a793d187b0ab1cd77680e69534c6c /docs/structure.md
parent4cb9cbb5ae3aa8f9211ffa3ac5e3d34232c0ca4f (diff)
parenteef072693b17526347c37b66078a5059c71caa31 (diff)
downloadgitbook-d3d64f636c859f7f01a64f7774cf70bd8ccdc562.zip
gitbook-d3d64f636c859f7f01a64f7774cf70bd8ccdc562.tar.gz
gitbook-d3d64f636c859f7f01a64f7774cf70bd8ccdc562.tar.bz2
Merge pull request #1109 from GitbookIO/3.0.0
Version 3.0.0
Diffstat (limited to 'docs/structure.md')
-rw-r--r--docs/structure.md62
1 files changed, 62 insertions, 0 deletions
diff --git a/docs/structure.md b/docs/structure.md
new file mode 100644
index 0000000..31b00f6
--- /dev/null
+++ b/docs/structure.md
@@ -0,0 +1,62 @@
+# Directory structure
+
+GitBook uses a very simple and obvious directory sttructure:
+
+```
+.
+├── book.json
+├── README.md
+├── SUMMARY.md
+├── chapter-1/
+| ├── README.md
+| └── something.md
+└── chapter-2/
+ ├── README.md
+ └── something.md
+```
+
+An overview of what each of these does:
+
+| File | Description |
+| -------- | ----------- |
+| `book.json` | Stores [configuration](config.md) data (__optional__) |
+| `README.md` | Preface / Introduction for your book (**required**) |
+| `SUMMARY.md` | Table of Contents |
+
+
+### Static files and Images
+
+A static file is a file that is not listed in the `SUMMARY.md`. All static files, not [ignored](#ignore), are copied to the output.
+
+### Ignoring files & folders {#ignore}
+
+GitBook will read the `.gitignore`, `.bookignore` and `.ignore` files to get a list of files and folders to skip.
+The format inside those files, follows the same convention as `.gitignore`:
+
+```markdown
+# This is a comment
+
+# Ignore the file test.md
+test.md
+
+# Ignore everything in the directory "bin"
+bin/*
+```
+
+### Project documentation / Sub-directory {#subdirectory}
+
+For project documentaiton, it sometimes better to use a diretcory (like `docs/`) to store the prject's documentation. You can use a `.gitbook` file to indicate to GitBook in which folder the book is stored:
+
+```
+.
+├── .gitbook
+└── docs/
+ ├── README.md
+ └── SUMMARY.md
+```
+
+With `.gitbook` containing:
+
+```
+./docs/
+```