Creating own project template, having problems with paths

Hi

I just started using middleman and I got stuck in setting up a project template.
I’ working along the getting started section where it says I can create own templates within ~/.middleman/
I did this by making a copy of the default template under ~/.rvm/gems/ruby-2.1.2/gems/middleman-core-3.3.6/lib/middleman-core/templates/. So I have a folder ~/.middleman/xyz/ and a file ~/.middleman/xyz.rb
I changed the folder names within the xyc.rb config file but there is this line:

template 'shared/config.tt', File.join(location, 'config.rb'), force: options[:force]

I don’t know how to change it so that the template file shared/config.tt is found.
If I run middleman init new-project --template=xyz the file config.rb is missign in the output directory, of course.

In general I’d like to know more about a good way to create templates. I looked at other templates within the middleman directory but they are different to the default template shipping with middleman. There is also a local template which gatters the content of the ~/.middleman folder. But what exactly should go into this folder?

Thanks, sthag