Make default markup changeable through sinatra settings
This commit is contained in:
@@ -15,7 +15,8 @@ module Precious
|
||||
# We want to serve public assets for now
|
||||
set :public_folder, "#{dir}/public"
|
||||
set :static, true
|
||||
|
||||
set :default_markup, :markdown
|
||||
|
||||
set :mustache, {
|
||||
# Tell mustache where the Views constant lives
|
||||
:namespace => Precious,
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
$.GollumEditor({ NewFile: true });
|
||||
$.GollumEditor({ NewFile: true, MarkupType: '{{default_markup}}' });
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
||||
{{something}}
|
||||
@@ -39,6 +39,10 @@ module Precious
|
||||
def formats
|
||||
super(:markdown)
|
||||
end
|
||||
|
||||
def default_markup
|
||||
Precious::App.settings.default_markup
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user