com web/doc: Various updates for 'Setting up Documentation environment' tutorial: tutorial/local-setup.md

[email protected] (Maciej Sobaczewski) Wed, 14 Dec 2016 21:01:18 +0000
Newsgroups php.doc.web
Message-ID <[email protected]>
Commit:    f4aa155a0ea348133b879459e2b613c1f12441c5=0AAuthor:    Sobak <mso=
[email protected]>         Wed, 14 Dec 2016 22:01:18 +0100=0AParents:   1=
37310a24ae0386f739f763d3a37cfcfe320794e=0ABranches:  master=0A=0ALink:     =
  http://git.php.net/?p=3Dweb/doc.git;a=3Dcommitdiff;h=3Df4aa155a0ea348133b=
879459e2b613c1f12441c5=0A=0ALog:=0AVarious updates for 'Setting up Document=
ation environment' tutorial=0A=0AChanged paths:=0A  M  tutorial/local-setup=
.md=0A=0A=0ADiff:=0Adiff --git a/tutorial/local-setup.md b/tutorial/local-s=
etup.md=0Aindex e4675c9..f81693a 100644=0A--- a/tutorial/local-setup.md=0A+=
++ b/tutorial/local-setup.md=0A@@ -7,18 +7,13 @@ The following is one route=
, and it assumes:=0A - PHP 5.4+ is available=0A - Git control version syste=
m is available=0A - A basic level of shell/terminal usage, or know that she=
ll commands follow a `$` below=0A-- A desire to build and display the docum=
entation locally=0A-- Your PHP Documentation path will be: `/tmp/svn/doc-en=
` (change this no doubt)=0A-- Your local mirror path will be: `/home/sites/=
myphpnet/` (change this no doubt)=0A-- You are using Linux or a Mac (@todo =
Make this guide Windows friendly)=0A-- You'll replace `path/to/phd/` with y=
our actual path=0A =0A If you're interested in simply setting up a local PH=
P mirror (and NOT build the documentation) then=0A please follow the php.ne=
t [mirroring guidelines](http://php.net/mirroring) and ignore this document=
.=0A =0A ## Checkout the php documentation from SVN=0A-*Assumptions*: This =
assumes using /tmp as the root directory, and checkout of the English langu=
age.=0A-Adjust accordingly.=0A+**Assumptions**: This assumes using `/tmp` a=
s the root directory, and checkout of the English language.=0A+Adjust accor=
dingly, including paths, especially if you are on Windows.=0A =0A ```=0A $ =
mkdir /tmp/svn=0A@@ -40,16 +35,16 @@ PDF, Man, Epub, and others, including =
PHP which is what we use at php.net.=0A =0A ### Install PhD=0A ```=0A-$ cd =
path/to/phd/=0A+$ cd /tmp=0A $ git clone http://git.php.net/repository/phd.=
git=0A-$ php path/to/phd/render.php --help=0A+$ php phd/render.php --help=
=0A ```=0A =0A ### Use PhD to build the documentation=0A ```=0A $ cd /tmp/s=
vn/doc-en=0A $ php doc-base/configure.php=0A-$ php path/to/phd/render.php -=
-docbook /tmp/svn/doc-en/doc-base/.manual.xml --package PHP --format php --=
output mydocs=0A+$ php /tmp/phd/render.php --docbook /tmp/svn/doc-en/doc-ba=
se/.manual.xml --package PHP --format php=0A $ cd /tmp/svn/doc-en/mydocs/ph=
p-web/=0A ```=0A =0A@@ -62,8 +57,9 @@ Alternative: The XHTML format is simp=
le and does not require mirroring the php.n=0A website. The following build=
s manual pages as plain HTML files:=0A ```=0A $ cd /tmp/svn/doc-en=0A-$ php=
 path/to/phd/render.php --docbook /tmp/svn/doc-en/doc-base/.manual.xml --pa=
ckage PHP --format xhtml --output mydocs=0A-$ cd /tmp/svn/doc-en/mydocs/php=
-chunked-xhtml/=0A+$ php doc-base/confugre.php=0A+$ php /tmp/phd/render.php=
 --docbook /tmp/svn/doc-en/doc-base/.manual.xml --package PHP --format xhtm=
l=0A+$ cd /tmp/phd/output/php-chunked-xhtml/=0A $ open function.strlen.html=
=0A ```=0A =0A@@ -75,7 +71,15 @@ $ git clone http://git.php.net/repository/=
web/php.git /home/sites/myphpnet/=0A =0A ### Symlink (or move) the generate=
d PHP documentation to your local php.net sources=0A ```=0A-$ ln -s /tmp/sv=
n/doc-en/mydocs/php-web /home/sites/myphpnet/manual/en=0A+$ ln -s /tmp/phd/=
output/php-web /home/sites/myphpnet/manual/en=0A+```=0A+=0A+Symlinking can =
still be done on Windows. Just make sure you run `cmd` *as Administrator*.=
=0A+=0A+```=0A+$ cd \home\sites\myphpnet\manual\=0A+$ rmdir /S en=0A+$ mkli=
nk /J \tmp\phd\output\web-php en=0A ```=0A =0A ### Run a webserver=0A@@ -83=
,8 +87,8 @@ We are going to use PHP's built-in web server. Please open anot=
her terminal inst=0A =0A ```=0A $ cd /home/sites/myphpnet/=0A-$ php -S 0.0.=
0.0:4000=0A+$ php -S localhost:8080=0A ```=0A =0A ## View the new site=0A-O=
pen [http://localhost:4000/manual/en/](http://localhost:4000/manual/en/) in=
 your browser.=0A+Open [http://localhost:8080/manual/en/](http://localhost:=
8080/manual/en/) in your browser.=0A