EVERYTHING LATEST

Tech News and Articles

A as irregular to noting phase and to and raising rewritten film if been his took question. Decelerate upon positives on need peacefully.

I am developing ghost themes for over 2 years. Always I try to follow ghost docs, but the problem is I have to find the codes. So I have tried to organize all useful code in one place. You will find your necessary codes here.

General options

 

Single post

Name Code Desc
Language {{@site.lang}} this code is for language
Title {{meta_title} for meta title
Site logo {{@site.logo}} for showing site logo
Description {{@site.description}} for meta description
Site url {{ @site.url }} Show the site url
Facebook {{@site.facebook}} Site’s facebook profile
Facebbok URL {{facebook_url}} URL for facebook profile
Twitter {{@site.twitter}} Site’s twitter profile
Twitter URL {{twitter_url}} URL for twitter profile
Assets {{asset}} for all assets to import
Default {{!< default}} Call Default.hbs file
Partials {{> "header"}} Call the file from partials
is {{#is "page"}}{{/is}} Render the data only for page. See more here
Body Class {{body_class}} Show all body class here
Scripts {{{block "scripts"}}} Show the script here
Head {{ghost_head}} Show the header meta and other codes here
Foot {{ghost_foot}} Ghost footer here
Post_per_page "posts_per_page": 7 Show posts per page
Pagination {{pagination}} Show pagination
Post number {{plural ../pagination.total empty='No Post' singular='% Post' plural='% Posts'}} Show post number under single tag or author
Condition {{#if}}{{/if}} if condition for the content
Negative Condition {{#if}}{{/if}} if negative condition for the content
Condition {{#has}}{{/has}} has condition for the content
Negative Condition {{^has}}{{/has}} has negative condition for the content
Show specific number {{has number="1"}}{{/has}} Show specific number post

 

Tag

Name Code Desc
Author {{#tag}}{{/tag}} Show tag content of single tag page
Name {{name}} Name of tag
URL {{url}} URL of the tag
Feature image {{feature_image}} feature image of tag
Description {{description}} a description of the tag
Meta title {{meta_title}} custom meta title for the page
Meta description meta_description Custom meta description for the page –url– the web address for the tag’s page

 

Author

Name Code Desc
Author {{#author}}{{/author}} Show author content of single author page
Name {{name}} Name of authors
Cover {{cover_image}} Cover photo of author
Location {{location}} Location for the author
image {{profile_image}} Profile photo of author
Bio {{bio}} Bio for the author
URL {{url}} URL of the author
Facebook {{facebook}} Facebook profile of author
Facebook URL {{facebook_url}} Facebook URL for the author
Twitter {{twitter}} Twitter account for the author
Twitter URL {{twitter_url}} Twitter URL for the author
Website {{website}} Website of author

 

Get – Fetch the data

This is used to fetch the postsauthorstags.

Name Code Desc
Posts {{#get "posts" include="tags,authors"}}{{/get}} Get all posts
Featured posts {{#get "posts" filter="featured:true" include="tags,authors"}}{{/get}} Get all posts
Specific Tag Posts {{#get "posts" filter="tag:portfolio" include="tags,authors"}}{{/get}} Get all posts of portfolio tag
Author Posts {{#get "posts" filter="tag:enamul" include="tags,authors"}}{{/get}} Get all posts of portfolio tag
Author list {{#get "authors" include="count.posts"}}{{/get}} Get all authors of the site
Tag list {{#get "tags" include="count.posts"}}{{/get}} Get all tags of the site
Related posts {{#get "posts" limit="3" include="tags,authors" filter="id:-{{comment_id}}+tag:{{primary_tag.slug}}" as |relatedPost|}}{{/get}} Show all related posts
Options limit="all" Limit the posts
  limit=@config.posts_per_page Limit the posts as per config
  page="4" To show the specific page posts
  order="published_at asc" Show post on specific order
  order="title asc" Show post on title order
  include="tags,authors Includes will fetch the tags/authors data

 

Error

Name Code Desc
Message {{message}} Error message
Code {{code}} Code of errors

 

Navigation

 

Subscriber

 

Code Highlighter

 

Disqus comment

ElectronThemes

Shopping Cart