Class: File

types~File(docDir, srcDir, srcPath)

new File(docDir, srcDir, srcPath)

File's data.

Parameters:
Name Type Description
docDir String | Object

If it is an Object, it will be assigned into file.

srcDir String

Required if docDir is a String.

srcPath String

Required if docDir is a String.

Properties:
Name Type Description
srcDir String
srcPath String
docDir String
docPath String

Generated by renderer.

isBinary Boolean
createdDate String
updatedDate String
zone String
title String
layout String
comment Boolean
reward Boolean
raw Buffer | String

Raw file content.

text String
content String

Content after front-matter.

type String

Avaliable for page, post, asset, file.

frontMatter Object
categories Array.<Category>
tags Array.<Tag>
excerpt String
more String

Content after excerpt.

$ Object

Cheerio context.

posts Array.<File>

Posts links to this page.

toc Array.<TOC>

Content toc.

pageArray Array.<File>

Generated by paginate().

pageIndex Number

Generated by paginate().

next File

Next post.

prev File

Prev post.

Source: