diff --git a/docs/generate.php b/docs/generate.php deleted file mode 100644 index 0a0602404a6ab7..00000000000000 --- a/docs/generate.php +++ /dev/null @@ -1,131 +0,0 @@ - $child) { - foreach ($child as $file => $children) { - // Build an absolute path to the file - $path = __DIR__ . '/../' . $file; - - // Append to the manifest - $manifest[] = [ - 'title' => getTitle(file_get_contents($path)), - 'slug' => getSlug($file), - 'markdown_source' => sprintf('https://raw.githubusercontent.com/WordPress/gutenberg/master/%s', $file), - 'parent' => getParent($path), - ]; - - // Run the process for children items - if (!empty($children) && is_array($children)) { - $additions = process($children); - - // Merge the children into the containing manifest - $manifest = array_merge($manifest, $additions); - } - - if (is_string($children)) { - // @todo - // The TOC.json format includes tokens that could be replaced - // in the future, for easily embedding auto-generated content - // into the overall manifest. - } - } - } - - return $manifest; -} - -// Decode the TOC JSON -$contents = json_decode(file_get_contents(__DIR__ . '/toc.json'), true); - -// Process the contents -$response = process($contents); - -// Push out to root-manifest.json -file_put_contents(__DIR__ . '/root-manifest.json', json_encode($response, JSON_PRETTY_PRINT));