I am also currently working on an almost similar requirement like you. I am also trying to create a CMS for users to add pages, style them, etc.
My approach is as follows
Each user will have their own subdomain. (I use before_filter to get the subdomain of current users and load his / her site)
About style, I prefer to have a stylesheet as a physical file. Given that your method will have great flexibility in editing the stylesheet, I don't like the idea of โโhaving the stylesheet code on top of my page. Insted, I allow users to upload their styles (Using a paper clip)
So, when the site loads, I get the css paths from the database and load the stylesheet from the path.
Later I plan to read the file and upload it to the text box so that users can edit their stylesheets and override the existing file when saving;
For layouts I also use liquid
amuses
Sameera
source share