From 5d6a3b23d5aa8e5fdd6e2df5203cfb843c9dbd37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Val=C3=A9rio?= Date: Fri, 28 Jul 2023 19:15:18 +0100 Subject: [PATCH] Update instructions for using different templates --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5631772..605b2ae 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,18 @@ This ends up being specially useful for communities, in order to follow the work ## Customize the generated HTML Each community has its own identity, so you should be able to easily customize the look and feel -of the generated page. To do so, before publishing you can edit the `templates/default.handlebars` file. +of the generated page. To do so, before publishing you can edit one of the existing templates in the `templates` folder. -After you should "precompile" that file using the following command: +After, you should "precompile" that file using the following command: > \$ npm run template -- templates/default.handlebars -f templates/default.precompiled.js + +If the template name you are using is different from `default`, you should change the following 2 lines in `index.js`: + +```javascript +import template from './templates/default.precompiled' +``` + +```javascript +let template = Handlebars.templates['default'] +```