# DokuWiki Consolidation Feasibility **DokuWiki Consolidation Feasibility** looks at reinstalling vanilla DokuWiki and splitting the current core patches and custom plugins into a set of independent plugins, some site-specific and some reusable, plus moving all styling into a single `yanevskiv` template. Short version: the template side is basically already done, most core patches can move into plugins, a small unavoidable cluster can't, and digging into this surfaced both a chunk of dead code and an undisclosed fork that changed the plan. ## Verdict up front A literally vanilla core is not achievable — the `.md` extension change has no plugin hook anywhere in DokuWiki's API, full stop. Everything else currently patched into core either has a real event to hook (move it to a plugin) or turns out to be unused code that should just be deleted on reinstall rather than carried forward at all. The original framing of this report — "one `yanevskiv` plugin holding everything" — also changed shape: most of what was headed there splits out into small, independent, individually reusable plugins instead, with `yanevskiv` left as the site-specific leftover, not the main event. ## Template: nothing to do `lib/tpl/yanevskiv/` is already a single template with its own git repo, and every styling change made so far (`_links.css` link colors, WIP CSS, favicon-lookup-in-template question from earlier) already lives there. "Consolidate styling into one template" is already the current state — a fresh install just needs this directory copied over wholesale. ## Core patches that can become plugin hooks - **Cache invalidation on save** (`inc/Action/Save.php`). `COMMON_WIKIPAGE_SAVE` fires at the right point; an action plugin hooking it and calling `CacheInstructions`/`CacheRenderer` reproduces this with zero core changes. - **Open Graph tags** (`tpl_socialcard()` in `inc/template.php`). `TPL_METAHEADER_OUTPUT` fires exactly where these are injected now; move to an action plugin hooking that event. - **Ace editor** (`inc/Ui/Editor.php`, `inc/template.php`). `EDIT_FORM_ADDTEXTAREA` exists specifically to let a plugin replace what `addTextarea()` renders — `Event::createAndTrigger()` is called with `$canPreventDefault = true` at `inc/Ui/Editor.php:123`, so a plugin handler that calls `$event->preventDefault()` stops DokuWiki's own `addTextarea()` from running at all and substitutes its own markup instead. This isn't a workaround, it's the literal mechanism the event exists for. The Ace `