maned / goblin

A Content Management System Built in Pure Javascript
http://goblin.jit.su/
19 stars 13 forks source link

Mutiple Themes #70

Open PunkChameleon opened 10 years ago

PunkChameleon commented 10 years ago

One large limitation of the current build is that only one theme is allowed at the time.

It would be great to re-architect the theme system to be much more modular, so users can host, add, remove and switch between many themes (think Wordpress).

Any thoughts? This would be fairly large effort-wise.

SotiriosVrachas commented 10 years ago

this can be done by changing mu.root = path.join(__dirname, '../theme'); to

mu.root = path.join(__dirname, '../themes/'+db.get('theme', function (res) {
    return(res.theme)
);

in goblin.js and of course having a theme key in the database with the value editable by admin