Recently made some study notes in the blog park. One is the official Swift book from Apple, and the other is learning scheme with the school classroom (SICP).
Neither of these languages is widely spoken (or swift newness). The original Windows Live Writer code highlighting plugin in the blog Park does not apply to these languages.
So I had to find my own way. First I found the highlight.js this JS highlight plugin. Search to its official website. Follow the steps to deploy in the blog park.
It should be noted that the blog park I have not yet found how to add an outside chain.
The CSS and JS downloaded from Highlightjs have no place to upload. So I directly choose violence to paste its content into the blog Park header (
After testing, Swift can be highlighted. But here it is still a little imperfect. Highlightjs asked us to put the code in <pre><code></code></pre>.
Every time you write a blog, it's a lot of trouble to add it to the HTML code Editor. So I thought that I should use the plugin function of Windows Live Writer, type a piece of code to automatically add this tag.
Specific plug-in development online are available. The link I referred to cannot be found. However, it is easy to put the DLL in the C # class library under the Live Writer plugin folder.
The API directly refers to Windows Live Writer.dll (a file similar to the one in the writer folder). Since then I can use my own plugin to highlight the code.
This method is very versatile. Because Highlightjs also supports many languages, more than the blog Park plugin. You can customize according to your own situation. :)
New language code highlighting and Windows Live writer plugin development