We are proud to announce the BrowserCMS 3.5.1/3.5.0 are now available. We released 3.5.0 last week, and then as is to be expected a new version of Rails came out. So today we released 3.5.1 which ensures compatitbility with that version (Rails 3.2.5).
Here are the major features for 3.5.x:
* Improved Attachments
* Mobile Friendly templates
* Rail 3.2 compatibility
* Improved Heroku support
* Each block can now have multiple attachments using different styles.
* Attachments can be defined as one to one (has_attachment :image) or be stored as a collection (has_many_attachments :photos).
* Upgrade migrations are provide to migrate file and data for older projects to the new attachment structure.
* New generators have been provided to create content blocks with the new attachment styles.
The CMS can now be configured to serve mobile optimized content, using a mobile subdomain and smart redirecting based on User Agents.
* Mobile Templates: Each template can have a 'mobile' version, which will be used when users request a mobile version of that page.
* Fallback Templates: Any page which lacks a mobile ready template will use the 'full' desktop template when displayed as mobile.
* Mobile Subdomain: Any requests to the mobile subdomain automatically serve mobile pages. m. is the assumed subdomain.
* Agent Redirection: Users on mobile devices can be automatically redirected to the mobile subdomain. (Handled via Apache User Agent detection.)
* Mobile Site Opt Out: Users on mobile device can opt to be redirected to the desktop site if they want. (Handled via a cookie)
* Mobile caching: The mobile and full sites have their own separate page cache, mean both can be served quickly by Apache.
* View as Mobile: Editors can preview the mobile templates while editing pages in the admin, if a page has a mobile template. Once in 'mobile' mode, all pages should be viewed as mobile until they disable it.
Improved Heroku Support
To better support deploying BrowserCMS to Heroku, we have put together a new guide: https://github.com/browsermedia/browsercms/wiki/Deploying-to-Heroku
which covers what steps are required, as well as some considerations. For example, using Heroku requires storing files on an external service, so we refactored the core CMS and worked on a new Amazon S3 module (bcms_aws_s3) that will integrate with it.
As a side note, the CMS should work with Postgresql as well, based on our testing with Heroku (which uses Postgres by default).
One way to improve the performance of BrowserCMS is to enable X-Sendfile. Used in conjunction with Web servers like Apache and Nginx, X-Sendfile will allow web servers to handle serving files that have been uploaded into the CMS. Web servers are very well optimized for sending static files, and doing so takes load off the Ruby processes reducing bottlenecks.
To enable X-Sendfile in your application, uncomment one of the following two lines depending on which web server you are using.
# In config/environments/production.rb
config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
You will then need to configure your web server to handle X-Sendfile requests. See documentation for [Apache](https://tn123.org/