MCPcopy
hub / github.com/GitbookIO/gitbook / lookupStructureFile

Function lookupStructureFile

lib/parse/lookupStructureFile.js:12–18  ·  view source on GitHub ↗

Lookup a structure file (ex: SUMMARY.md, GLOSSARY.md) in a book. Uses book's config to find it. @param {Book} book @param {String} type: one of ["glossary", "readme", "summary", "langs"] @return {Promise } The path of the file found, relative to the book content

(book, type)

Source from the content-addressed store, hash-verified

10 to the book content root.
11*/
12function lookupStructureFile(book, type) {
13 var config = book.getConfig();
14
15 var fileToSearch = config.getValue(['structure', type]);
16
17 return findParsableFile(book, fileToSearch);
18}
19
20module.exports = lookupStructureFile;

Callers 1

parseStructureFileFunction · 0.85

Calls 1

findParsableFileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…