Also generate table of contents when loading the page
This commit is contained in:
parent
b96edd8b9a
commit
216f034b6d
@ -126,6 +126,7 @@ class Wiki extends \Zotlabs\Web\Controller {
|
|||||||
$content = ($p['content'] !== '' ? $p['content'] : '"# New page\n"');
|
$content = ($p['content'] !== '' ? $p['content'] : '"# New page\n"');
|
||||||
// Render the Markdown-formatted page content in HTML
|
// Render the Markdown-formatted page content in HTML
|
||||||
require_once('library/markdown.php');
|
require_once('library/markdown.php');
|
||||||
|
$content = wiki_generate_toc($content);
|
||||||
$renderedContent = wiki_convert_links(Markdown(json_decode($content)),argv(0).'/'.argv(1).'/'.$wikiUrlName);
|
$renderedContent = wiki_convert_links(Markdown(json_decode($content)),argv(0).'/'.argv(1).'/'.$wikiUrlName);
|
||||||
$hide_editor = false;
|
$hide_editor = false;
|
||||||
$showPageControls = $wiki_editor;
|
$showPageControls = $wiki_editor;
|
||||||
|
Reference in New Issue
Block a user