From 1c83edc50dd79f830ded17d2266c3b3a9640a6e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20=C3=87EL=C4=B0K?= Date: Sat, 7 Nov 2015 12:43:23 +0300 Subject: [PATCH 1/9] added "MathJax Process" toggle to page options tab --- blueprints/mathjax.yaml | 22 ++++++++++++++++++++++ mathjax.php | 22 ++++++++++++++++++++-- 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 blueprints/mathjax.yaml diff --git a/blueprints/mathjax.yaml b/blueprints/mathjax.yaml new file mode 100644 index 0000000..c1495dd --- /dev/null +++ b/blueprints/mathjax.yaml @@ -0,0 +1,22 @@ +form: + fields: + tabs: + fields: + options: + type: tab + fields: + mathjax: + type: section + title: Mathjax + underline: true + fields: + header.mathjax.process: + type: toggle + label: Process MathJax + highlight: 1 + default: 1 + options: + 1: Enabled + 0: Disabled + validate: + type: bool \ No newline at end of file diff --git a/mathjax.php b/mathjax.php index ad3a9ae..02123e4 100644 --- a/mathjax.php +++ b/mathjax.php @@ -18,7 +18,7 @@ */ namespace Grav\Plugin; - +use Grav\Common\Data; use Grav\Common\Plugin; use RocketTheme\Toolbox\Event\Event; use Grav\Plugin\Shortcodes\BlockShortcode; @@ -63,7 +63,8 @@ public static function getSubscribedEvents() return [ 'onPageInitialized' => ['onPageInitialized', 0], 'onTwigInitialized' => ['onTwigInitialized', 0], - 'onShortcodesInitialized' => ['onShortcodesInitialized', 0] + 'onShortcodesInitialized' => ['onShortcodesInitialized', 0], + 'onBlueprintCreated' => ['onBlueprintCreated', 0] ]; } @@ -235,6 +236,23 @@ public function onShortcodesInitialized(Event $event) ); } + /** + * Extend page blueprints "with mathjax.process" configuration options. + * + * @param Event $event + */ + public function onBlueprintCreated(Event $event) + { + $blueprint = $event['blueprint']; + + if ($blueprint->get('form.fields.tabs')) { + $blueprints = new Data\Blueprints(__DIR__ . '/blueprints/'); + $extends = $blueprints->get('mathjax'); + $blueprint->extend($extends, true); + } + + } + /** ------------------------------- * Private/protected helper methods * -------------------------------- From 3e373c5a31ac719850fa62130d3cdb1ae3a9e57f Mon Sep 17 00:00:00 2001 From: Sommerregen Date: Mon, 9 Nov 2015 19:40:55 +0100 Subject: [PATCH 2/9] Fix variable in `unhash` function --- classes/MathJax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/MathJax.php b/classes/MathJax.php index f4da9ec..9cd1f45 100644 --- a/classes/MathJax.php +++ b/classes/MathJax.php @@ -234,7 +234,7 @@ protected function hash($text, $type = '') protected function unhash($text) { $pattern = '~mathjax::(.+)::([0-9a-z]+)::([0-9]+)::M~i'; - $text = preg_replace_callback($pattern, function($atches) { + $text = preg_replace_callback($pattern, function($matches) { return $this->hashes[$matches[0]]; }, $text); From 25a46fb0f72509d2647c65a7af78d619f6c643ea Mon Sep 17 00:00:00 2001 From: Sommerregen Date: Wed, 18 Nov 2015 20:35:11 +0100 Subject: [PATCH 3/9] Fixed link license in `README.md` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c442782..d46429d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ * [CSS Stylesheet Override](#css-stylesheet-override) * [JavaScript Override](#javascript-override) * [Contributing](#contributing) -* [Licencse](#license) +* [License](#license) ## About From 5e386f49cd4df93701eeedfefa0d91a9d399dd51 Mon Sep 17 00:00:00 2001 From: Sommerregen Date: Wed, 18 Nov 2015 20:36:03 +0100 Subject: [PATCH 4/9] Refactored classes and improved blueprints --- blueprints.yaml | 4 +--- blueprints/mathjax.yaml | 47 +++++++++++++++++++++++------------------ languages.yaml | 1 + mathjax.php | 42 +++++++++++++++++++----------------- 4 files changed, 52 insertions(+), 42 deletions(-) diff --git a/blueprints.yaml b/blueprints.yaml index 1bc054d..efa7823 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -34,7 +34,6 @@ form: built_in_css: type: toggle label: PLUGINS.MATHJAX.BUILTIN_CSS - highlight: 1 default: 1 options: 1: PLUGIN_ADMIN.YES @@ -45,7 +44,6 @@ form: built_in_js: type: toggle label: PLUGINS.MATHJAX.BUILTIN_JS - highlight: 1 default: 1 options: 1: PLUGIN_ADMIN.YES @@ -97,7 +95,7 @@ form: process: type: toggle label: PLUGINS.MATHJAX.PROCESS - default: 0 + default: 1 options: 1: PLUGIN_ADMIN.YES 0: PLUGIN_ADMIN.NO diff --git a/blueprints/mathjax.yaml b/blueprints/mathjax.yaml index c1495dd..8e3dcb6 100644 --- a/blueprints/mathjax.yaml +++ b/blueprints/mathjax.yaml @@ -1,22 +1,29 @@ form: + validation: loose + fields: - tabs: - fields: - options: - type: tab - fields: - mathjax: - type: section - title: Mathjax - underline: true - fields: - header.mathjax.process: - type: toggle - label: Process MathJax - highlight: 1 - default: 1 - options: - 1: Enabled - 0: Disabled - validate: - type: bool \ No newline at end of file + tabs: + type: tabs + active: 1 + + fields: + options: + type: tab + + fields: + mathjax: + type: section + title: PLUGINS.MATHJAX.MATHJAX + underline: true + + fields: + header.mathjax.process: + type: toggle + label: PLUGINS.MATHJAX.PROCESS + highlight: 1 + default: 1 + options: + 1: PLUGIN_ADMIN.YES + 0: PLUGIN_ADMIN.NO + validate: + type: bool \ No newline at end of file diff --git a/languages.yaml b/languages.yaml index 58d375c..048bcb4 100644 --- a/languages.yaml +++ b/languages.yaml @@ -29,6 +29,7 @@ en: PLUGIN_STATUS: "Plugin status" BUILTIN_CSS: "Use built in CSS" BUILTIN_JS: "Use built in JS" + MATHJAX: "MathJax" WEIGHT: "Order of execution" WEIGHT_HELP: "To process the page contents right after *SmartyPants* use negative values." diff --git a/mathjax.php b/mathjax.php index 02123e4..9d56663 100644 --- a/mathjax.php +++ b/mathjax.php @@ -18,8 +18,9 @@ */ namespace Grav\Plugin; -use Grav\Common\Data; + use Grav\Common\Plugin; +use Grav\Common\Data\Blueprints; use RocketTheme\Toolbox\Event\Event; use Grav\Plugin\Shortcodes\BlockShortcode; @@ -63,15 +64,16 @@ public static function getSubscribedEvents() return [ 'onPageInitialized' => ['onPageInitialized', 0], 'onTwigInitialized' => ['onTwigInitialized', 0], - 'onShortcodesInitialized' => ['onShortcodesInitialized', 0], - 'onBlueprintCreated' => ['onBlueprintCreated', 0] + 'onBlueprintCreated' => ['onBlueprintCreated', 0], + 'onShortcodesInitialized' => ['onShortcodesInitialized', 0] ]; } /** * Initialize configuration */ - public function onPageInitialized() { + public function onPageInitialized() + { if ($this->isAdmin()) { $this->active = false; return; @@ -108,7 +110,7 @@ public function onPageContentRaw(Event $event) // Save modified page content with tokens as placeholders $page->setRawContent( - $this->init()->process($raw, $page->id()) + $this->mathjaxFunction($raw, $config->toArray(), $page) ); } } @@ -197,17 +199,20 @@ public function onTwigSiteVariables() } /** - * Filter to parse external links. + * Filter to parse MathJax formula. * * @param string $content The content to be filtered. - * @param array $options Array of options for the External links filter. + * @param array $options Array of options for the MathJax formula function. * * @return string The filtered content. */ - public function externalLinksFunction($content, $params = []) + public function mathjaxFunction($content, $params = []) { - $config = $this->mergeConfig($this->grav['page'], $params); - return $this->init()->process($content, $config); + // Get custom user configuration + $page = func_num_args() > 2 ? func_get_arg(2) : $this->grav['page']; + + // Render MathJax formula + return $this->init()->process($content, $page->id()); } /** @@ -226,7 +231,7 @@ public function onShortcodesInitialized(Event $event) 'onPageContentProcessed' => ['onPageContentProcessed', $weight] ]); - // Update header to variable to bypass evaluation + // Update header variable to bypass evaluation if (isset($event['page']->header()->mathjax->process)){ $event['page']->header()->mathjax->process = true; } @@ -243,14 +248,13 @@ public function onShortcodesInitialized(Event $event) */ public function onBlueprintCreated(Event $event) { - $blueprint = $event['blueprint']; - - if ($blueprint->get('form.fields.tabs')) { - $blueprints = new Data\Blueprints(__DIR__ . '/blueprints/'); - $extends = $blueprints->get('mathjax'); - $blueprint->extend($extends, true); - } - + $blueprint = $event['blueprint']; + + if ($blueprint->get('form.fields.tabs')) { + $blueprints = new Blueprints(__DIR__ . '/blueprints/'); + $extends = $blueprints->get($this->name); + $blueprint->extend($extends, true); + } } /** ------------------------------- From ff832a391500bc45d1706c9023e9c385ab121700 Mon Sep 17 00:00:00 2001 From: Sommerregen Date: Wed, 18 Nov 2015 20:37:14 +0100 Subject: [PATCH 5/9] `README.md` updates --- README.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d46429d..cf364ac 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ * [Example](#example) * [CSS Stylesheet Override](#css-stylesheet-override) * [JavaScript Override](#javascript-override) + * [Twig Filter](#twig-filter) * [Contributing](#contributing) * [License](#license) @@ -17,13 +18,11 @@ `MathJax` is a plugin for [**Grav**](http://getgrav.org) and integrates the [MathJax library](http://www.mathjax.org/), a modern JavaScript-based LaTeX rendering solution for the Internet, into the site. -By default, MathJax source is loaded automatically from the Internet using the -MathJax Content Delivery Network (CDN). This is a light-weight, "out-of-the-box" LaTeX rendering solution and you can still use a custom configuration if you need. +By default, MathJax source is loaded automatically from the Internet using the MathJax Content Delivery Network (CDN). This is a light-weight, "out-of-the-box" LaTeX rendering solution and you can still use a custom configuration if you need. Alternatively, you can host the MathJax library (approximately _150MB_) on your server located in your `user/data/mathjax` folder. -MathJax then renders mathematics inside the default delimiters. The -default math delimiters are `$$...$$` and `\\[...\\]` for displayed mathematics, and `$...$` and `\\(...\\)` for inline mathematics. An example can be seen below: +MathJax then renders mathematics inside the default delimiters. The default math delimiters are `$$...$$` and `\\[...\\]` for displayed mathematics, and `$...$` and `\\(...\\)` for inline mathematics. An example can be seen below: ![Screenshot MathJax Plugin](assets/screenshot.png "MathJax Preview") @@ -118,7 +117,7 @@ The `MathJax` plugin allows you to either use the MathJax CDN (recommended) or t 1. Download the latest MathJax release from https://github.com/mathjax/mathjax. 2. Extract the contents to your Grav `user/data/mathjax` folder and make sure that the file `mathjax.js` is present in the above folder (and not in any sub-folders). - 3. Copy the [mathjax.yaml](mathjax.yaml) file into your `users/config/plugins/` folder (create it if it doesn't exist), and finally set `CDN: enabled: false`. + 3. Copy the [mathjax.yaml](mathjax.yaml) file into your `users/config/plugins/` folder (create it if it doesn't exist), and finally set `CDN.enabled: false`. ### CSS Stylesheet Override @@ -156,6 +155,14 @@ window.MathJax = { ``` +### Twig Filter + +`MathJax` provides a Twig filter to process MathJax inside contents. To do that, place the following line of code in the theme file you wish to add the `MathJax` plugin for: + +``` +{{ page.content|mathjax }} +``` + ## Contributing You can contribute at any time! Before opening any issue, please search for existing issues and review the [guidelines for contributing](docs/CONTRIBUTING.md). From 39af81d3398c2e1d5b18805dd854b0848b150d49 Mon Sep 17 00:00:00 2001 From: Sommerregen Date: Wed, 18 Nov 2015 20:38:18 +0100 Subject: [PATCH 6/9] Refactoring --- blueprints.yaml | 4 ++ classes/MathJax.php | 17 +++---- languages.yaml | 10 +++- mathjax.php | 108 +++++++++++++++++++++++++++----------------- 4 files changed, 88 insertions(+), 51 deletions(-) diff --git a/blueprints.yaml b/blueprints.yaml index efa7823..e6b3400 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -13,7 +13,9 @@ license: MIT/GPL form: validation: strict + fields: + # Global plugin configurations global: type: section title: PLUGINS.MATHJAX.GLOBAL_CONFIG @@ -62,6 +64,7 @@ form: min: -100 max: 100 + # Default options for MathJax configuration default: type: section title: PLUGINS.MATHJAX.DEFAULT_CONFIG @@ -86,6 +89,7 @@ form: placeholder: https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML help: PLUGINS.MATHJAX.CDN.URL_HELP + # Global and page specific configurations specific: type: section title: PLUGINS.MATHJAX.SPECIFIC_CONFIG diff --git a/classes/MathJax.php b/classes/MathJax.php index 9cd1f45..580e4fa 100644 --- a/classes/MathJax.php +++ b/classes/MathJax.php @@ -73,24 +73,25 @@ public function mathjaxShortcode(Event $event) if (isset($tags[$type])) { // Wrap text in display math tags list($pre, $post) = $tags[$type]; - $body = $pre.$body.$post; + $body = $pre . $body . $post; - return $this->process($body); + return $this->render($body, $event['options'], $event['page']); } } /** - * Process contents i.e. replace all math formulas by a (unique) hash + * Process contents i.e. apply filer to the content. * - * @param string $content The content to be processed - * @param string $id An id to be incorporated into all replacements. + * @param string $content The content to render. + * @param array $options Options to be passed to the renderer. + * @param null|Page $page Null or an instance of \Grav\Common\Page. * - * @return string The processed content + * @return string The rendered contents. */ - public function process($content, $id = null) + public function render($content, $options = [], $page = null) { // Set unique identifier based on page content - $this->id($id ?: time().md5($content)); + $this->id($page->id() ?: time() . md5($content)); // Reset class hashes before processing // $this->reset(); diff --git a/languages.yaml b/languages.yaml index 048bcb4..a2fe106 100644 --- a/languages.yaml +++ b/languages.yaml @@ -5,12 +5,16 @@ de: GLOBAL_CONFIG: "Globale Einstellungen" DEFAULT_CONFIG: "Standardeinstellungen für External Links" SPECIFIC_CONFIG: "Globale und seitenspezifische Einstellungen" + + MATHJAX: "MathJax" PLUGIN_STATUS: "Plugin Status" + BUILTIN_CSS: "Verwende mitgeliefertes CSS" BUILTIN_JS: "Verwende mitgeliefertes JS" WEIGHT: "Ausführungsreihenfolge" WEIGHT_HELP: "Setze negative Werte um MathJax direkt nach *SmartyPants* ausführen zu lassen." + CDN: ENABLED: "Verwende das MathJax Content Delivery Network (CDN)" ENABLED_HELP: "Aktivierung dieser Option bewrikt das Laden von MathJax über den MathJax Server (empfohlen) or von dem unten stehenden Link." @@ -26,16 +30,20 @@ en: GLOBAL_CONFIG: "Global plugin configurations" DEFAULT_CONFIG: "Default values for External Links configuration" SPECIFIC_CONFIG: "Global and page specific configurations" + + MATHJAX: "MathJax" PLUGIN_STATUS: "Plugin status" + BUILTIN_CSS: "Use built in CSS" BUILTIN_JS: "Use built in JS" - MATHJAX: "MathJax" WEIGHT: "Order of execution" WEIGHT_HELP: "To process the page contents right after *SmartyPants* use negative values." + CDN: ENABLED: "Use MathJax Content Delivery Network (CDN)" ENABLED_HELP: "Check this box to load MathJax source from MathJax servers (recommended) or from the link you can provide below." URL: "MathJax CDN URL" URL_HELP: "Enter the Mathjax CDN URL here or leave it unchanged to use the one provided by wwww.mathjax.org" + PROCESS: "Activate MathJax filter on the page" diff --git a/mathjax.php b/mathjax.php index 9d56663..31d3626 100644 --- a/mathjax.php +++ b/mathjax.php @@ -21,9 +21,10 @@ use Grav\Common\Plugin; use Grav\Common\Data\Blueprints; -use RocketTheme\Toolbox\Event\Event; use Grav\Plugin\Shortcodes\BlockShortcode; +use RocketTheme\Toolbox\Event\Event; + /** * MathJax Plugin * @@ -62,33 +63,55 @@ class MathJaxPlugin extends Plugin public static function getSubscribedEvents() { return [ - 'onPageInitialized' => ['onPageInitialized', 0], - 'onTwigInitialized' => ['onTwigInitialized', 0], - 'onBlueprintCreated' => ['onBlueprintCreated', 0], - 'onShortcodesInitialized' => ['onShortcodesInitialized', 0] + 'onPluginsInitialized' => ['onPluginsInitialized', 0] ]; } /** * Initialize configuration */ - public function onPageInitialized() + public function onPluginsInitialized() { - if ($this->isAdmin()) { - $this->active = false; - return; - } - if ($this->config->get('plugins.mathjax.enabled')) { - $weight = $this->config->get('plugins.mathjax.weight', -5); // Process contents order according to weight option // (default: -5): to process page content right after SmartyPants + $weight = $this->config->get('plugins.mathjax.weight', -5); - $this->enable([ + // Set default events + $events = [ 'onPageContentRaw' => ['onPageContentRaw', 0], 'onPageContentProcessed' => ['onPageContentProcessed', $weight], - 'onTwigSiteVariables' => ['onTwigSiteVariables', 0] - ]); + 'onTwigInitialized' => ['onTwigInitialized', 0], + 'onTwigSiteVariables' => ['onTwigSiteVariables', 0], + 'onShortcodesInitialized' => ['onShortcodesInitialized', 0] + ]; + + // Set admin specific events + if ($this->isAdmin()) { + $this->active = false; + $events = [ + 'onBlueprintCreated' => ['onBlueprintCreated', 0] + ]; + } + + // Register events + $this->enable($events); + } + } + + /** + * Extend page blueprints with mathjax configuration options. + * + * @param Event $event + */ + public function onBlueprintCreated(Event $event) + { + /** @var Blueprints $blueprint */ + $blueprint = $event['blueprint']; + if ($blueprint->get('form.fields.tabs')) { + $blueprints = new Blueprints(__DIR__ . '/blueprints/'); + $extends = $blueprints->get($this->name); + $blueprint->extend($extends, true); } } @@ -110,7 +133,7 @@ public function onPageContentRaw(Event $event) // Save modified page content with tokens as placeholders $page->setRawContent( - $this->mathjaxFunction($raw, $config->toArray(), $page) + $this->mathjaxFilter($raw, $config->toArray(), $page) ); } } @@ -127,11 +150,12 @@ public function onPageContentProcessed(Event $event) $page = $event['page']; // Normalize page content, if modified - if ($this->init()->modified()) { + $mathjax = $this->init(); + if ($mathjax->modified()) { // Get modified content, replace all tokens with their // respective formula and write content back to page $content = $page->getRawContent(); - $page->setRawContent($this->mathjax->normalize($content)); + $page->setRawContent($mathjax->normalize($content)); // Set X-UA-Compatible meta tag for Internet Explorer $metadata = $page->metadata(); @@ -149,8 +173,8 @@ public function onPageContentProcessed(Event $event) public function onTwigInitialized() { // Expose function - $this->grav['twig']->twig()->addFunction( - new \Twig_SimpleFunction('mathjax', [$this, 'mathjaxFunction'], ['is_safe' => ['html']]) + $this->grav['twig']->twig()->addFilter( + new \Twig_SimpleFilter('mathjax', [$this, 'mathjaxFilter'], ['is_safe' => ['html']]) ); } @@ -185,7 +209,7 @@ public function onTwigSiteVariables() $data_path = $grav['locator']->findResource('user://data'); // Check if MathJax library was properly installed locally - $installed = file_exists($data_path.DS.'mathjax'.DS.'MathJax.js'); + $installed = file_exists($data_path . DS .'mathjax' . DS . 'MathJax.js'); // Load MathJax library if ($this->config->get('plugins.mathjax.CDN.enabled') || !$installed) { @@ -194,7 +218,7 @@ public function onTwigSiteVariables() $grav['assets']->add($cdn_url); } elseif ($installed) { // Load MathJax library from user data path - $grav['assets']->add('user://data'.DS.'mathjax'.DS.'MathJax.js'); + $grav['assets']->add('user://data/mathjax/MathJax.js'); } } @@ -202,17 +226,33 @@ public function onTwigSiteVariables() * Filter to parse MathJax formula. * * @param string $content The content to be filtered. - * @param array $options Array of options for the MathJax formula function. + * @param array $options Array of options for the MathJax formula filter. * * @return string The filtered content. */ - public function mathjaxFunction($content, $params = []) + public function mathjaxFilter($content, $params = []) { // Get custom user configuration $page = func_num_args() > 2 ? func_get_arg(2) : $this->grav['page']; + $config = $this->mergeConfig($page, true, $params); + + // Render + $content = $this->init()->render($content, $config, $page); + + // Post-process contents + if (func_num_args() < 3) { + $content = $this->init()->normalize($content); - // Render MathJax formula - return $this->init()->process($content, $page->id()); + // Set X-UA-Compatible meta tag for Internet Explorer + $metadata = $page->metadata(); + $metadata['X-UA-Compatible'] = array( + 'http_equiv' => 'X-UA-Compatible', + 'content' => 'IE=edge' + ); + $page->metadata($metadata); + } + + return $content; } /** @@ -241,22 +281,6 @@ public function onShortcodesInitialized(Event $event) ); } - /** - * Extend page blueprints "with mathjax.process" configuration options. - * - * @param Event $event - */ - public function onBlueprintCreated(Event $event) - { - $blueprint = $event['blueprint']; - - if ($blueprint->get('form.fields.tabs')) { - $blueprints = new Blueprints(__DIR__ . '/blueprints/'); - $extends = $blueprints->get($this->name); - $blueprint->extend($extends, true); - } - } - /** ------------------------------- * Private/protected helper methods * -------------------------------- From ade092dd4a1fb23b0086c1d8aa0f71dd79becb5c Mon Sep 17 00:00:00 2001 From: Sommerregen Date: Wed, 18 Nov 2015 20:39:54 +0100 Subject: [PATCH 7/9] Rthe default configurations in page specific --- blueprints/mathjax.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blueprints/mathjax.yaml b/blueprints/mathjax.yaml index 8e3dcb6..70f74a6 100644 --- a/blueprints/mathjax.yaml +++ b/blueprints/mathjax.yaml @@ -21,7 +21,7 @@ form: type: toggle label: PLUGINS.MATHJAX.PROCESS highlight: 1 - default: 1 + '@config-default': plugins.mathjax.process options: 1: PLUGIN_ADMIN.YES 0: PLUGIN_ADMIN.NO From 5754b04b60ae31b76a1a576553728dd12f10409b Mon Sep 17 00:00:00 2001 From: Sommerregen Date: Wed, 18 Nov 2015 20:42:20 +0100 Subject: [PATCH 8/9] :octocat: Updated `.gitignore` --- .gitignore | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3767929..485dee6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -assets/logo.svg -*.xcf +.idea From cd7523eacb01bf34bd41f005e5d609c243a63fb9 Mon Sep 17 00:00:00 2001 From: Sommerregen Date: Wed, 18 Nov 2015 20:44:41 +0100 Subject: [PATCH 9/9] :maple_leaf: Version Update - Release v1.4.0 --- CHANGELOG.md | 11 +++++++++++ blueprints.yaml | 2 +- mathjax.php | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f56f79..9726cb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +# v1.4.0 +## 11/18/2015 + +1. [](#new) + * Added [#3](https://github.com/Sommerregen/grav-plugin-mathjax/pull/3) ("MathJax Process" toggle to page options tab) +2. [](#improved) + * Added Twig filter documentation to `README.md` + * Improved code +3. [](#bugfix) + * Fixed `mathjax` Twig filter + # v1.3.2 ## 09/09/2015 diff --git a/blueprints.yaml b/blueprints.yaml index e6b3400..c6aa4f1 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -1,5 +1,5 @@ name: MathJax -version: 1.3.2 +version: 1.4.0 description: "This plugin allows you to include math formulas in your web pages, either using TeX and LaTeX notation, and/or as MathML." icon: subscript author: diff --git a/mathjax.php b/mathjax.php index 31d3626..e681e86 100644 --- a/mathjax.php +++ b/mathjax.php @@ -1,6 +1,6 @@ * @author Benjamin Regler * @copyright 2015, Benjamin Regler