6.7 KiB
title: Documentation summary: Developer and CMS User Help Documentation.
Contributing Documentation
Documentation for a software project is a continued and collaborative effort, we encourage everybody to contribute, from simply fixing spelling mistakes, to writing recipes, reviewing existing documentation, and translating the whole thing.
Modifying documentation requires basic PHPDoc and Markdown knowledge, and a GitHub user account.
Editing online
The easiest way of making a change to the documentation is by clicking the "Edit this page" link at the bottom of the page you want to edit. Alternativly, you can find the appropriate .md file in the github.com/silverstripe/silverstripe-framework repository and press the "edit" button. You will need a free GitHub account to do this.
- After you have made your change, describe it in the "commit summary" and "extended description" fields below, and press "Commit Changes".
- After that you will see form to submit a Pull Request. You should just be able to submit the form, and your changes will be sent to the core team for approval.
Editing on your computer
If you prefer to edit the content on your local machine, you can "fork" the github.com/silverstripe/silverstripe-framework and github.com/silverstripe/silverstripe-cms repositories and send us "pull requests". If you have downloaded SilverStripe or a module, chances are that you already have these repositories on your machine.
The documentation is kept alongside the source code in the docs/
subfolder of any SilverStripe module, framework or
CMS folder.
Repositories
- End-user: userhelp.silverstripe.org.
- Developer Guides: doc.silverstripe.org.
- Developer API Docuumentation: api.silverstripe.org.
Source Control
In order to balance editorial control with effective collaboration, we keep documentation alongside the module source
code, e.g. in framework/docs/
, or as code comments within PHP code. Contributing documentation is the same process as
providing any other patch (see Contributing code).
What to write
See What to write (jacobian.org) for an excellent introduction to the different types of documentation, and Producing OSS: "Documentation" for good rules of thumb for documenting open source software.
Structure
- Keep documentation lines to 120 characters.
- Don't duplicate: Search for existing places to put your documentation. Do you really require a new page, or just a new paragraph of text somewhere?
- Use PHPDoc in source code: Leave lowlevel technical documentation to code comments within PHP, in PHPDoc format.
- API and Developer Guides complement each other: Both forms of documenting source code (API and Developer Guides) are valuable resources.
- Provide context: Give API documentation the "bigger picture" by referring to Developer Guides inside your PHPDoc.
- Make your documentation findable: Documentation lives by interlinking content, so please make sure your contribution doesn't become an
inaccessible island. Your page should at least be linked on the index page in the same folder. It can also appear
as "related content" on other resource (e.g.
/topics/search
might link tohowto/search-dataobjects
).
Writing Style
- Write in second plural form: Use "we" instead of "I". It gives the text an instructive and collaborative style.
- It's okay to address the reader: For example "First you'll install a webserver" is good style.
- Write in an active and direct voice.
- Mark up correctly: Use preformatted text, emphasis and bold to make technical writing more "scannable".
- Avoid FAQs: FAQs are not a replacement of a coherent, well explained documentation. If you've done a good job documenting, there shouldn't be any "frequently asked questions" left ;)
Highlighted blocks
There are several built-in block styles for highlighting a paragraph of text. Please use these graphical elements sparingly.
Code:
<div class="hint" markdown='1'>
...
</div>
Code:
<div class="notice" markdown='1'>
...
</div>
Code:
<div class="warning" markdown='1'>
...
</div>
See Markdown Extra Documentation for more restriction on placing HTML blocks inside Markdown.
Translating Documentation
Documentation is kept alongside the source code, typically in a module subdirectory like framework/docs/en/
. Each
language has its own subfolder, which can duplicate parts or the whole body of documentation. German documentation
would for example live in framework/docs/de/
. The
docsviewer module that drives
doc.silverstripe.org automatically resolves these subfolders into a language dropdown.