开发者

Multiple sites based on common foundation

开发者 https://www.devze.com 2022-12-18 07:57 出处:网络
I\'m working on a project that will be a base site for multiple other sites. Most of the core fu开发者_高级运维nctionality will be the same so I don\'t want to maintain the same code all over the plac

I'm working on a project that will be a base site for multiple other sites. Most of the core fu开发者_高级运维nctionality will be the same so I don't want to maintain the same code all over the place and I'm wondering how best to do this.

Currently I have the "core" site in its own repo and then I just clone from that to make a new site. I can continue customizing and committing on the cloned repo just fine and even pull in updates from the core when I change it but it complains that the repos are out of sync.

Is this how most people do this and should I just ignore those messages?


You could try to use git submodules (http://git-scm.com/docs/git-submodule). You'd have to still split up the code into different directories, but as long as ruby can integrate them correctly, you'll be fine.

Interleaving the files will be much more difficult, your best bet there would be to keep separate branches for each customization and merge from master into each site branch regularly.


This has been solved in many different ways, depending on the language and build systems. In java you have modularity provided by jars, taglibs and other mechanisms.
What language are you developing in, and how does it handle things like that?
If you're using straight html, and nothing else... good luck :)

0

精彩评论

暂无评论...
验证码 换一张
取 消