Add mathjax using SSL CDN.
This commit is contained in:
@@ -138,6 +138,7 @@ module Precious
|
||||
@page = wiki.preview_page(@name, params[:content], params[:format])
|
||||
@content = @page.formatted_data
|
||||
@toc_content = wiki.universal_toc ? @page.toc_data : nil
|
||||
@mathjax = wiki.mathjax
|
||||
@editable = false
|
||||
mustache :page
|
||||
end
|
||||
@@ -235,6 +236,7 @@ module Precious
|
||||
@editable = true
|
||||
@content = page.formatted_data
|
||||
@toc_content = wiki.universal_toc ? @page.toc_data : nil
|
||||
@mathjax = wiki.mathjax
|
||||
|
||||
mustache :page
|
||||
elsif file = wiki.file(name)
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
<script type="text/javascript" src="/javascript/gollum.dialog.js"></script>
|
||||
<script type="text/javascript" src="/javascript/gollum.placeholder.js"></script>
|
||||
|
||||
<script type="text/javascript"
|
||||
src="/javascript/editor/gollum.editor.js"></script>
|
||||
<script type="text/javascript" src="/javascript/editor/gollum.editor.js"></script>
|
||||
{{#mathjax}}<script type="text/javascript" src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>{{/mathjax}}
|
||||
<title>{{title}}</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -67,12 +67,18 @@ module Precious
|
||||
def sidebar_format
|
||||
has_sidebar && @sidebar.format.to_s
|
||||
end
|
||||
|
||||
def has_toc
|
||||
!@toc_content.nil?
|
||||
end
|
||||
|
||||
def toc_content
|
||||
@toc_content
|
||||
end
|
||||
|
||||
def mathjax
|
||||
@mathjax
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user