Skip to content

Writing

Pawan Dubey edited this page Jul 8, 2015 · 2 revisions

There are two types of content in Griffin. Posts and Pages. Each content type has some properties which go with each instance of it. Below is a basic description for both.

  • Posts are the basic type of content. They consist of

    • a title : The title for the content.
    • a slug : The relative URL for the post.
    • a date : The date of publication.
    • an author : The name of the author of that post
    • an image : The featured image for that post.
    • an excerpt : The excerpt as specified by the user with the ##more## delimiter or the first 255 characters if the delimiter is not found.
    • tags : A list of tags this post was tagged with. Any page tagged as "nav" is automatically treated as a navigation page.
  • Pages are similar to post except that they don't expose the published date property. Pages are not temporal like posts, so they don't really need dates.

The permalinks for the content are generated as per the following steps:

  1. If the slug is specified in the post, the permalink = site base URL + slug
  2. Else permalink = Site base URL + title in lowercase, seprated by - between words

The properties are specified as per the TOML specification, as in the Configuration file. The content type is specified by with the layout property.

Each file consists of two sections. The header section and the content section. The header section consists of the above mentioned properties with the layout to specify whether it is a page or a post. The content section consists of the content of the post in markdown format. The sections are separated by the header delimeter which is a series of five hashes(or pound signs) i.e #####.

An example file is given below which will be rendered as a Post.

title= "Hello World"
author= "Pawan"
layout= "post"	
date= "2015 06 25"
tags = ["code","life", "nav"]
slug = "hello-world"
#####
##Here is some header
And some more markdown content.
Clone this wiki locally