Things to do when updating Bludit
Photo by Markus Spiske: https://www.pexels.com/photo/green-and-yellow-printed-textile-330771/
I finally got around to update to the recent version of Bludit. And as I made two changes to files which will be overwritten, I made myself a small documentation.
Changing the default link target
Post with code example, here: https://admin.brennt.net/changing-the-default-link-target-in-bludits-tinymce
- Open file
bludit-folder/bl-plugins/tinymce/plugin.php
file - Search for
tinymce.init
- Then we add the
default_link_target: '_blank'
parameter at the end of the list - Don't forget to add a semicolon behind the formerly last parameter
Keep the syntax highlighting
Original post: https://admin.brennt.net/bludit-and-syntax-highlighting
- Open:
bludit-folder/bl-plugins/tinymce/tinymce/plugins/codesample/plugin.min.js
- Search for
<pre
and in the class property add line-numbers. It should now look like this:t.insertContent('<pre id="__new" class="language-'+a+' line-numbers">'+r+"</pre>")
A little after that pre you will also find
t.dom.setAttrib(e,"class","language-"+a)
, add the line-numbers class in there too, it should look like this:t.dom.setAttrib(e,"class","line-numbers language-"+a)
- Edit a random blogpost with code in it to verify that newly rendered pages get the line-numbers and syntax highlighting.
Check is the RSS-Feed works
- Access https://admin.brennt.net/rss.xml and verify there is content displayed.