gohugoio / hugoBasicExample

MIT License
281 stars 281 forks source link

Separate subtree branches for each theme #3

Closed dato closed 10 years ago

dato commented 10 years ago

Hi—

Providing separate subtree branches for each theme allows to easily integrate one particular theme into a site repository.

Is this something you would consider adding?

spf13 commented 10 years ago

Totally up for doing something like this. Still trying to sort out the best way to do structure the themes. I don't have much experience with subtrees. Reading up on it now.

spf13 commented 10 years ago

@dato After exploring and giving it some thought I think it would be bettter to use submodules inspite of some of the disadvantages of using them.

As I understand it subtrees maintain a completely separate tree (branch) from the origin. This means that changes made here would not be reflected in the original repo and vice versa.

With submodules it would be easy to install all of them with git clone --recursive git://github.com/foo/bar.git

You could also install just a few of them. Additionally you could just install from the origin.

Keeping the origin of a theme and the master repo would be as simple as a PR to change the ref, rather than a tree merge.

Like I said, I don't have a lot of experience with subtrees so please tell me if this makes sense.