Archive for category Blogging
This is my last post on Wordpress.
My blog has moved here.
The reasons for the move are:
- I want everything to be part of my website
- I want to be able to write posts faster which my new blog enables me to do via:
- markdown support
- built in code highlighting
- external snippet support
In case you got interested, check out the blogging engine I created to enable that:
NodeJs powered Developer blOGging engine.
Four simple Steps
- Open the code sample in your favorite editor (that would be vim)
- Execute :TOhtml (this generates a complete html file including a <style> section that contains the needed CSS and a <body> section that contains the HTMLversion of your code)
- Copy the generated CSS into the CSS file of your blog (in wordpress you’d get there via Appearance/Edit CSS)
- Include the generated HTML body in your blog
I haven’t tried this, but alternatively you could just copy the entire html (including the <style>) into your blog and thus combine steps 3 and 4.
The disadvantage of that approach is that in this case you’d have to include the CSS part in every blog that has a code sample.
If you don’t want to upgrade
In case you don’t want to pay the $15/year for the Custom CSS upgrade, scrap steps 3 and 4 and instead do the following in order to inline the CSS.
- Copy the code generated in step 2 from above to the clipboard
- Go to http://premailer.dialect.ca/
- Select Paste HTML as the source
- Paste your code into the text field
- In the Options check everything except Don’t remove <style> and <link> elements
- Hit Submit and copy the HTML results
- Include the copied HTML in your blog