From aeab4efe17cfba0dcb2f2b1b487c7175d1d428b8 Mon Sep 17 00:00:00 2001 From: Aviv Eyal Date: Wed, 30 Aug 2023 11:14:14 -0700 Subject: [PATCH] Generate Diviner book for Javelin Summary: And also fix a bug in the generator script. Test Plan: Run `bin/diviner generate`, wait till the cows come home, see 3 pages about Javelin in the Diviner app. Reviewers: O1 Blessed Committers, chris Reviewed By: O1 Blessed Committers, chris Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Differential Revision: https://we.phorge.it/D25429 --- .gitignore | 1 + .../diviner/workflow/DivinerGenerateWorkflow.php | 3 +-- webroot/rsrc/externals/javelin/docs/javelin.book | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 webroot/rsrc/externals/javelin/docs/javelin.book diff --git a/.gitignore b/.gitignore index d9f44b6bab..4e3a12e5e9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ # Diviner /docs/ /.divinercache/ +/webroot/rsrc/externals/javelin/docs/.divinercache/ /src/.cache/ # libphutil diff --git a/src/applications/diviner/workflow/DivinerGenerateWorkflow.php b/src/applications/diviner/workflow/DivinerGenerateWorkflow.php index 866e8b9ee6..0cde772fc3 100644 --- a/src/applications/diviner/workflow/DivinerGenerateWorkflow.php +++ b/src/applications/diviner/workflow/DivinerGenerateWorkflow.php @@ -348,7 +348,7 @@ final class DivinerGenerateWorkflow extends DivinerWorkflow { $atomizers[$atomizer][] = $file; } - $root = dirname(phutil_get_library_root('phabricator')); + $root = dirname(phutil_get_library_root('phorge')); $config_root = $this->getConfig('root'); $bar = id(new PhutilConsoleProgressBar()) @@ -363,7 +363,6 @@ final class DivinerGenerateWorkflow extends DivinerWorkflow { $this->getBookConfigPath(), $class, $chunk); - $future->setCWD($config_root); $futures[] = $future; diff --git a/webroot/rsrc/externals/javelin/docs/javelin.book b/webroot/rsrc/externals/javelin/docs/javelin.book new file mode 100644 index 0000000000..7c2a0c2274 --- /dev/null +++ b/webroot/rsrc/externals/javelin/docs/javelin.book @@ -0,0 +1,16 @@ +{ + "name" : "javelin", + "title" : "Javelin Documentation", + "short" : "Javelin Docs", + "preface" : "Documentation for developers using Javelin.", + "uri.source": + "https://we.phorge.it/diffusion/P/browse/master/%f$%l", + "rules": { + "(\\.diviner$)": "DivinerArticleAtomizer" + }, + "groups": { + "concepts": { + "name": "Concepts" + } + } +}