Today is December 1st, the first day of advent, a time to panic about Christmas shopping and reflect on the year. The nights are drawing in towards the shortest day of the year and winter has arrived. It certainly felt like that this morning as I walked through the woods, the rain pelted down and the trees are now almost bare, there is definetly less signs of life around, except for the abdudance of pheasants and the distant shots of sportsmen. The Bewick swans have returned to the wetlands of Gloucestershire from their summer home on the Russian tundra and it seems that the outdoors is settling down for its deep winter sleep.

2018 has been an odd year for me. I started the year in Cambodia and Vietnam, before returning to the UK at the end of February to be faced with snow, nowhere to live and no job. I'm now finishing the year having just bought a house and I am several months into my new job. I wonder what 2019 will bring?

Using Restructured Text in Nikola My Tweaks and Tips


So I've started to use ResSructured text to write my posts instead of markdown as it is just as quick as markdown and it's easier to use more of the native features in nikola like shortcodes and plugins. The ReStructured text documentation covers most things, but to have a greater amount of contril over my posts I needed to use the following tweaks. So here are my tweaks and tips when writing in Restructured text in Nikola with a bit of HTMl and Nikola's Python shortcodes thrown in.

Add html into your posts

At times you might want to add some html directly into your posts, if you wanted to embed an iframe for example. In Nikola their seems like there is more than one way of doing things. If it was something you wanted on lots of pages you'd set up a template; but if it is a one off and you wanted to embed html into one post, you could add in the following code.

 .. raw:: html 

Add a blank line when using ReStructred text

If you regularly want to change the padding of your page, you're better off changing the css in the theme. But if you're a beginner (like me), lazy (like me) or only want to do it once, you can add in a blank line by using a 'pipe' character.


Using # to link to a section of a post

This can be useful if you want to direct people via an external link to a section of your post.

So if I have an internal link already set up (like post above) the hyperlink will be the normal page address and then #link_name and that can be used as an external link that will take you to the section of a page. for example:

Use alignment with the images and thumbnail shortcode

  .. thumbnail:: /images/image.jpg
                   :align: left


You might end up here!