BREAK: Modified `bookdown.json` schema
Pre-release
Pre-release
In this release, the "content"
element changes from an object to an array. The array elements are themselves objects in the format {"name": "origin"}
. For example:
{
"title": "My Book",
"content": [
{"page1": "page1.md"},
{"page2": "whatever.md"},
{"section1": "section1/bookdown.md"},
{"section2": "http://example.com/remote/bookdown.json"}
]
}
This release also allows any "content"
array element to be an origin string instead of an object {"name": "origin"}
. This will cause Bookdown to auto-determine the "name"
from the origin string:
- If the origin string ends in
bookdown.json
, the"name"
isbasename(dirname($origin))
- Otherwise, the
"name"
isbasename($origin)
, minus any filename extension on the origin
The following is equivalent to the above:
{
"title": "My Book",
"content": [
"page1.md",
{"page2": "whatever.md"},
"section1/bookdown.json",
{"section2": "http://example.com/remote/bookdown.json"}
]
}
The easiest way to transition from the previous bookdown.json
schema is to:
- Change the
"content"
object braces to array brackets, and - Wrap each
"content"
item in object braces.
Please create an issue if you have problems.