Contribute to Website
The source code for doctrine-project.org is completely open source and easy for you to setup locally so you can submit contributions back to the project.
First, create a fork of the repository
and clone it to a directory like
$ cd /data $ git clone [email protected]:username/doctrine-website.git
composer install to install all of the dependencies.
$ cd doctrine-website $ composer install
pre-commit hook to
.git/hooks/pre-commit to ensure
coding standards are maintained:
$ cp pre-commit .git/hooks/pre-commit
app/config/local.yml.dist config file that came with the repository:
$ cp app/config/local.yml.dist app/config/local.yml
Edit your Hosts File
/etc/hosts file and point
lcl.doctrine-project.org at your
local web server. You will need to setup a virtual host in your web server
and point the root directory at
Now are you ready to start building the website! First, build the
documentation with the
This command will clone all the repositories for the documentation and
switch to the appropriate branches for each version of a project when
you pass the
$ ./doctrine build-docs --sync-git
By default only the RST docs are built. You need to pass the
option to also generate the API docs:
$ ./doctrine build-docs --sync-git --api
We use Sami for generating the PHP API documentation for each project.
To build the Algolia search indexes pass the
$ ./doctrine build-docs --sync-git --search
You will need to have the
doctrine.search.algolia.admin_api_key parameter in
app/config/local.yml in order to update the Algolia search indexes.
Build the Website
Now you are ready to build the website for the first time:
$ ./doctrine build-website
Go take a look at
lcl.doctrine-project.org and the local website should render.
The built code for the website is written to
Watch for Changes
You can watch for changes in the source code and automatically build the website:
$ ./doctrine watch
The browser will automatically refresh after the build finishes.
Submitting Pull Requests
If you see something that could be improved or a bug that needs fixing, submit a pull request with the changes to doctrine/doctrine-website.
You can also take a look at the list of open issues on GitHub and look for something that needs help.