Make mathjax.config.js the standard filename. Fixes #1340.

This commit is contained in:
Bart Kamphorst
2018-12-28 22:07:07 +01:00
parent 58225c7c20
commit 006dd36078
2 changed files with 4 additions and 7 deletions
+1 -4
View File
@@ -134,6 +134,7 @@ MSG
opts.on("--mathjax", "Enable MathJax (renders mathematical equations).",
"By default, uses the 'TeX-AMS-MML_HTMLorMML' config with the 'autoload-all' extension.") do
wiki_options[:mathjax] = true
wiki_options[:mathjax_config] = 'mathjax.config.js'
end
opts.on("--critic-markup", "Enable support for annotations using CriticMarkup.") do
wiki_options[:critic_markup] = true
@@ -155,10 +156,6 @@ MSG
"Can be set to 'gravatar', 'identicon' or 'none'. Default: 'none'.") do |mode|
wiki_options[:user_icons] = mode
end
opts.on("--mathjax-config [FILE]", "Specify path to a custom MathJax configuration.",
"If not specified, uses the '<git-repo>/mathjax.config.js' file.") do |file|
wiki_options[:mathjax_config] = file || 'mathjax.config.js'
end
opts.on("--template-dir [PATH]", "Specify custom mustache template directory.") do |path|
wiki_options[:template_dir] = path
end
+3 -3
View File
@@ -152,15 +152,15 @@ module Precious
end
end
get %r{/(edit|create)/custom\.(js|css)} do
get %r{/(edit|create)/(custom|mathjax\.config\.)\.(js|css)} do
forbid('Changing this resource is not allowed.')
end
post %r{/(delete|rename|edit|create)/custom\.(js|css)} do
post %r{/(delete|rename|edit|create)/(custom|mathjax\.config\.)\.(js|css)} do
forbid('Changing this resource is not allowed.')
end
post %r{/revert/custom\.(js|css)/.*/.*} do
post %r{/revert/(custom|mathjax\.config\.)\.(js|css)/.*/.*} do
forbid('Changing this resource is not allowed.')
end