Go to file
Cam Findlay 2f29194db9 Merge pull request #129 from SpiritLevel/markdown-refresh
ENHANCEMENT Add dev flag to keep full git repositories to enable local development
2016-03-29 09:22:41 +13:00
app add dev flag to keep full git repositories to enable local development 2016-03-28 01:03:03 -06:00
themes/docs added feedback form styles to site 2016-02-16 16:11:27 +13:00
.editorconfig Added EditorConfig for coding convention consistency. 2015-01-20 10:06:14 +13:00
.gitignore Adding quickfeedback form 2016-02-16 11:00:18 +13:00
.htaccess FIX Redirect older legacy links to the canonical docs.silverstripe.org 2016-02-25 11:43:48 +13:00
README.md add dev flag to keep full git repositories to enable local development 2016-03-28 01:03:03 -06:00
composer.json Update to feedback module + core update 2016-02-29 16:18:25 +13:00
composer.lock Update core 3.3.1 and docsviewer 1.4 2016-03-02 15:56:55 +13:00
favicon.ico organised favicons 2015-11-26 10:35:23 +13:00
google9d5116bbb46f4c16.html Added Google Webmaster Tools verification 2013-09-06 20:53:22 +02:00
phpunit.xml.dist Updated PHPUnit default file 2013-05-29 18:08:35 +02:00
robots.txt added crontask and updatetask buildtask as per userhelp, repositories yml, updated robots file, removed update shell script 2016-02-11 14:16:18 +13:00

README.md

doc.silverstripe.org

This repository contains the source code powering SilverStripe's developer documentation website https://docs.silverstripe.org.

The source code here consists primarily of the SilverStripe framework and the docsviewer module with minimal configuration.

This repository does not contain the most current documentation files.

The most current documentation files are not stored here but instead are stored in each framework repository within a docs folder. For example, the documentation for the master branch of the SilverStripe framework is stored in https://github.com/silverstripe/silverstripe-framework/tree/master/docs. As described below in the Installation section, one must first obtain and re-index fresh versions of the documentation files from the framework repositories before being able to view the latest content.

For adding functionality or editing the style of the documentation, see the docsviewer module.

Installation

To set up a local instance of doc.silverstripe.org:

  • Install Composer.
  • Install sake.
  • Clone this repository to a LAMP server. For example, the command
   git clone https://github.com/silverstripe/doc.silverstripe.org path/to/webroot/ssdocs

will clone this repository into path/to/webroot/ssdocs.

  • From within path/to/webroot/ssdocs, run the command
   composer install --prefer-source

to grab the modules, in particular, the docsviewer module.

  • From within path/to/webroot/ssdocs, run the command
sake dev/tasks/RefreshMarkdownTask flush=1

to get the latest documentation source markdown files. If you are interested in contributing, instead use the command

   sake dev/tasks/RefreshMarkdownTask flush=1 dev=1

to get the full git repositories.

  • From within path/to/webroot/ssdocs, run the command
   sake dev/tasks/RebuildLuceneDocsIndex flush=1

to re-index the latest documentation source markdown files. Note: re-indexing will take some time.

  • Make sure to flush the cache for markdown content to show up.

Automation

Refreshing and re-indexing the documentation markdown files can be automated. From within path/to/webroot/ssdocs, run the command:

   sake dev/tasks/UpdateDocsCronTask

The cron job UpdateDocsCronTask runs the RefreshMarkdownTask and RebuildLuceneDocsIndex tasks every day at 8PM. This can be altered by editing UpdateDocsCronTask.php and changing the scheduling function:

   public function getSchedule() {
      return "0 20 * * *"; // runs process() function every day at 8PM
   }

Contribution

To contribute an improvement to the https://docs.silverstripe.org functionality or theme, submit a pull request on GitHub. Any approved pull requests will make their way onto the https://docs.silverstripe.org site in the next release.

If you wish to edit the documentation content, submit a pull request on that Github project. Updated documentation content is regularly uploaded to https://docs.silverstripe.org via a cron job.

If you are adding a new version of the documentation, you must register it in both app/_config/docs-repositories.yml and app/_config/docsviewer.yml. To set one particular version to be the current stable version, set Stable: true in app/_config/docsviewer.yml. Remove the Stable: true setting for all versions that are not stable.

Deployment

Deployment is via the SilverStripe Platform deployment tool and uses StackShare.