专栏首页前端萌媛的成长之路Setting up your own Ghost theme

Setting up your own Ghost theme

Creating a totally custom design for your publication

Ghost comes with a beautiful default theme called Casper, which is designed to be a clean, readable publication layout and can be easily adapted for most purposes. However, Ghost can also be completely themed to suit your needs. Rather than just giving you a few basic settings which act as a poor proxy for code, we just let you write code.

There are a huge range of both free and premium pre-built themes which you can get from the Ghost Theme Marketplace, or you can simply create your own from scratch.

Anyone can write a completely custom Ghost theme, with just some solid knowledge of HTML and CSS

Ghost themes are written with a templating language called handlebars, which has a bunch of dynamic helpers to insert your data into template files. Like {{author.name}}, for example, outputs the name of the current author.

The best way to learn how to write your own Ghost theme is to have a look at the source code for Casper, which is heavily commented and should give you a sense of how everything fits together.

  • default.hbs is the main template file, all contexts will load inside this file unless specifically told to use a different template.
  • post.hbs is the file used in the context of viewing a post.
  • index.hbs is the file used in the context of viewing the home page.
  • and so on

We've got full and extensive theme documentation which outlines every template file, context and helper that you can use.

If you want to chat with other people making Ghost themes to get any advice or help, there's also a #themes channel in our public Slack community which we always recommend joining!

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • url、href和src区别

    pitaojin
  • 前端语义化

    pitaojin
  • position有几种,absolute和relative的区别

    pitaojin
  • Microsemi可编程PCIE Switch助力资源池化方案落地

    在去年的2018 ODCC峰会上,腾讯发布了T-Flex PCIE资源池化方案和产品,该产品由腾讯和浪潮联手设计制造。PCIE资源池化的关键的部件就是PCIE ...

    冬瓜哥
  • 使用参与式设计构建更好的接触者追踪和邻近追踪应用程序(CS CY)

    随着接触者追踪和邻近追踪解决方案慢慢成为控制流行病蔓延的一种重要手段,公民和部署这些解决方案的当局之间存在着不信任。这些解决方案的有效性取决于满足一个最低吸收阈...

    Elva
  • EpiMob:用于流行病控制的全市人员流动限制的交互式可视化分析(CS HC)

    自2020年1月下旬以来,2019年冠状病毒(COVID-19)疫情已席卷180多个国家和地区。作为全球应急响应,各国政府采取了自我隔离、旅行限制、在家工作和区...

    用户7495559
  • 超级账本hyperledger fabric词汇汇总

    最近在学习超级账本,概念名词以及架构都比 比特币、以太坊、EOS复杂。 整理一下超级账本的词汇。

    若与
  • 七步理解深度学习

    原文链接请点击阅读原文。 There are many deep learning resources freely available online,but...

    量化投资与机器学习微信公众号
  • 基于视频的无监督segmentation论文推荐

    https://github.com/aimerykong/predictive-filter-flow

    用户1908973
  • 用户零感知到达云端: Evernote顺利完成向 Google 云平台的迁移

    编辑手记:Evernote完成了向Google 云上的迁移,70天完成了超过3PB的数据,数据相当于历史上出版过书籍的10倍,而对于每天都使用Evernote的...

    数据和云

扫码关注云+社区

领取腾讯云代金券