diff --git a/app/activation.php b/app/activation.php
index b64de3c..0cb7667 100644
--- a/app/activation.php
+++ b/app/activation.php
@@ -3,28 +3,18 @@
namespace Aldine;
add_action('admin_init', function () {
+ $extra = new \ParsedownExtra();
+ $about = $extra->text(file_get_contents(get_stylesheet_directory() . '/docs/about.md'));
+ $help = $extra->text(file_get_contents(get_stylesheet_directory() . '/docs/help.md'));
+
$default_pages = [
'about' => [
'post_title' => __('About', 'aldine'),
- // @codingStandardsIgnoreStart
- 'post_content' => apply_filters('pb_root_about_page_content', __('Pressbooks is simple book production software. You can use Pressbooks to publish textbooks, scholarly monographs, syllabi, fiction and non-fiction books, white papers, and more in multiple formats including:
-
-
- MOBI (for Kindle ebooks)
-- EPUB (for all other ebookstores)
-- designed PDF (for print-on-demand and digital distribution)
-
-Pressbooks is used by educational institutions around the world as well as authors and publishers.
-
-For more information about Pressbooks, see here.', 'aldine'))
- // @codingstandardsIgnoreEnd
+ 'post_content' => apply_filters('pb_root_about_page_content', $about)
],
'help' => [
'post_title' => __('Help', 'aldine'),
- // @codingStandardsIgnoreStart
- 'post_content' => apply_filters('pb_root_help_page_content', __('The easiest way to get started with Pressbooks is to follow our 4 Step Guide to Making a Book on Pressbooks. Or, you can review our Guide to Using Pressbooks.
-
-If you require further assistance, please contact your network manager.', 'aldine'))
- // @codingstandardsIgnoreEnd
+ 'post_content' => apply_filters('pb_root_help_page_content', $help)
],
'catalog' => [
'post_title' => __('Catalog', 'aldine'),
diff --git a/composer.json b/composer.json
index 0c9825a..3672695 100644
--- a/composer.json
+++ b/composer.json
@@ -32,7 +32,8 @@
"illuminate/support": "~5.4",
"roots/sage-lib": "~9.0.0-beta.4",
"soberwp/controller": "~9.0.0-beta.4",
- "soberwp/intervention": "1.2.0-p"
+ "soberwp/intervention": "1.2.0-p",
+ "erusev/parsedown-extra": "^0.7.1"
},
"require-dev": {
"squizlabs/php_codesniffer": "^2.8.0"
diff --git a/composer.lock b/composer.lock
index 7931d22..e7a0a45 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "content-hash": "b64704b574ef5a22a123a59ab6fbc069",
+ "content-hash": "f7726a4926f063ad567227228ba400b8",
"packages": [
{
"name": "brain/hierarchy",
@@ -246,6 +246,92 @@
],
"time": "2017-07-22T12:18:28+00:00"
},
+ {
+ "name": "erusev/parsedown",
+ "version": "1.6.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/erusev/parsedown.git",
+ "reference": "728952b90a333b5c6f77f06ea9422b94b585878d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/erusev/parsedown/zipball/728952b90a333b5c6f77f06ea9422b94b585878d",
+ "reference": "728952b90a333b5c6f77f06ea9422b94b585878d",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "Parsedown": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Emanuil Rusev",
+ "email": "hello@erusev.com",
+ "homepage": "http://erusev.com"
+ }
+ ],
+ "description": "Parser for Markdown.",
+ "homepage": "http://parsedown.org",
+ "keywords": [
+ "markdown",
+ "parser"
+ ],
+ "time": "2017-05-14T14:47:48+00:00"
+ },
+ {
+ "name": "erusev/parsedown-extra",
+ "version": "0.7.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/erusev/parsedown-extra.git",
+ "reference": "0db5cce7354e4b76f155d092ab5eb3981c21258c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/erusev/parsedown-extra/zipball/0db5cce7354e4b76f155d092ab5eb3981c21258c",
+ "reference": "0db5cce7354e4b76f155d092ab5eb3981c21258c",
+ "shasum": ""
+ },
+ "require": {
+ "erusev/parsedown": "~1.4"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {
+ "ParsedownExtra": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Emanuil Rusev",
+ "email": "hello@erusev.com",
+ "homepage": "http://erusev.com"
+ }
+ ],
+ "description": "An extension of Parsedown that adds support for Markdown Extra.",
+ "homepage": "https://github.com/erusev/parsedown-extra",
+ "keywords": [
+ "markdown",
+ "markdown extra",
+ "parsedown",
+ "parser"
+ ],
+ "time": "2015-11-01T10:19:22+00:00"
+ },
{
"name": "hassankhan/config",
"version": "0.10.0",