SilverStripe API docs for the core system in different versions, generated through Doctum.
- The documentation is generated from
git clonedrepositories located indata/. This folder is created and populated by running theSilverStripe\ApiDocs\Tasks\BuildDocsTaskwhich is usually run via theSilverStripe\ApiDocs\Build\BuildDocsQueuedJobqueued job. - This will generated a series of static HTML files which are located in the
staticfolder in subdirectories that match the major version e.g.static/5is for CMS 5. These static files are generated as part ofBuildDocsTask. - Apache will serve these static files when requested by using rules defined in
.htaccessfiles in the root,staticandpublicfolders. - 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 updatein the root of this repository. - Add a new major version in the
doctum-conf/doctum.jsonfile.
- Update the redirections in
public/.htaccessto the latest major stable version - Update the
DEFAULT_BRANCHconstant inapp/src/Lookup/Lookup.phpto 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: ShowsDataObjectdocs in default version of framework/search/lookup?q=SilverStripe\ORM\DataObject::get()&version=4: ShowsDataObject::get()docs in4version 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