2012-09-09 08:19:14 +02:00
|
|
|
# doc.silverstripe.org
|
2012-09-05 08:50:25 +02:00
|
|
|
|
2012-09-09 08:19:14 +02:00
|
|
|
This is the source code powering http://doc.silverstripe.org. It primarily
|
2012-11-09 23:52:40 +01:00
|
|
|
consists of the SilverStripe framework and [docsviewer](https://github.com/silverstripe/silverstripe-docsviewer)
|
|
|
|
module with minimal configuration.
|
2012-09-05 08:50:25 +02:00
|
|
|
|
2012-11-09 23:52:40 +01:00
|
|
|
For adding functionality or editing the style of the documentation see the
|
|
|
|
[docsviewer](http://github.com/silverstripe/silverstripe-docsviewer) module.
|
2012-09-05 08:50:25 +02:00
|
|
|
|
2012-09-09 08:19:14 +02:00
|
|
|
## Development
|
2012-09-05 08:50:25 +02:00
|
|
|
|
|
|
|
To set up a test instance:
|
|
|
|
|
|
|
|
* Clone this repository to a LAMP server.
|
2012-11-09 23:52:40 +01:00
|
|
|
* Install [Composer](http://doc.silverstripe.org/framework/en/installation/composer)
|
|
|
|
* After installing composer run `composer install --prefer-source` to grab the modules.
|
2012-09-09 08:19:14 +02:00
|
|
|
* Run "make update" to check out the repositories from which is builds the
|
|
|
|
docs (this will take a while the first time)
|
2012-09-05 08:50:25 +02:00
|
|
|
|
2012-09-09 08:19:14 +02:00
|
|
|
## Source Documentation Files
|
|
|
|
|
|
|
|
Documentation for each module is stored on the filesystem via a full git clone
|
|
|
|
of the module to the `src/` subdirectory in this project. These checkouts are
|
|
|
|
ignored from this repository to allow for easier updating and to keep this
|
|
|
|
project small.
|
|
|
|
|
|
|
|
To update or download the source documentation at any time run the following
|
|
|
|
make command in your terminal:
|
|
|
|
|
|
|
|
cd /Sites/doc.silverstripe.org/
|
|
|
|
make fetch
|
|
|
|
|
|
|
|
`make fetch` will call bin/update.sh to download / update each module as listed
|
|
|
|
in the bin/update.sh file.
|
|
|
|
|
|
|
|
Once the `make fetch` command has executed and downloaded the latest files,
|
|
|
|
those files are registered along with the module version the folder relates to.
|
2014-09-20 04:12:39 +02:00
|
|
|
through the `app/docsviewer.yml` file.
|
2012-09-09 08:19:14 +02:00
|
|
|
|
|
|
|
## Contribution
|
|
|
|
|
|
|
|
To contribute an improvement to the doc.silverstripe.org functionality or
|
|
|
|
theme, submit a pull request on GitHub. Any approved pull requests will make
|
|
|
|
their way onto the doc.silverstripe.org site in the next release.
|
|
|
|
|
|
|
|
The content for doc.silverstripe.org is stored in the modules repository inside
|
|
|
|
a "docs" folder (for example, the framework documentation is stored at
|
2013-07-21 09:35:40 +02:00
|
|
|
[github.com/silverstripe/sapphire](https://github.com/silverstripe/sapphire/tree/master/docs)).
|
2012-09-09 08:19:14 +02:00
|
|
|
|
|
|
|
If you wish to edit the documentation content, submit a pull request on that
|
|
|
|
Github project. Updates to the content are synced regularly with
|
|
|
|
docs.silverstripe.org via a cron job.
|
|
|
|
|
|
|
|
## Cron job
|
|
|
|
|
|
|
|
The cron job keeps doc.silverstripe.org up to date with the latest code. This
|
|
|
|
cron task calls `make update`, a script that fetches the latest documentation
|
|
|
|
for each module from git and rebuilds the search indexes.
|
|
|
|
|
|
|
|
05 * * * * sites make -f /sites/ss2doc-v2/www/Makefile -C /sites/ss2doc-v2/www update
|
|
|
|
|
|
|
|
## Legacy Dokuwiki
|
|
|
|
|
|
|
|
We assume that DokuWiki (which ran the original doc.silverstripe.org) is
|
|
|
|
served on the same webserver from a different webroot, that's symlinked in
|
|
|
|
under the URL http://doc.silverstripe.org/old.
|
|
|
|
|
|
|
|
ln -s /sites/ss2doc/www /sites/ss2doc-v2/www/old
|