{"componentChunkName":"component---src-templates-post-js","path":"/themes/","result":{"data":{"ghostPost":{"id":"Ghost__Post__5e4273e3a39bbf003852639d","title":"Creating a custom theme","slug":"themes","featured":false,"feature_image":"https://static.ghost.org/v3.0.0/images/creating-a-custom-theme.png","excerpt":"Ghost comes with a beautiful default theme designed for publishers which can easily be adapted for most purposes, or you can build a custom theme to suit your needs.","custom_excerpt":"Ghost comes with a beautiful default theme designed for publishers which can easily be adapted for most purposes, or you can build a custom theme to suit your needs.","visibility":"public","created_at_pretty":"11 February, 2020","published_at_pretty":"11 January, 2019","updated_at_pretty":"11 February, 2020","created_at":"2020-02-11T09:21:43.000+00:00","published_at":"2019-01-11T09:21:00.000+00:00","updated_at":"2020-02-11T09:36:40.000+00:00","meta_title":null,"meta_description":null,"og_description":null,"og_image":null,"og_title":null,"twitter_description":null,"twitter_image":null,"twitter_title":null,"authors":[{"name":"Ghost","slug":"ghost","bio":"You can delete this user to remove all the welcome posts","profile_image":"https://static.ghost.org/v2.0.0/images/ghost.png","twitter":"@tryghost","facebook":"ghost","website":"https://ghost.org"}],"primary_author":{"name":"Ghost","slug":"ghost","bio":"You can delete this user to remove all the welcome posts","profile_image":"https://static.ghost.org/v2.0.0/images/ghost.png","twitter":"@tryghost","facebook":"ghost","website":"https://ghost.org"},"primary_tag":{"name":"Getting Started","slug":"getting-started","description":null,"feature_image":null,"meta_description":null,"meta_title":null,"visibility":"public"},"tags":[{"name":"Getting Started","slug":"getting-started","description":null,"feature_image":null,"meta_description":null,"meta_title":null,"visibility":"public"}],"plaintext":"Ghost themes\nGhost comes with a default theme called Casper, which is designed to be a clean,\nreadable publication layout and can be easily adapted for most purposes.\n\nIf you need something a little more customised, it's entirely possible to build\non top of existing open source themes, or to build your own from scratch. Rather\nthan giving you a few basic settings which act as a poor proxy for code, we just\nlet you write code.\n\nMarketplace\nThere are a huge range of both free and premium pre-built themes which you can\ndownload from the Ghost Theme Marketplace [https://ghost.org/marketplace/]:\n\nAnyone can write a completely custom Ghost theme with some solid knowledge of\nHTML and CSSTheme development\nGhost themes are written with a templating language called handlebars, which has\na set of dynamic helpers to insert your data into template files. For example: \n{{author.name}} outputs the name of the current author.\n\nThe best way to learn how to write your own Ghost theme is to have a look at \nthe\nsource code for Casper [https://github.com/TryGhost/Casper], which is heavily\ncommented and should give you a sense of how everything fits together.\n\n\n * default.hbs is the main template file, all contexts will load inside this\n   file unless specifically told to use a different template.\n * post.hbs is the file used in the context of viewing a post.\n * index.hbs is the file used in the context of viewing the home page.\n * and so on\n\nWe've got full and extensive theme documentation\n[https://ghost.org/docs/api/handlebars-themes/] which outlines every template\nfile, context and helper that you can use. You can also get started with our\nuseful starter theme [https://github.com/TryGhost/Starter/], which includes the\nmost common foundations and components required to build your own theme.\n\n> If you want to chat with other people making Ghost themes to get any advice or\nhelp, there's also a themes section on our public Ghost forum\n[https://forum.ghost.org/c/themes].","html":"<h2 id=\"ghost-themes\">Ghost themes</h2><p>Ghost comes with a default theme called Casper, which is designed to be a clean, readable publication layout and can be easily adapted for most purposes.</p><p>If you need something a little more customised, it's entirely possible to build on top of existing open source themes, or to build your own from scratch. Rather than giving you a few basic settings which act as a poor proxy for code, we just let you write code.</p><h2 id=\"marketplace\">Marketplace</h2><p>There are a huge range of both free and premium pre-built themes which you can download from the <a href=\"https://ghost.org/marketplace/\">Ghost Theme Marketplace</a>:</p><figure class=\"kg-card kg-image-card kg-card-hascaption\"><img src=\"https://static.ghost.org/v3.0.0/images/theme-marketplace.png\" class=\"kg-image\" alt=\"Ghost theme marketplace screenshot\"><figcaption>Anyone can write a completely custom Ghost theme with some solid knowledge of HTML and CSS</figcaption></figure><h2 id=\"theme-development\">Theme development</h2><p>Ghost themes are written with a templating language called handlebars, which has a set of dynamic helpers to insert your data into template files. For example: <code>{{author.name}}</code> outputs the name of the current author.</p><p>The best way to learn how to write your own Ghost theme is to have a look at <a href=\"https://github.com/TryGhost/Casper\">the source code for Casper</a>, which is heavily commented and should give you a sense of how everything fits together.<br></p><ul><li><code>default.hbs</code> is the main template file, all contexts will load inside this file unless specifically told to use a different template.</li><li><code>post.hbs</code> is the file used in the context of viewing a post.</li><li><code>index.hbs</code> is the file used in the context of viewing the home page.</li><li>and so on</li></ul><p>We've got <a href=\"https://ghost.org/docs/api/handlebars-themes/\">full and extensive theme documentation</a> which outlines every template file, context and helper that you can use. You can also get started with our useful <a href=\"https://github.com/TryGhost/Starter/\">starter theme</a>, which includes the most common foundations and components required to build your own theme.</p><blockquote>If you want to chat with other people making Ghost themes to get any advice or help, there's also a <strong>themes</strong> section on our <a href=\"https://forum.ghost.org/c/themes\">public Ghost forum</a>.</blockquote>","url":"https://gatsby.ghost.io/themes/","canonical_url":null,"uuid":"a3d4e545-9616-493a-8d72-a601bc0c7838","page":null,"codeinjection_foot":null,"codeinjection_head":null,"codeinjection_styles":null,"comment_id":"5e427227b5a6b954cd5e098b","reading_time":2}},"pageContext":{"slug":"themes"}}}