You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2017/06/27 13:29:06 UTC
[5/7] sling-site git commit: Replace [TOC] with a comment for now
Replace [TOC] with a comment for now
Project: http://git-wip-us.apache.org/repos/asf/sling-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/sling-site/commit/aa0b1ab2
Tree: http://git-wip-us.apache.org/repos/asf/sling-site/tree/aa0b1ab2
Diff: http://git-wip-us.apache.org/repos/asf/sling-site/diff/aa0b1ab2
Branch: refs/heads/master
Commit: aa0b1ab204fbd57b2498e68e6fc51e744881540b
Parents: 2376700
Author: Bertrand Delacretaz <bd...@apache.org>
Authored: Tue Jun 27 14:12:58 2017 +0200
Committer: Bertrand Delacretaz <bd...@apache.org>
Committed: Tue Jun 27 14:12:58 2017 +0200
----------------------------------------------------------------------
templates/page.tpl | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/sling-site/blob/aa0b1ab2/templates/page.tpl
----------------------------------------------------------------------
diff --git a/templates/page.tpl b/templates/page.tpl
index 838db2f..6bf3a48 100644
--- a/templates/page.tpl
+++ b/templates/page.tpl
@@ -1,3 +1,8 @@
+def processTOC(str) {
+ def replacement ='<!-- TODO reactivate TOC once JBake moves to flexmark-java -->\n'
+ return str.replaceAll('\\[TOC\\]', replacement)
+}
+
layout 'layout/main.tpl', true,
projects: projects,
bodyContents: contents {
@@ -5,7 +10,7 @@ layout 'layout/main.tpl', true,
div(class:"row"){
div(class:"small-12 columns"){
section(class:"wrap"){
- yieldUnescaped content.body
+ yieldUnescaped processTOC(content.body)
}
}
}