src/Tolkien/GeneratePost.php
public function setPostContent()
	{
		$content = "---\n";
		$content .= "type: " . $this->properties['type'] . "\n";
		$content .= "layout: " . $this->properties['layout'] . "\n";		
		$content .= "title: " . $this->properties['title'] . "\n";
		$content .= "date: " . Date('Y-m-d') . "\n";
		$content .= "dateFormat: 'F d, Y' \n"; // default ex January 08, 2014
		$content .= "url: :year/:month/:date/:title \n"; // default, cannot generated from cli
		$content .= "author: ". $this->properties['author'] ." \n";
		$content .= "categories: " . implode(',', $this->properties['categories']) . "\n";
		$content .= "featuredImage: " . $this->properties['featuredImage'] . "\n";
		$content .= "---\n";
		$content .= $this->properties['body'];

		return $content;
	}
public function setPostContent()
	{
		$content = "---\n";
		$content .= "type: " . $this->properties['type'] . "\n";
		$content .= "layout: " . $this->properties['layout'] . "\n";		
		$content .= "title: " . $this->properties['title'] . "\n";
		$content .= "date: " . Date('Y-m-d') . "\n";
		$content .= "dateFormat: 'F d, Y' \n"; // default ex January 08, 2014
		$content .= "url: :year/:month/:date/:title \n"; // default, cannot generated from cli
		$content .= "author: ". $this->properties['author'] ." \n";
		$content .= "categories: " . implode(',', $this->properties['categories']) . "\n";
		$content .= "featuredImage: " . $this->properties['featuredImage'] . "\n";
		$content .= "---\n";
		$content .= $this->properties['body'];

		return $content;
	}
public function setPostContent ( ) { $ content = "---\n" ; $ content .= "type: " . $ this -> properties [ 'type' ] . "\n" ; $ content .= "layout: " . $ this -> properties [ 'layout' ] . "\n" ; $ content .= "title: " . $ this -> properties [ 'title' ] . "\n" ; $ content .= "date: " . Date ( 'Y-m-d' ) . "\n" ; $ content .= "dateFormat: 'F d, Y' \n" ; // default ex January 08, 2014 $ content .= "url: :year/:month/:date/:title \n" ; // default, cannot generated from cli $ content .= "author: " . $ this -> properties [ 'author' ] . " \n" ; $ content .= "categories: " . implode ( ',' , $ this -> properties [ 'categories' ] ) . "\n" ; $ content .= "featuredImage: " . $ this -> properties [ 'featuredImage' ] . "\n" ; $ content .= "---\n" ; $ content .= $ this -> properties [ 'body' ] ; return $ content ; }
Set post metadata template

@return string
Set post metadata template