The Sourcebo Content Repository
The Sourcebo content repository stores all the information used to create a projects web presence. This includes downloadable files in the download area, online documentation, news articles, and the title and description of the project.
Like everything in Sourcebo, the content repository is a Subversion repository. Changes committed to the repository make their way to the project's web pages. The trunk of the content repository is what eventually appears on the website. Anything that exists in the branches or tags portion of the content repository is safely stored, but will not be used to create web content.
To check out the content repository, you can use a command like:
svn co http://myserver.mydomain.com/projects/myproject/content/trunk myproject-content
This will check the trunk of the content repository out in the local directory myproject-content.
Layout of the Content Repository
The content repository has a special layout. Underneath the trunk of the repository there are four directories: home, files, documentation, and news. These directories are created by Sourcebo at project creation time.
The home directory contains the configuration for the project, including the project's title, description, and license. It also allows the developers to add some free-form HTML to the project's main page. More information about the files in the home directory exists on the ContentProject page.
The files directory contains the download area. Files checked in under the files directory can be made visible in the download area for everyone to see. The ContentFiles page describes how to manage the download area.
The documentation directory is very similar to the files directory, except that it stores the project's online documentation. Information on managing the documentation directory is on the ContentDocumentation page.
Finally, the news directory contains news articles about the project. Developers can add articles whenever they want, though usually release announcements make up the majority of the news. The ContentNews page describes the news directory.
How Content Gets Online
There are three steps to getting new content on to the website: committing, staging, and propagation. The commit is triggered by a developer, of course. The rest is handled by Sourcebo.
Committing content is exactly what you would expect. A developer makes modifications to the content tree and then runs svn commit. Subversion transmits the changes back to the content repository. A hook in the content repository triggers the rest of the process. A copy of the content repository is updated on the server, thus copying new downloads and documentation where they can be accessed.
However, the new content does not appear on the website.
Humans are prone to mistakes. A new page of documentation can have an error. A download file could be packed wrong. The hope is that these simple problems are fixed before they are publically visible. Enter the "staging" process.
When a change is committed to the content repository, Sourcebo immediately regenerates all the web pages for the project. These regenerated pages contain all the new information. These new pages do not yet replace the existing web pages. Instead, they are copied to the staging area. The staging area, predictably, exists in the staging/ subdirectory of the project's web tree. A project at the URL http://myserver.mydomain.com/projects/myproject/ has a staging area at the URL http://myserver.mydomain.com/projects/myproject/staging/. All changes to the content repository show up in the staging area immediately. Well, almost immediately. If the content change is large (say, a 100M file is added to the download area), it will take a short while for the file copy to occur. But new pages appear in the staging area as soon as they are ready.
All content appears in the staging area, including documentation, downloads, and news. The developers can check the staging area to ensure the content update is correct. If they see any problems, they have ten minutes to fix them before the changes go live. Every time a commit is made to the content repository, that ten minute timer is reset. New content lives in the staging area until ten whole minutes have passed without any more commits.
If ten minutes pass without any additional changes and commits, Sourcebo propagates the new content to the project's main location (http://myserver.mydomain.com/projects/myproject/ in our example). The new content is now live.