Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,20 @@ and run `configure.php`
$ php doc-base/configure.php
```

which will generate a `.manual.xml` file in the `doc-base` directory.
which will generate a `.manual.xml` file in the `doc-base/temp` directory.

To render the documentation in `xhtml` format
into the default `./output/` directory:

```shell
$ php phd/render.php -d doc-base/.manual.xml -P PHP -f xhtml
$ php phd/render.php -d doc-base/temp/.manual.xml -P PHP -f xhtml
```

`xhtml` files are standalone files that can be opened directly in a browser.
To render the documentation in the same `php` format used on the `php.net` website:

```shell
$ php phd/render.php -d doc-base/.manual.xml -P PHP -f php
$ php phd/render.php -d doc-base/temp/.manual.xml -P PHP -f php
```

Please refer to the appropriate section of the
Expand Down
11 changes: 9 additions & 2 deletions render.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,17 @@
// Acronym expansions come from the translatable entity file in the
// language checkout (e.g. en/, it/), languages without a
// translated copy fall back to the English one.
$acronymFilename = dirname($config->xmlRoot) . DIRECTORY_SEPARATOR . $config->language
// The language checkouts sit next to the doc-base one, and xmlRoot is the
// directory of the manual file passed to -d, which lives at the root of
// doc-base. doc-base is moving every file its build generates into a
// temp/ subdirectory, manual file included; when that lands, this becomes
// dirname(dirname($config->xmlRoot)).
$docsRoot = dirname($config->xmlRoot);

$acronymFilename = $docsRoot . DIRECTORY_SEPARATOR . $config->language
. DIRECTORY_SEPARATOR . 'entities' . DIRECTORY_SEPARATOR . 'entities.acronyms.ent';
if (!is_file($acronymFilename)) {
$acronymFilename = dirname($config->xmlRoot) . DIRECTORY_SEPARATOR . 'en'
$acronymFilename = $docsRoot . DIRECTORY_SEPARATOR . 'en'
. DIRECTORY_SEPARATOR . 'entities' . DIRECTORY_SEPARATOR . 'entities.acronyms.ent';
}
$config->init(array(
Expand Down
Loading