From 7ea9b65dd0564d0246bf3048cd69b1a0e4511376 Mon Sep 17 00:00:00 2001
From: Maecenas Li <lx70716@gmail.com>
Date: Fri, 31 May 2019 16:45:58 +0900
Subject: [PATCH] feat: Add full-text content output

---
 README.md   | 14 ++++++++++----
 index.js    | 14 ++++++++++----
 lib/Page.js |  8 ++++++++
 3 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index f6f53de..ece5737 100644
--- a/README.md
+++ b/README.md
@@ -226,13 +226,19 @@ const default_options = {
 
   // order of what gets the highest priority:
   //
-  // 1. frontmatter
-  // 2. page excerpt
-  // 3. content markdown paragraph
-  // 4. content regular html <p>
+  // 1. full-text content
+  // 2. frontmatter
+  // 3. page excerpt
+  // 4. content markdown paragraph
+  // 5. content regular html <p>
 
   description_sources: [
 
+  	// full-text html
+  	// @todo: needs to resolve absolute (/*) and relative (./*) img src
+  	//
+  	'content',
+
     'frontmatter',
     'excerpt',
 
diff --git a/index.js b/index.js
index aa16b14..df78af1 100644
--- a/index.js
+++ b/index.js
@@ -150,13 +150,19 @@ PLUGIN.get_options_defaults = ( context ) =>
 
 		// order of what gets the highest priority:
 		//
-		// 1. frontmatter
-		// 2. page excerpt
-		// 3. content markdown paragraph
-		// 4. content regular html <p>
+		// 1. full-text content
+		// 2. frontmatter
+		// 3. page excerpt
+		// 4. content markdown paragraph
+		// 5. content regular html <p>
 
 		description_sources: [
 
+			// full-text html
+			// @todo: needs to resolve absolute (/*) and relative (./*) img src
+			//
+			'content',
+
 			'frontmatter',
 			'excerpt',
 
diff --git a/lib/Page.js b/lib/Page.js
index 4cb2b9a..5cedac6 100644
--- a/lib/Page.js
+++ b/lib/Page.js
@@ -248,6 +248,14 @@ class Page
 						break;
 
 					// -------------------------------------------------------------------
+
+					case 'content':
+
+						out = this.context || '';
+
+						break;
+
+					// -------------------------------------------------------------------
 					
 					case 'excerpt':