diff --git a/docs/generate.php b/docs/generate.php deleted file mode 100644 index f02531d9cdf7a1..00000000000000 --- a/docs/generate.php +++ /dev/null @@ -1,119 +0,0 @@ - $child) { - foreach ($child as $file => $children) { - // Build an absolute path to the file - $path = __DIR__ . '/../' . $file; - // Append to the manifest - $title = getTitle(file_get_contents($path)); - if ( ! $title ) { - $title = ucwords( basename( $path ) ); - if ( 'Readme.md' == $title ) { - $title = ucwords( basename( dirname( $path ) ) ); - } - } - $manifest[] = [ - 'title' => $title, - '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));