summaryrefslogtreecommitdiffstats
path: root/packages/gitbook/src/blocks/include.js
blob: 55cd06e62dc45ab04ad3351c1bbea075b0a69a81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const Git = require('../utils/git');

/**
 * Fetch a reference "ref" relative to "file".
 * @param {Book} book
 * @param {File} file
 * @param {String} ref
 * @return {Promise<Slate.Fragment>}
 */
function fetchReference(book, file, ref) {

}

/**
 * Include another file. It replaces the templating node with content from the other file.
 *
 * @param  {Slate.Block} node
 * @return {Promise<List<Block>>}
 */
function include(book, file, node) {
    const ref = node.data.get('props').get(0);

    return fetchReference(book, file, ref)
    .then((fragment) => {

    });
}

module.exports = include;