I have been spending about one week thinking about how I should structure the templates and the themes, so you can build themes for WP, Drupal … with only one Html theme.
“It’s the hardest part” my mentor said. And if you can solve that problem, the rest will be easier.
At first I tried to find a “clean way”. I think it’s hard at the moment so I have just changed my mind. I seperate a theme into many parts like hearder, navbar, footer … like the current Neverland does. I have a folder called
architect and I put skeleton files in here. When an user want to make a new theme, they can run a command like
node neverland new theme.
And the flow is: you run
build command, it calls the
architect reads the blueprints, and tell the workers how to build, and finally put the results in building folders.
During the creation of
neverland command, I found an interesting node package https://github.com/dthree/vorpal . It’s useful for making command line tool.
It’s for this week.