div
Version:
Website Builder
46 lines (43 loc) • 1.12 kB
JavaScript
//********* */
//
// Add your template to the templates array below.
//
// Add the slug which will be the name the user types at the end of
// the static new command. For example, if the slug is "blog" then
// the user will type "static new my-blog --blog" to create a new
// site using the blog template.
//
// Then add the repo which is the github repo URL
//
//********** */
const templates = [{
slug: 'welcome',
repo: 'https://github.com/projectdiv/template-welcome'
},
{
slug: 'aria',
repo: 'https://github.com/static-templates/aria'
},
{
slug: 'boxed',
repo: 'https://github.com/static-templates/boxed'
},
{
slug: 'blog',
repo: 'https://github.com/static-templates/blog'
},
{
slug: 'stone',
repo: 'https://github.com/static-templates/stone'
}
];
module.exports = {
get(template_slug) {
for (let i = 0; i < templates.length; i++) {
if (templates[i].slug == template_slug) {
return templates[i];
}
}
return templates[0];
}
}