GHOST CMS - Ghost Handlebars主题 Ghost Handlebars Themes

Ghost Handlebars theme

Ghost Handlebars Themes 

Ghost theme layer is designed to allow developers and designers to build custom platform supported by the Ghost flexibility to publish

The Ghost theme layer has been engineered to give developers and designers the flexibility to build custom publications that are powered by the Ghost platform.

Theme Development

Theme development

Ghost theme uses Handlebars template language that uses the helper class creates a strong isolation between the template (HTML) and any JavaScript logic. This makes the theme can be very fast, has a dynamic client applications and server-side publishing content that is sent to the browser in the form of static HTML.

Ghost themes use the Handlebars templating language which creates a strong separation between templates (the HTML) and any JavaScript logic with the use of helpers. This allows themes to be super fast, with a dynamic client side app, and server side publication content that is sent to the browser as static HTML.

Ghost also uses an additional library called express-hbs, which adds some additional functionality to handle, such as layout and local.

Ghost also makes use of an additional library called express-hbs which adds some additional features to Handlebars, such as layouts and partials.

This document provides you with the tools needed to create static HTML and CSS theme, using the handle expressions when need to present dynamic data.

This documentation gives you the tools required to create static HTML and CSS for a theme, using Handlebars expressions when you need to render dynamic data.

Handlebars

Handlebars template language provides the ability to effectively build semantic template. This document provides you with all the knowledge needed to start your development theme publications. Also, if you want to handle official familiar with the document and learn more fundamental expression, the use of these helpful resources:

The Handlebars templating language provides the power to build semantic templates effectively. This documentation gives you all the knowledge you need to start developing a theme for your publication. In addition, if you would like to make yourself familiar with the official Handlebars docs and learn more about basic expressions, use these helpful resources:

In Ghost has done for you Handlebars installation

Installation of Handlebars is already done for you in Ghost ✨

GScan

Verify your Ghost theme is dealt with effectively using GScan tool. GScan will check whether you have the wrong topic, do not support and compatibility issues. GScan has several purposes:

Validating your Ghost theme is handled efficiently with the GScan tool. GScan will check your theme for errors, deprecations and compatibility issues. GScan is used in several ways:

  • GScan site is to test any topic you are building for a complete verification report of the first port of call at The  GScan Site  IS your First Port of Call to the Test Themes that you're the any to GET A Building Full Validation Report

  • When a theme is uploaded Ghost management, it will automatically check and gscan and any fatal errors will prevent the use of the theme Theme IS A uploaded in the When Ghost ADMIN, IT BE by Will Automatically with the checked  gscan and the any fatal errors by Will Prevent at The Theme from being Used

  • gscan is also used as a command line tool

Command line

To use GScan as a command line tool, globally install the gscan npm package:

Terminal
# Install the npm package
npm install -g gscan

# Use gscan <file path> anywhere to run gscan against a folder
gscan /path/to/ghost/content/themes/casper

# Run gscan on a zip file gscan -z /path/to/download/theme.zip

What's next?

That's all of the background context required to get started. From here you'll take a look at the structure of Ghost themes and templates, and learn everything you need to know about the package.json file.

For community led support about theme development, visit the forum.

Guess you like

Origin www.cnblogs.com/QDuck/p/12077136.html