1<?php
2/**
3 * Plugin asciidocjs - Use asciidoc inside dokuwiki
4 *
5 * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
6 * @author     RĂ¼diger Kessel  <ruediger.kessel@gmail.com>
7 */
8
9if (!defined('DOKU_INC')) {
10    die();
11}
12
13class action_plugin_asciidocjs extends DokuWiki_Action_Plugin
14{
15
16 public function register(Doku_Event_Handler $controller) {
17        $controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this,
18                                   '_loadasciidocjs');
19    }
20
21    public function _loadasciidocjs(Doku_Event $event, $param) {
22        $event->data['link'][] = array (
23                            'rel'     => 'stylesheet',
24                            'type'    => 'text/css',
25                            'href'    => DOKU_BASE."lib/plugins/asciidocjs/node_modules/@asciidoctor/core/dist/css/asciidoctor.css",
26                    );
27
28    }
29
30}
31
32