Fixed broken links
Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
parent
a3f0a74535
commit
a8295a7321
@ -10,7 +10,7 @@ For the past week or so (since setting up my new blog) I've been working on a ne
|
|||||||
|
|
||||||
Why have I been doing this you ask? Well, very quickly after putting together the theme for this [Ghost](https://ghost.org/) blog I notice a small annoyance. The helper used to generate excerpts of post for the main page can only truncate based on character or word count. This seemed like a bit of a shortcoming to me, I wanted to be able to truncate on paragraphs so text isn't cut off mid-sentence.
|
Why have I been doing this you ask? Well, very quickly after putting together the theme for this [Ghost](https://ghost.org/) blog I notice a small annoyance. The helper used to generate excerpts of post for the main page can only truncate based on character or word count. This seemed like a bit of a shortcoming to me, I wanted to be able to truncate on paragraphs so text isn't cut off mid-sentence.
|
||||||
|
|
||||||
And so [Truncatise](//github.com/AverageMarcus/Truncatise) was born!
|
And so [Truncatise](https://github.com/AverageMarcus/Truncatise) was born!
|
||||||
|
|
||||||
As this is my first forte into NPMs I used it as a learning experience.
|
As this is my first forte into NPMs I used it as a learning experience.
|
||||||
|
|
||||||
|
@ -10,15 +10,15 @@ Today I finally got around to modifying my [Ghost](https://ghost.org/) blog to m
|
|||||||
|
|
||||||
This didn't go as smoothly as I hoped.
|
This didn't go as smoothly as I hoped.
|
||||||
|
|
||||||
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.
|
First, I discovered a [bug](https://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.
|
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.
|
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)).
|
So, finally I published version 0.0.2 of [Truncatise](https://npmjs.org/package/truncatise) to the NPM repository (as well as [GitHub](https://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).
|
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](https://npmjs.org/package/downsize).
|
||||||
|
|
||||||
#### Original:
|
#### Original:
|
||||||
<pre><code class="javascript">
|
<pre><code class="javascript">
|
||||||
@ -73,7 +73,7 @@ coreHelpers.excerpt = function (options) {
|
|||||||
};
|
};
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
My changes have been pushed to my [fork of Ghost](//github.com/AverageMarcus/Ghost) if anyone wishes to make use of it.
|
My changes have been pushed to my [fork of Ghost](https://github.com/AverageMarcus/Ghost) if anyone wishes to make use of it.
|
||||||
|
|
||||||
## On Updating Ghost
|
## On Updating Ghost
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ But before all that we all, obviously, had to do the hardware equivalent of ["He
|
|||||||
|
|
||||||
One of the main things I did learn at this early stage was to make sure Linux is correctly set up. By default the port the Arduino is set to (likely `/dev/ttyacm0`) has permissions that prevent users from accessing it. Resolve this by either adding yourself to the correct group or by `chmod`ing it to be more permissive.
|
One of the main things I did learn at this early stage was to make sure Linux is correctly set up. By default the port the Arduino is set to (likely `/dev/ttyacm0`) has permissions that prevent users from accessing it. Resolve this by either adding yourself to the correct group or by `chmod`ing it to be more permissive.
|
||||||
|
|
||||||
To program against ardunio using JavaScript we were advised to use a library call [johnny-five](ttps://github.com/rwaldron/johnny-five). I highly recommend it is you are planning on doing any hardware programming as it does support a range of different boards. There is also a **LOT** of examples so it is pretty easy to get up and running with whatever you want.
|
To program against ardunio using JavaScript we were advised to use a library call [johnny-five](https://github.com/rwaldron/johnny-five). I highly recommend it is you are planning on doing any hardware programming as it does support a range of different boards. There is also a **LOT** of examples so it is pretty easy to get up and running with whatever you want.
|
||||||
|
|
||||||
So with this all set up I started playing with some of the sensors available. A nice easy one to start with was the temperature sensor. It was easy to wire up, all it needed was 5v in, a ground and a data cable. Once wired up, the code is pretty simple.
|
So with this all set up I started playing with some of the sensors available. A nice easy one to start with was the temperature sensor. It was easy to wire up, all it needed was 5v in, a ground and a data cable. Once wired up, the code is pretty simple.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user