<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Jekyll on Voltaicforge</title>
        <link>https://6e2dbc8c.voltaicforge.pages.dev/tags/jekyll/</link>
        <description>Recent content in Jekyll on Voltaicforge</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-au</language>
        <lastBuildDate>Tue, 10 May 2016 00:00:00 +0000</lastBuildDate><atom:link href="https://6e2dbc8c.voltaicforge.pages.dev/tags/jekyll/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>Responsive Images in Jekyll</title>
        <link>https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/jekyll-responsive-images/</link>
        <pubDate>Tue, 10 May 2016 00:00:00 +0000</pubDate>
        
        <guid>https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/jekyll-responsive-images/</guid>
        <description>&lt;img src="https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/jekyll-responsive-images/Code.jpg" alt="Featured image of post Responsive Images in Jekyll" /&gt;&lt;h2 id=&#34;responsive-images-the-jekyll-way&#34;&gt;Responsive images, the Jekyll way&lt;/h2&gt;
&lt;p&gt;One of the first things I did in my exploration of Jekyll was to go away from using GitHub to generate the site. The first limitation that frustrated me was the inability to use plugins. Currently, I only use one plugin that I couldn&amp;rsquo;t use on GitHub - which relates to responsive images.&lt;/p&gt;
&lt;p&gt;I shoot most of my pictures that I&amp;rsquo;m using for the site on my DSLR - which means I&amp;rsquo;m getting large pictures. I export from Lightroom via a preset I have setup. However, the process of resizing images for the web is an additional step in publishing a post. I want to be able to toss the image into a folder, type out some text in Notepad++, and upload the site without worrying about image size, resizing, srcset, etc.&lt;/p&gt;
&lt;p&gt;Without plugins, this means that all the images you have on your site are going to be resized in the browser - which is a big detractor for page load speed and general usability of the site.&lt;/p&gt;
&lt;p&gt;So I set out to find a plugin that would do responsive images (via srcset or picture tags) as well as automatically resizing the images, so I didn&amp;rsquo;t have to worry about anything except the parent image.&lt;/p&gt;
&lt;h2 id=&#34;jekyll-picture-tags&#34;&gt;Jekyll-picture-tags&lt;/h2&gt;
&lt;p&gt;After a bit of searching, I found three candidates for creating responsive images.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/wildlyinaccurate/jekyll-responsive-image&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Jekyll-responsive-images&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/robwierzbowski/jekyll-picture-tag&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Jekyll-picture-tags&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/netlify/jekyll-srcset&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Jekyll-srcset&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I found Jekyll-srset broken as of May 2016, and it did not generate multiple images. I couldn&amp;rsquo;t get Jekyll-responsive-images to run properly either.&lt;/p&gt;
&lt;p&gt;Jekyll-picture-tags works a treat after some setup. Unfortunately, it has poor error messages (generic Ruby messages) and was tough to debug.&lt;/p&gt;
&lt;p&gt;After installing into my &lt;code&gt;gemfile&lt;/code&gt;, I ended up on the following addition to &lt;code&gt;_config.yml&lt;/code&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;picture:
  source: &amp;#34;images&amp;#34;
  output: &amp;#34;images/resize&amp;#34;
  markup: &amp;#34;picture&amp;#34;
  presets:
    default:
      ppi: [1, 1.5, 2.0]
      source_medium:
        media: &amp;#34;(min-width: 40em)&amp;#34;
        width: &amp;#34;600&amp;#34;
      source_default:
        width: &amp;#34;600&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;blockquote class=&#34;book-hint info&#34;&gt;
  &lt;b&gt;Info:&lt;/b&gt; Ensure your indentation is correct if copying a config - misalignment&amp;rsquo;s will give you a dreaded generic error message &lt;code&gt;Liquid Exception: undefined method [] for nil:NilClass in _drafts/JekyllAnchors.md/#excerpt&lt;/code&gt;
&lt;/blockquote&gt;

&lt;blockquote class=&#34;book-hint warning&#34;&gt;
  &lt;b&gt;Warning:&lt;/b&gt; Also ensure your &lt;code&gt;base-url&lt;/code&gt; in &lt;code&gt;_config.yml&lt;/code&gt; is set to an empty string &amp;quot;&amp;quot; (&lt;code&gt;base-url:   &amp;quot;&amp;quot;&lt;/code&gt;). Without this, the images won&amp;rsquo;t be found or load correctly, even if it generates correctly.
&lt;/blockquote&gt;

&lt;p&gt;After much fiddling and debugging, I had it working. I decided to add it to my shortcuts in Notepad++ using &lt;a class=&#34;link&#34; href=&#34;https://github.com/erinata/FingerText&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;FingerText&lt;/a&gt;. I came up with the following code, which also allowed me to have an alt and title text in the tag.&lt;/p&gt;
&lt;p&gt;FingerText enables me Notepad++ users to write blocks of text with a single keyword (amongst other uses). So now when I type &lt;code&gt;respimage&lt;/code&gt; with a tab immediately after, the below code will be automatically inserted and the text between &lt;code&gt;$[![&lt;/code&gt; and &lt;code&gt;]!]&lt;/code&gt; will be selected upon each tab to allow me to enter the relevant details. Entering an Image Filename (from my /assets/images/ folder) and an Image title defines the image, and the Preset name will tell Jekyll-picture-tag which config branch to run - which dictates the which sets of images to include.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-liquid&#34; data-lang=&#34;liquid&#34;&gt;{% capture imagesrc %}$[![Image_Filename]!]{% endcapture %}
{% capture imagetitle %}$[![Image_Title]!]{% endcapture %}
&amp;lt;a href=&amp;#34;/assets/images/{{ imagesrc }}&amp;#34;&amp;gt;{% picture $[![Preset_name]!] {{ imagesrc }} alt=&amp;#34;{{ imagetitle }}&amp;#34; title=&amp;#34;{{ imagetitle }}&amp;#34; %}&amp;lt;/a&amp;gt;
{: .text-center}
&lt;/code&gt;&lt;/pre&gt;&lt;blockquote class=&#34;book-hint warning&#34;&gt;
  &lt;b&gt;Warning:&lt;/b&gt; Jekyll-picture-tag also hates spaces in picture filenames. Not that you should have spaces in filenames anyway, but that&amp;rsquo;s another thing I stumbled on.
&lt;/blockquote&gt;

&lt;p&gt;I now have images that (should) be responsive for mobile and desktop, and I don&amp;rsquo;t have to do the resizing myself.&lt;/p&gt;
</description>
        </item>
        <item>
        <title>Docking a PuTTY window into Notepad&#43;&#43;</title>
        <link>https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/ssh-terminal-in-notepadpp/</link>
        <pubDate>Sun, 01 May 2016 00:00:00 +0000</pubDate>
        
        <guid>https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/ssh-terminal-in-notepadpp/</guid>
        <description>&lt;img src="https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/ssh-terminal-in-notepadpp/putty_teaser.png" alt="Featured image of post Docking a PuTTY window into Notepad&#43;&#43;" /&gt;&lt;h2 id=&#34;challenge-of-developing-in-jekyll-via-remote-linux-server&#34;&gt;Challenge of developing in Jekyll via remote Linux server&lt;/h2&gt;
&lt;p&gt;During development of this site, I came across too many limitations with using Jekyll on Windows. You can use Jekyll in Windows with &lt;a class=&#34;link&#34; href=&#34;https://github.com/madhur/PortableJekyll&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;PortableJekyll&lt;/a&gt;, but I found the Windows environment still limited Jekyll. Mainly ImageMagick for using responsive images, which isn’t worth the hassle of setting up on Windows. I decided it was easier to spool up a Debian VM on my virtual server to install Gem/Ruby/Jekyll on. This lets me keep the website code on my NAS (allowing for easy cloud backup), code on Windows, and run Jekyll on Linux.&lt;/p&gt;
&lt;p&gt;However, swapping back and forward between a terminal and the website code to site build was annoying, so I decided to see if I could ‘dock’ a PuTTY terminal into Notepad++&lt;/p&gt;
&lt;h2 id=&#34;adding-a-putty-terminal-into-notepad&#34;&gt;Adding a Putty Terminal into Notepad++&lt;/h2&gt;
&lt;p&gt;I’ve been using &lt;a class=&#34;link&#34; href=&#34;https://notepad-plus-plus.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Notepad++&lt;/a&gt; to develop in Windows for quite some time now. It’s a fantastic little program for us Windows people. A docked PuTTY window would greatly improve my workflow.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/ssh-terminal-in-notepadpp/putty_terminal_in_npp2.png&#34;
  width=&#34;1179&#34;
  height=&#34;941&#34;
  srcset=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/ssh-terminal-in-notepadpp/putty_terminal_in_npp2_hu7d34ed4b4e283d1ea3b71933d17998e7_99800_480x0_resize_catmullrom_3.png 480w, https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/ssh-terminal-in-notepadpp/putty_terminal_in_npp2_hu7d34ed4b4e283d1ea3b71933d17998e7_99800_1024x0_resize_catmullrom_3.png 1024w&#34;
  loading=&#34;lazy&#34;
  
    alt=&#34;Picture of Notepad&amp;#43;&amp;#43; with attached PuTTY terminal&#34;
  
  
    class=&#34;gallery-image&#34; 
    data-flex-grow=&#34;125&#34;
    data-flex-basis=&#34;300px&#34;
  
&gt;
&lt;/p&gt;
&lt;p&gt;To do the same as I have above, it’s actually pretty simple.&lt;/p&gt;
&lt;p&gt;Download:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Plink&lt;/a&gt; - PuTTY command line&lt;/li&gt;
&lt;li&gt;&lt;del&gt;Ansicon&lt;/del&gt; - (Git repo defunct) Ansi escape sequence converter (to convert Linux CLI escape codes to Windows CLI, else the terminal doesn&amp;rsquo;t work well)&lt;/li&gt;
&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://sourceforge.net/projects/nppconsole/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;nppconsole&lt;/a&gt; - Notepad++ console plugin.
&lt;blockquote class=&#34;book-hint warning&#34;&gt;
  &lt;b&gt;Warning:&lt;/b&gt; I had to use the older &lt;code&gt;11.53&lt;/code&gt; ansicon version under Windows 10 x64, the later versions crashed frequently.
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The do the following&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Extract &lt;em&gt;NPPConsole&lt;/em&gt; to your Notepad++ plugins directory (Program Files x86/Notepad++/Plugins)&lt;/li&gt;
&lt;li&gt;Restart Notepad++ if it&amp;rsquo;s running&lt;/li&gt;
&lt;li&gt;Unzip and copy &lt;em&gt;plink&lt;/em&gt; and &lt;em&gt;ansicon&lt;/em&gt; to a folder of your choosing (I put them both in the Notepad++ folder as it&amp;rsquo;s where the CLI defaults to, and I’m lazy)&lt;/li&gt;
&lt;li&gt;Open a CLI at the Notepad++ folder and run &lt;code&gt;ansicon.exe plink.exe -ssh user@location -pw yourpasword&lt;/code&gt;, replacing the relevant parts with your user/server IP/password.&lt;/li&gt;
&lt;li&gt;All going well, you can now replicate that command in Notepad++. Open Notepad++, select &lt;em&gt;Plugins -&amp;gt; NppConsole&lt;/em&gt; (should be there if you restarted and copied the dll correctly). Run the command and you are set!&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If you have a saved profile in PuTTy you can replace the command with &lt;code&gt;ansicon plink -ssh SESSION_NAME&lt;/code&gt; , replacing &lt;code&gt;SESSION_NAME&lt;/code&gt; with your sessions name from the PuTTY dialogue. This works with key authentication as well, which I much prefer to use. This also saves you the risk of keeping a plaintext password in a potentially insecure location.&lt;/p&gt;
&lt;blockquote class=&#34;book-hint info&#34;&gt;
  &lt;b&gt;Info:&lt;/b&gt; You can use the plugin Nppexec as well instead of NppConsole - but I prefer Nppconsole for this.
&lt;/blockquote&gt;

&lt;p&gt;You now have a working CLI in Notepad++ that can call an SSH session. I wrote a few batch scripts, so I just have to run &lt;code&gt;site-dev&lt;/code&gt; in Windows to jump to my Linux VM that contains Jekyll, then &lt;code&gt;./site-dev&lt;/code&gt; to run a bash script to call up Jekyll in dev mode. Already having made a &lt;code&gt;site-push&lt;/code&gt; bash to push the site to Amazon AWS, so I don’t need to leave Notepad++ to do any development work.&lt;/p&gt;
&lt;p&gt;I couldn’t get Ctrl-C to work with either NppConsole or NppExec, both terminate the command without sending SIGTERM or similar to the PuTTY. Let me know if you figure out a way around this, as it means it’s difficult to gracefully terminate Jekyll. Workaround below.&lt;/p&gt;
&lt;h2 id=&#34;workaround-for-no-ctrl-c-to-exit-jekyll&#34;&gt;Workaround for no Ctrl-C to exit Jekyll&lt;/h2&gt;
&lt;p&gt;My workaround for this has become to have a PuTTY terminal open just for stopping Jekyll. This isn’t as bad as it sounds. Just write a bash script to kill ruby as follows:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;pgrep ruby &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; xargs &lt;span class=&#34;nb&#34;&gt;kill&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;blockquote class=&#34;book-hint warning&#34;&gt;
  &lt;b&gt;Warning:&lt;/b&gt; This will kill all ruby threads! Note this if you often have other ruby threads often running
&lt;/blockquote&gt;

&lt;p&gt;I saved it as &lt;code&gt;site-kill&lt;/code&gt;. My workflow is &lt;code&gt;site-dev&lt;/code&gt; for the development of this site (with dev flags for config, etc.), &lt;code&gt;site-push&lt;/code&gt; to rebuild the site from scratch and push to AWS. The new &lt;code&gt;site-kill&lt;/code&gt; kills off any ruby threads.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/ssh-terminal-in-notepadpp/ctrl_c_workaround.png&#34;
  width=&#34;932&#34;
  height=&#34;458&#34;
  srcset=&#34;https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/ssh-terminal-in-notepadpp/ctrl_c_workaround_huf87992d0dc7f47f66ab8f82d597439e6_35490_480x0_resize_catmullrom_3.png 480w, https://6e2dbc8c.voltaicforge.pages.dev/p/2016/05/ssh-terminal-in-notepadpp/ctrl_c_workaround_huf87992d0dc7f47f66ab8f82d597439e6_35490_1024x0_resize_catmullrom_3.png 1024w&#34;
  loading=&#34;lazy&#34;
  
    alt=&#34;Picture of using external ssh script to kill jekyll window instead of killing notepad&amp;#43;&amp;#43; CLI&#34;
  
  
    class=&#34;gallery-image&#34; 
    data-flex-grow=&#34;203&#34;
    data-flex-basis=&#34;488px&#34;
  
&gt;
&lt;/p&gt;
&lt;h2 id=&#34;bonus---markdown-highlighting-in-notepad&#34;&gt;Bonus - Markdown highlighting in Notepad++&lt;/h2&gt;
&lt;p&gt;The default colours finally made me crack during writing this post. Too much white! The language highlighting file I had for Markdown didn’t play ball with custom styles.&lt;/p&gt;
&lt;p&gt;I found a language highlighting file for Markdown on &lt;a class=&#34;link&#34; href=&#34;https://github.com/Edditoria/markdown_npp_zenburn&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;GitHub&lt;/a&gt; that had a file for the Zenburn colour scheme. This is what you can see in the screenshots above. So much better!&lt;/p&gt;
</description>
        </item>
        <item>
        <title>New Site</title>
        <link>https://6e2dbc8c.voltaicforge.pages.dev/p/2016/04/new-site/</link>
        <pubDate>Sat, 09 Apr 2016 00:00:00 +0000</pubDate>
        
        <guid>https://6e2dbc8c.voltaicforge.pages.dev/p/2016/04/new-site/</guid>
        <description>&lt;img src="https://6e2dbc8c.voltaicforge.pages.dev/p/2016/04/new-site/Code.jpg" alt="Featured image of post New Site" /&gt;&lt;h2 id=&#34;new-site-hits-the-internet&#34;&gt;New Site hits the Internet&lt;/h2&gt;
&lt;p&gt;Finally found the inspiration to build a nice personal site. I&amp;rsquo;ve been toying with &lt;a class=&#34;link&#34; href=&#34;https://www.wordpress.com&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Wordpress&lt;/a&gt; for some time, but it&amp;rsquo;s quite bloated for a nice basic site. And then there&amp;rsquo;s the security hassles, addons, database setup, theme setup, etc. It&amp;rsquo;s so far beyond what I want to be doing for a personal site it&amp;rsquo;s not funny.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve wanted to be getting posts back online about projects and tinkering I&amp;rsquo;m always doing, so that will be the aim for this site. I&amp;rsquo;ve also been looking for some time for a better layout to be able to post about projects. The default blogging layout to be &lt;em&gt;inadequate&lt;/em&gt; for something project like, or anything that is posted about over time. Making a visitor have to browse multiple posts to piece together the history of one project really doesn&amp;rsquo;t work.&lt;/p&gt;
&lt;p&gt;With what I&amp;rsquo;m crafting here, I will be able to have static pages for projects that can be appended to over time to add up to one larger page per project. Most likely with blog posts for updates or miscellaneous stuff that fits on the site. I&amp;rsquo;ll also be planning to write up some mini-guides for things I&amp;rsquo;ve come across in my hobby projects.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve gone with an &lt;a class=&#34;link&#34; href=&#34;https://aws.amazon.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;AWS&lt;/a&gt; approach, along with using &lt;a class=&#34;link&#34; href=&#34;https://jekyllrb.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Jekyll&lt;/a&gt;. This gives me a simpler way of posting and updating a site without the big CMS overhead, and after skipping over static site generators as being probably more effort than their worth, I went back to check out Jekyll, then using Jekyll with S3 and AWS. And that was the end of that search.&lt;/p&gt;
&lt;p&gt;I &lt;em&gt;thoroughly&lt;/em&gt; enjoy the ease of use of Markdown for writing HTML and if you haven&amp;rsquo;t checked it out and have some basic HTML background, definitely check it out.&lt;/p&gt;
&lt;p&gt;Now its time go get cracking writing up all the projects past and present and getting the site filled out.&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
