Skip to content

Commit d085a57

Browse files
authored
Consolidate documentation about documentation into docs directory (#159)
1 parent 7622734 commit d085a57

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1100
-18414
lines changed

CONTRIBUTING_DOCS.md

Lines changed: 0 additions & 217 deletions
This file was deleted.

README.md

Lines changed: 7 additions & 153 deletions
Original file line numberDiff line numberDiff line change
@@ -1,156 +1,10 @@
1+
This repository contains the base source files and tools for converting
2+
PHP's documentation, written in DocBook XML, into various presentation
3+
formats like HTML and RTF.
14

2-
# Read this first
5+
Documentation for the tools used for building the PHP documentation and
6+
how to contribute to the documentation and translations can be found in
7+
[the `docs` directory](docs/README.md).
38

4-
This directory contains source files and a setup for converting
5-
PHP's XML documentation into presentation formats like HTML and
6-
RTF. You should not have to bother with this unless you are
7-
writing documentation yourself, or if you simply are curious
8-
about how the XML stuff works.
9-
10-
If you just want to read the documentation, look at:
9+
If you just want to read the documentation for PHP, look at:
1110
https://www.php.net/docs.php
12-
13-
# How to write phpdoc files
14-
15-
If you are interested in information about how to
16-
set up the tools needed, how to work with Git and
17-
DocBook on Linux or Windows, or what conventions you
18-
should follow when writing phpdoc files, please refer
19-
to the PHP Documentation HOWTO.
20-
21-
The PHP Documentation uses the [DocBook 5.2](https://tdg.docbook.org/tdg/5.2/) XML schema. \
22-
However, there is one small change between the official Docbook 5.2 schema and the schema used by the PHP documentation:
23-
the `<classsynopsis>` tag allows "One or more Oriented Object Programming inlines",
24-
like the [DocBook 5.1](https://tdg.docbook.org/tdg/5.1/classsynopsis) schema does,
25-
instead of "One Oriented Object Programming inlines".
26-
27-
You can read the HOWTO online at: http://doc.php.net/tutorial/
28-
29-
If you are already working with the phpdoc module,
30-
then you can find its XML source in the howto directory
31-
of the module, and build it yourself with:
32-
33-
```bash
34-
phd -d .manual.xml
35-
```
36-
37-
However, PhD is a separate project which can be read about here:
38-
https://wiki.php.net/doc/phd
39-
40-
## Quick reference
41-
42-
### Source checkout
43-
44-
For a more general git-workflow see [the Wiki](https://wiki.php.net/vcs/gitworkflow#reviewing_and_closing_pull_requests).
45-
Make sure to upload your SSH public key to your account at main.php.net
46-
47-
Check out the sources:
48-
49-
```bash
50-
mkdir phpdoc
51-
cd phpdoc
52-
git clone [email protected]:php/doc-en.git en
53-
git clone [email protected]:php/doc-your-language-of-choice.git your-language-of-choice
54-
git clone [email protected]:php/doc-base.git
55-
```
56-
57-
Change `your-language-of-choice` if you would like to check out a different language.
58-
59-
The `en` folder contains the English DocBook source files, and `doc-base` contains tools
60-
and resources used in all languages.
61-
62-
### Edits
63-
64-
* Make the change. Use spaces not tabs. Be sure to carefully watch your whitespace!
65-
* cd into the desired clone directory, e.g.
66-
```bash
67-
cd en
68-
```
69-
* Look at your unified diff, make sure it looks right and that whitespace changes aren't mixed in:
70-
```bash
71-
git diff path/to/file.xml
72-
```
73-
* Make sure no errors are present, so at the command line in your phpdoc source directory run:
74-
```bash
75-
php ../doc-base/configure.php
76-
```
77-
* If you are translating, remember to add the full Git commit hash of the English file that you are translating
78-
from, to the file's `EN-Revision` comment.
79-
* Commit your changes
80-
```bash
81-
git commit path/to/file.xml
82-
```
83-
84-
Read the HOWTO for more information. After reading the HOWTO,
85-
email the phpdoc mailing list ([email protected]) with questions
86-
and concerns.
87-
88-
### New functions
89-
90-
* Copy an existing XML file or use a skeleton from the HOWTO.
91-
Rename and place it into the appropriate directory.
92-
* Edit. Be sure no leftover text exists. No tabs either.
93-
* If you are translating, remember to add the full Git commit hash of the English
94-
file that you are translating from, to the file's `EN-Revision` comment.
95-
* cd into the desired clone directory, e.g.
96-
```bash
97-
cd en
98-
```
99-
* Now test locally before commit by first running
100-
```bash
101-
php ../doc-base/configure.php
102-
```
103-
* Add the file to your staging area
104-
```bash
105-
git add path/to/yourfile.xml
106-
```
107-
* Commit the file and push it to the git-server
108-
```bash
109-
git commit path/to/yourfile.xml
110-
git push remote your-branch
111-
```
112-
* Open a pull request to the main repository via GitHub
113-
114-
### Some popular tags and entities
115-
116-
<filename> filenames
117-
<constant> constants
118-
<varname> variables
119-
<parameter> a function's parameter/argument
120-
<function> functions, this links to function pages or bolds if
121-
already on the function's page. it also adds ().
122-
123-
<literal> teletype/mono-space font <tt>
124-
<emphasis> italics
125-
<example> see HOWTO, includes many other tags.
126-
<link> internal manual links
127-
<link linkend="language.variables">variables</link>
128-
129-
<link> external links via global.ent
130-
<link xlink:href="&spec.cookies;">mmm cookies</link>
131-
132-
<type> types, this links to the given types manual
133-
page: <type>object</type> -> php.net/types.object
134-
135-
&return.success; see: language-snippets.ent
136-
&true; <constant>TRUE</constant>
137-
&false; <constant>FALSE</constant>
138-
&php.ini; <filename>php.ini</filename>
139-
140-
Be sure to check out [global.ent](entities/global.ent) and
141-
language-snippets.ent (located within each language's repo) for
142-
more information for entities and URLs.
143-
144-
# Quality Assurance Tools (QA Tools)
145-
146-
There are various scripts available to ensure the quality of the documentation
147-
and find issues with it, they are located in the `scripts/qa/` directory.
148-
149-
There might be some more just in `scripts/` but they need to be checked if they
150-
are still relevant and/or given some love.
151-
152-
# Translation Tools
153-
154-
There are also various scripts to ensure the quality and synchrony of
155-
documentation translations, located in the `scripts/translation/` directory.
156-

0 commit comments

Comments
 (0)