summary: "Today I finally got around to modifying my <ahref='https://ghost.org/'target='_blank'>Ghost</a> blog to make use of my new Node Module <ahref='//blog.marcusnoble.co.uk/publishing-my-first-npm-module/'>Truncatise</a>.<br/><br/>This didn't go as smoothly as I hoped."
Today I finally got around to modifying my [Ghost](https://ghost.org/) blog to make use of my new Node Module [Truncatise](/2013-10-29-publishing-my-first-npm-module/).
First, I discovered a [bug](//github.com/AverageMarcus/Truncatise/issues/1) in my module. It was incorrectly handling the combination of `<p>` tags with double newlines when truncating to paragraphs.
To resolve this I needed to determine whether or not to use double newline to indicate a paragraph. This was done by ignoring any newlines between paragraph tags and better regular expression matching.
I also noticed an issue with the suffix, e.g. …, when used with `<p>` tags, it was rending after the and of the tag and thus display on a new line. _Whoops!_ Not what is expected. A quick little replace when not stripping HTML solved this.
So, finally I published version 0.0.2 of [Truncatise](//npmjs.org/package/truncatise) to the NPM repository (as well as [GitHub](//github.com/AverageMarcus/Truncatise)).
As I was now happy that the issues were resolved, I made progress on modifying the Ghost helper source code to use Truncatise instead of [downsize](//npmjs.org/package/downsize).
My changes have been pushed to my [fork of Ghost](//github.com/AverageMarcus/Ghost) if anyone wishes to make use of it.
## On Updating Ghost
I got into a bit of a mess when trying to update my copy of Ghost with the latest changes, mainly due to my carelessness. So I don't get into the same situation in the future, and to prevent others making my mistakes, here are my little tips to bare in mind:
1. Back up the `./content/data/` directory before doing anything!
2. If needed also backup your `./content/themes/` directory.
3. Copy across the new `./core`, `packages.json`, `index.js` and `Gruntfile.js`
4.`npm install -g grunt-cli`
5.`npm install --production`
6.`grunt init prod`
> If you get errors relating to sqlite3…
Run `npm install sqlite3 --build-from-source=sqlite3`
# Update:
I have since moved away from Ghost and now using Jekyll