SilverStripe API docs for the core system in different versions, generated through Doctum.
- The documentation is generated from
git cloned
repositories located indata/
. This folder is created and populated by running theSilverStripe\ApiDocs\Tasks\BuildDocsTask
which is usually run via theSilverStripe\ApiDocs\Build\BuildDocsQueuedJob
queued job. - This will generated a series of static HTML files which are located in the
static
folder in subdirectories that match the major version e.g.static/5
is for CMS 5. These static files are generated as part ofBuildDocsTask
. - Apache will serve these static files when requested by using rules defined in
.htaccess
files in the root,static
andpublic
folders. - The Silverstripe composer requirements are fairly and are the to run queuedjobs, as well as ensure the site will be easily deployable to Silverstripe cloud.
Warning
If you are running this locally with DDEV, make sure you set your docroot
to .
, instead of the public
folder:
ddev config docroot '.' && ddev restart
- Make sure https://github.com/silverstripe/supported-modules has been updated with correct branch mapping and the composer.lock file in this repository has been updated i.e. run
composer update
in the root of this repository. - Add a new major version in the
doctum-conf/doctum.json
file.
- Update the redirections in
public/.htaccess
to the latest major stable version - Update the
DEFAULT_BRANCH
constant inapp/src/Lookup/Lookup.php
to the new stable major version.
The project comes with a simple PHP script to convert PHP symbols (classes, methods, properties) to their URL representations in the API docs, and redirects there.
The lookup is primarily used by doc.silverstripe.org
to drive its custom [api:<symbol-name>]
links in Markdown, without coupling it tightly
to the used API generator URL layout.
q
: (required) Class name, method name (<class>::<method>()
or<class>-><method>()
), as well as property name ((<class>::$<property>
or<class>-><property>
).version
: (optional) Version of the targeted module. Should map to a folder name. Default is defined inapp/src/Lookup/Lookup.php
.module
: (optional) Module name. Should map to a folder name. Defaults to framework.
/search/lookup?q=SilverStripe\ORM\DataObject
: ShowsDataObject
docs in default version of framework/search/lookup?q=SilverStripe\ORM\DataObject::get()&version=4
: ShowsDataObject::get()
docs in4
version of framework/search/lookup?q=SilverStripe\ORM\DataExtension::onBeforeWrite()&version=4
: ShowsSilverStripe\ORM\DataExtension::onBeforeWrite()
docs in (4.x) version of framework
While SilverStripe self-hosts this project, community contributions to the code are very welcome :) Please check out our guide to contributing code on silverstripe.org