This is the next incarnation of the Zend Framework website, written using ZF2.
First step is grabbing dependencies. Run the following:
php composer.phar install
At that point, you can test with the built-in webserver of PHP 5.4:
cd public php -S localhost:8080
Alternately, configure a virtual host in the webserver of your choice.
To update the site to include a new release, do the following:
make all VERSION=X.Y.Z
This will update the homepage, changelogs, and download pages, and ensure that the manual and apidoc version mappings are correct.
If the release date is other than the current date, you can also add a
RELEASE_DATE variable on the commandline, in the format "YYYY-MM-DD".
The template for the homepage is kept in
data/homepage.phtml; if you need to
make any additions or changes to it, please do so in that file.
To regenerate the homepage from the template -- for instance, to bring in the latest blog and security posts, run the following:
Don't forget to commit the modified homepage view script when done!
To configure the Reference Guide of ZF1 and ZF2, edit the file
config/autoload/module.manual.global.php and modify the variables named
Each path is related to a specific language and version of the reference guide. For instance, the English version of the 2.0 documentation is represented by:
'zf_document_path' => array( '2.0' => array ( 'en' => 'path to /zf2-documentation/docs/_build/html/' ) )
The path of ZF2 documentation must point to the contents of a documenation build
folder, generally found in
docs/_build/html/ of the zf2-documentation project;
if you use the documentation distribution archives, you would simply point to
the directory in which you unpack the archive. The configuration paths must
end with the
/ (slash) character.
The path of the ZF1 documentation must point to the folder
views/manual/$VERSION/$LANG/ of the
git://git.zendframework.com/zfweb-manual.git project, where
the version of Zend Framework, and
$LANG is the language. As with the ZF2
configuration, the path must end with the
/ (slash) character.
Want to post something on the blog?
Create a post in
data/posts that returns a
(you can use an existing post as a template). Then, simply send a pull request,
and we'll review for inclusion.
To compile the blog, do the following from the root of the application:
% php public/index.php blog compile -e -c -r
Then add and commit the new and updated files.
To add a new version to the changelog, execute the following:
php public/index.php changelog fetch --version=X.Y.Z
This will, by default, write to either
data/zf2-changelog.php. If generating a changelog for a version prior to
1.12.4, you will need to ensure your local configuration includes appropriate
Make changes to the
.scss files under
public/css/scss/, and then compile
them. To compile them, first ensure you have Sass installed:
% sudo gem install sass
% sudo gem install bourbon
Once you have, you can compile the CSS using the following:
% cd public/css % sass scss/app.scss:app.min.css --style compressed
This will also generate a
public/css/.sass-cache directory; do not commit
this when you commit your changes.