创建自定义主页 Creating a custom home page

为你的网站创建一个自定义的主页是一个让你从人群中脱颖而出的好方法,并把你自己独特的印记存放在你的网上。本教程向您展示了如何在Ghost中自定义和开发自己的自定义主页。

Creating a custom home page for your site is a great way to set yourself apart from the crowd and put your own unique stamp on your online presence. This tutorial shows you how to customise and develop your own custom home page in Ghost.

创建和自定义模板 Creating and customising your template

在我们开始之前,我想先解释一下处理Ghost主题的几个先决条件。Ghost中的主题使用Handlebars,这是一种模板语言,提供对Ghost内容的访问和其他常见模板好处。

Before we dive in there's a couple of prerequisites I'd like to explain for working with Ghost themes. Themes in Ghost use Handlebars, a templating language that provides access to Ghost content and other common templating benefits.

主题文件结构和索引。 index.hbs file

Theme file structure and index.hbs file

每一个Ghost主题都有一个索引。hbs文件,“hbs”代表把手。此文件呈现您的所有帖子,并且最有可能用于您站点的主页。

Every Ghost theme comes with an index.hbs file, the "hbs" stands for handlebars. This file renders all your posts, and is most likely being used on the home page of your site.

在Ghost admin中下载主题UI

Download theme UI in the Ghost admin

通过下载您的Ghost主题,您可以对该文件进行更改。要下载主题,请浏览Ghost admin中的Design视图,向下滚动到选择的主题,然后单击右侧的“download”。一旦你解压缩了主题,你就可以打开索引了。在文本编辑器中的hbs文件,并开始进行更改。

By downloading your Ghost theme you can make changes to this file. To download the theme navigate to the Design view in the Ghost admin and scroll down to the selected theme and click "download" on the right hand side. Once you've unzipped the theme you can open the index.hbs file in a text editor and begin making changes.

{{!-- Main --}}
<main id="main"> <div>
<h2>Hey

GHOST CMS - 创建自定义主页 Creating a custom home page的更多相关文章

  1. GHOST CMS - 结构 Structure

    Structure Ghost主题包含静态HTML模板,这些模板使用helper类从站点输出数据,并使用定制的CSS进行样式化 A Ghost theme contains static HTML t ...

  2. ArcGIS Engine环境下创建自定义的ArcToolbox Geoprocessing工具

    在上一篇日志中介绍了自己通过几何的方法合并断开的线要素的ArcGIS插件式的应用程序.但是后来考虑到插件式的程序的配置和使用比较繁琐,也没有比较好的错误处理机制,于是我就把之前的程序封装成一个类似于A ...

  3. (翻译)为你的MVC应用程序创建自定义视图引擎

    Creating your own MVC View Engine For MVC Application 原文链接:http://www.codeproject.com/Articles/29429 ...

  4. 如何利用WordPress创建自定义注册表单插件

    来源:http://www.ido321.com/1031.html 原文:Creating a Custom WordPress Registration Form Plugin 译文:创建一个定制 ...

  5. android wear开发:为可穿戴设备创建一个通知 - Creating a Notification for Wearables

    注:本文内容来自:https://developer.android.com/training/wearables/notifications/creating.html 翻译水平有限,如有疏漏,欢迎 ...

  6. 【UiPath 中文教程】02 - 创建自定义 Activity

    在 UiPath Studio 中,活动 (Activity) 是流程自动化的基石,是构成自动化程序的最小模块.它们被包含在一个个 NuGet 包中. UiPath Studio 中有 3 类包: 官 ...

  7. 带你走近AngularJS - 创建自定义指令

    带你走近AngularJS系列: 带你走近AngularJS - 基本功能介绍 带你走近AngularJS - 体验指令实例 带你走近AngularJS - 创建自定义指令 ------------- ...

  8. sharepoint2010 创建自定义列表

    转:http://boke.25k5.com/kan77298.html 如何创建自定义列表 首先了解创建自定义列表中涉及到的几个名词:栏.内容类型. ①栏:栏即列.字段(Field),MSDN中给出 ...

  9. 带你走近AngularJS 之创建自定义指令

    带你走近AngularJS 之创建自定义指令 为什么使用AngularJS 指令? 使用过 AngularJS 的朋友应该最感兴趣的是它的指令.现今市场上的前端框架也只有AngularJS 拥有自定义 ...

随机推荐

  1. Ubuntu 16.04源码编译boost库 编写CMakeLists.txt | compile boost 1.66.0 from source on ubuntu 16.04

    本文首发于个人博客https://kezunlin.me/post/d5d4a460/,欢迎阅读! compile boost 1.66.0 from source on ubuntu 16.04 G ...

  2. [ML机器学习 - Stanford University] - Week1 - 01 Introduction

    What is Machine Learning? Two definitions of Machine Learning are offered. Arthur Samuel described i ...

  3. GeoServer 修改端口

    准备内容 安装环境:win10*64位专业版 安装文件:geoserver-2.15.2 操作步骤 1.找到文件夹下的start.ini,并用记事本打开 2.找到jetty.port,修改为自己需要的 ...

  4. Python 编程语言要掌握的技能之一:使用数字与字符串的技巧

    最佳实践 1. 少写数字字面量 “数字字面量(integer literal)” 是指那些直接出现在代码里的数字.它们分布在代码里的各个角落,比如代码 del users[0] 里的 0 就是一个数字 ...

  5. 2019-9-9:渗透测试,docker下载dvwa,使用报错型sql注入dvwa

    docker下载dvwa镜像,报错型注入dvwa,low级 一,安装并配置docker 1,更新源,apt-get update && apt-get upgrade &&am ...

  6. 2019-9-28:渗透测试,基础学习,DNS投毒

    该文章仅供学习,利用方法来自网络文章,仅供参考 DNS劫持 目标机:虚拟机下的win7系统 目标ip:192.168.20.131 目标:使用ettercap进行apr投毒,对win7系统就行,DNS ...

  7. 为什么 Redis 是单线程的?

    以前一直有个误区,以为:高性能服务器 一定是 多线程来实现的 原因很简单因为误区二导致的:多线程 一定比 单线程 效率高.其实不然. 在说这个事前希望大家都能对 CPU . 内存 . 硬盘的速度都有了 ...

  8. css实现等边六边形

    在平时的页面布局中,我们也会经常碰到蜂窝煤类型的模块: 那么我们把他拆开,就是单个的六边形,如何用css去实现一个六边形呢?下面是我用绘图软件绘制的css实现六边形的步骤: 具体的html代码如下: ...

  9. vim介绍、颜色显示和移动光标、一般模式下移动光标及复制、剪切和粘贴

    第4周第4次课(4月12日) 课程内容: 5.1 vim介绍5.2 vim颜色显示和移动光标5.3 vim一般模式下移动光标5.4 vim一般模式下复制.剪切和粘贴 5.1 vim介绍 centos7 ...

  10. 2019-2020-1 20199304《Linux内核原理与分析》第二周作业

    计算机工作原理 存储程序计算机模型 冯·诺依曼体系结构 冯·诺依曼体系结构如图所示: 冯·诺依曼体系结构包含五大部分 运算器:在控制器的统一控制下,负责对数据进行加工.完成各种运算,如算术运算.逻辑运 ...