Skip to content
Open
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: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@

This repository contains the base source files and tools for converting
PHP's documentation, written in DocBook XML, into various presentation
formats like HTML and RTF.
formats.

Documentation for the tools used for building the PHP documentation and
how to contribute to the documentation and translations can be found in
[the `docs` directory](docs/README.md).
[the `docs` directory](docs/README.md), also hosted at
<https://doc.php.net/guide/>.

If you just want to read the documentation for PHP, look at:
https://www.php.net/docs.php
1 change: 0 additions & 1 deletion configure.php
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,6 @@ function phd_sources()
$source_map = array();
$base_dir = "{$ac['rootdir']}/{$ac['LANG_BASE_DIR']}";
$source_langs = array(
array('base', $ac['srcdir'], array('manual.xml', 'funcindex.xml')),
array($ac['LANG_BASE_DIR'], $base_dir, find_xml_files($base_dir)),
);
if (!is_single_language()) {
Expand Down
25 changes: 12 additions & 13 deletions docs/local-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ instructions](local-web-setup.md) for details on how to view those.)
<a name="without-docker"></a>
## Building without make or Docker

## Check out the PHP documentation using Git
### Check out the PHP documentation using Git

Note that `doc-en` is cloned into the `en` directory below.

Expand All @@ -60,7 +60,7 @@ $ git clone https://github.com/php/doc-base.git
$ git clone https://github.com/php/doc-en.git en
```

## Validate and build `.manual.xml`
### Validate and build `manual.xml`

```
$ php doc-base/configure.php
Expand All @@ -70,7 +70,7 @@ Running `configure.php` will check and validate the XML according to the
Docbook specification. It will output either error messages explaining
any problems, or an ASCII cat.

This creates the file `doc-base/.manual.xml` which can then be used
This creates the file `doc-base//temp/manual.xml` which can then be used
to generate other formats of the documentation.

If you are building a translation, you'll also need to specify the
Expand All @@ -85,33 +85,32 @@ When building a language, you still need to clone both the `doc-en` repository
(again, as `en`) so it can be used as the fallback for files that are not yet
translated.

## Build other formats of the documentation
### Build other formats of the documentation

`phd` can turn the `doc-base/.manual.xml` generated by `configure.php`
`phd` can turn the `doc-base/temp/manual.xml` generated by `configure.php`
into several different formats, including a single HTML file, a
multiple-file ("chunked") HTML version, and a special version of the
HTML used by the PHP.net website.

```sh
$ php phd/render.php --docbook doc-base/.manual.xml --package PHP --format xhtml
$ php phd/render.php --docbook doc-base/temp/manual.xml --package PHP --format xhtml
$ open output/php-chunked-xhtml/index.html
```

To build the version for the website (with a [local web setup](local-web-setup.md)):

```sh
$ php phd/render.php --docbook doc-base/.manual.xml --package PHP --format php
$ php phd/render.php --docbook doc-base/temp/manual.xml --package PHP --format php
$ open https://localhost:8080/manual/en/
```

<a name="windows-eol"></a>
## Translating on Windows
## Working on Windows

When working on Windows, try to use text editors that preserve the end
of line mark as `U+000A LINE FEED (LF)` only. If it's not possible,
of line mark as `U+000A LINE FEED (LF)`. If it's not possible,
you may issue the commands below to instruct `git` in transforming
the files in your local clone to use the Windows native end of line
mark:
the clone local files to use the Windows native end of line mark:

```
cd LANG
Expand All @@ -120,8 +119,8 @@ git add --renormalize .
git status
```

If the last comment above outputs no files, then the process works,
and you can start translating.
If the last comment above outputs no files, then the configuration
worked, and you can use the files with the native Windows line end.

If the last command above shows a list of files, something went wrong,
because these listed files will be changed at *repository level*
Expand Down
9 changes: 5 additions & 4 deletions docs/public-builds.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ The manual and all of its translations is automatically rebuilt and
made available at PHP.net through a regular process handled by the
systems team.

Currently, this happens every few hours.
Currently, this happens every two hours.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


If there appear to be problems with the regular building of the manual or
any translation, contact the [PHP Systems team](mailto:systems@php.net)
for help. (The process is automated and monitored, so problems are
generally dealt with promptly.)
any translation, inspect the build logs at <https://doc.php.net/logs/> or
contact the [PHP Systems team](mailto:systems@php.net) for help.
(The process is automated and monitored, so problems are generally
dealt with promptly.)

## CHM builds

Expand Down
Loading