{"id":8005,"date":"2015-11-20T05:20:22","date_gmt":"2015-11-20T05:20:22","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/11\/20\/not-able-to-add-custom-template-files-in-gitbook-themes-open-source-projects-gitbookio-gitbook\/"},"modified":"2022-08-30T15:03:04","modified_gmt":"2022-08-30T15:03:04","slug":"not-able-to-add-custom-template-files-in-gitbook-themes-open-source-projects-gitbookio-gitbook","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/11\/20\/not-able-to-add-custom-template-files-in-gitbook-themes-open-source-projects-gitbookio-gitbook\/","title":{"rendered":"not able to add custom template files in gitbook themes-open source projects GitbookIO\/gitbook"},"content":{"rendered":"<p>I am trying to create a custom gitbook theme and in that I also want to change the layout so that the book I create using the theme have the layout that I want. I copied the default templates dir in my assests dir of the custom theme and then modified the layout.html and header.html files as I wanted. Then to include the modified template files, I added the following attribute to the index.js file<\/p>\n<pre><code>module.exports = {\n    book: {\n        assets: \".\/assests\",\n        templates: {\n            \"layout\":\"templates\/layout.html\",\n            \"header\":\"templates\/includes\/book\/header.html\",\n        },\n......\n......\n<\/code><\/pre>\n<p>However with this configuration, the generated book is not picking the template file changes. However I do see the css\/js changes that I had done.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am trying to create a custom gitbook theme and in that I also want to change the layout so that the book I create using the theme have the layout that I want. I copied the default templates dir in my assests dir of the custom theme and then modified the layout.html and header.html [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8005","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8005","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=8005"}],"version-history":[{"count":1,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8005\/revisions"}],"predecessor-version":[{"id":8705,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8005\/revisions\/8705"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=8005"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=8005"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=8005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}