<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Chris Kaminski • Blog</title>
		<description>I design digital experiences and manage the people, processes, and technologies that make them great.</description>		
		<link>http://localhost:4000</link>
		<atom:link href="http://localhost:4000/feed.xml" rel="self" type="application/rss+xml" />
		
			<item>
				<title>Building My Site: Design</title>
				<description>&lt;p&gt;When I decided to update my site, I wasn’t looking for a job — my &lt;a href=&quot;http://tobiasandtobias.com&quot;&gt;current employer&lt;/a&gt; is a great company to work for. But having lived through the &lt;a href=&quot;http://alistapart.com/article/dystopia&quot;&gt;dot-bomb crash&lt;/a&gt;, the closing of two employers, the &lt;a href=&quot;http://www.rollingstone.com/politics/news/mortgage-bubble-blamed-ludicrously-on-the-government-20101117&quot;&gt;subprime crisis&lt;/a&gt;, and seemingly annual layoffs when I worked for &lt;a href=&quot;http://yahoo.com&quot;&gt;Yahoo!&lt;/a&gt; I know that things can change quickly, and wanted to get my portfolio up to date. Just in case.&lt;/p&gt;

&lt;p&gt;Faced with the task of redesigning a website that hadn’t been touched in a decade, I approach it as I would client work: gather the requirements, determine the process necessary, do the research, formulate the design principles, and execute a design.&lt;/p&gt;

&lt;!--more--&gt;

&lt;h2 id=&quot;requirements&quot;&gt;Requirements&lt;/h2&gt;

&lt;p&gt;The goal of the redesign was to have up-to-date materials ready if I suddenly found myself needing to apply for a new job. So the functional requirements of the site were simple: make it easy to find and skim my CV and portfolio on the web, and allow users to download them for printing, filing, or emailing. It also needed to be easy to update the site so I could keep it current.&lt;/p&gt;

&lt;p&gt;Non-functional requirements were equally simple. The design needed to present a contemporary, professional image that wouldn’t date quickly and would reflect my qualities as a designer: analytical and research-heavy with traditional graphic design training and a strong background in web technology.&lt;/p&gt;

&lt;p&gt;Finally, to help potential employers remember me I wanted the site to operate with an identity system which included business cards and the PDF and print versions of my CV and portfolio. So the design had to translate well to other media and contexts. &lt;/p&gt;

&lt;h2 id=&quot;process&quot;&gt;Process&lt;/h2&gt;

&lt;p&gt;With such simple functional requirements, a full-on design process with user flows and personas and the like is overkill. Similarly, the content of the site would be dead simple: portfolio, CV. That’s it. No need for a site map or concept model.&lt;/p&gt;

&lt;p&gt;The process would also be simple: background research, high-level content design and layout, then refine the visual design. &lt;/p&gt;

&lt;h2 id=&quot;research&quot;&gt;Research&lt;/h2&gt;

&lt;p&gt;With the basic requirements established, I began my research. First was a literature review of &lt;a href=&quot;https://medium.com/@timj/refuse-to-create-a-ux-portfolio-a44f802fee11&quot;&gt;articles&lt;/a&gt; and &lt;a href=&quot;http://www.slideshare.net/lynnteo/portfolios-matter&quot;&gt;the like&lt;/a&gt; on UX portfolios. Next, I did a competitive analysis of sites from other &lt;a href=&quot;http://www.evalotta.net&quot;&gt;UX designers&lt;/a&gt; and &lt;a href=&quot;http://www.cooper.com&quot;&gt;agencies&lt;/a&gt;. Finally, I spoke with friends and colleagues who have hired UX designers.&lt;/p&gt;

&lt;p&gt;The strongest theme that emerged from the research was that a UX portfolio needs to show process and thinking, not just outputs. That requires a ‘case study’ approach, with a balance between text and images: the images should illustrate text descriptions of my thinking, and the text should explain the context and function of the designs in the images.&lt;/p&gt;

&lt;p&gt;Contrary to my expectations (and my own experience when hiring), many employers &lt;em&gt;do&lt;/em&gt; look at portfolios on mobile phones. So the design not only had to be responsive, but had to work on slow network connections or if JavaScript failed to load.&lt;/p&gt;

&lt;p&gt;As well, hiring managers I spoke to said that their biggest problem when hiring is sifting through the large number of applicants. When they first review a portfolio or CV quickly they look as much for reasons to discard an applicant as for reasons to contact them. So unlike a visual design portfolio, where showing your style is important, for UX it’s more important not to make a bad impression than it is to ‘wow’ the visitor.&lt;/p&gt;

&lt;p&gt;It also was clear I needed to do more than just show my work. I needed to show how I think and communicate about design, and that I do so outside of the strict confines of client work. The easiest way to do that would be to include a simple blog. &lt;/p&gt;

&lt;h2 id=&quot;principles&quot;&gt;Principles&lt;/h2&gt;

&lt;p&gt;The insight from my research, together with my requirements, yielded a set of design principles:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Content over UI:&lt;/strong&gt; follow a Beatrice Warde ‘&lt;a href=&quot;http://gmunch.home.pipeline.com/typo-L/misc/ward.htm&quot;&gt;Crystal Goblet&lt;/a&gt;’ approach, aiming to enhance the experience of the content rather than the UI being the experience itself.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Be fast and responsive:&lt;/strong&gt; avoid heavy script libraries and images, except where they are absolutely necessary (e.g. to illustrate my projects in the portfolio), and ensure the site works a wide range of hardware and software.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Make it modern:&lt;/strong&gt; make judicious use of modern web techniques such as web fonts and CSS transitions to add some richness and demonstrate that I keep up to date with technology.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Keep it simple:&lt;/strong&gt; avoid complex layouts and bespoke pages so that when I update the site I can focus on creating the content, not copyfitting or production.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Stay true to the web:&lt;/strong&gt; the site is a collection of documents, not an app, so it should employ traditional web conventions like underlined inline links and visited link styles.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Emphasise typography:&lt;/strong&gt; even on image-heavy portfolio pages there will be plenty of text, so pay attention to typographic details like curly quotes, letter spacing, and hanging bullets.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;solution&quot;&gt;Solution&lt;/h2&gt;

&lt;p&gt;I started with a CV layout that I’d been honing for some years: name and contact details at the upper right where they’re visible when thumbing through a stack of pages, blank space below for notes, generous left margin for stapling or sticking in a folder. With the main navigation inserted to the left it also worked well for the web at desktop/large tablet sizes, leaving a nice clear column, sized relative to the text to keep an optimal line length for reading. Using &lt;samp&gt;position: fixed;&lt;/samp&gt; on the header and navigation allowed me to keep my name and contact and download links always handy.&lt;/p&gt;

&lt;p&gt;In narrower viewports, I prioritised keeping the content column at an optimal width so images would remain as large as possible. That meant moving first the header, then the navigation to the top. When the navigation moves up, the header switches sides so the top line reads across: ‘Chris Kaminski: Blog, CV, Portfolio’. In very narrow widths, the navigation drops to the bottom to avoid excessive scrolling&lt;/p&gt;

&lt;p&gt;Did want to demonstrate visual design background, so good typography. Also an old-school web person, so wanted it to be of the web: responsive design, underlined links, visited link styles.&lt;/p&gt;

&lt;p&gt;Finally, I wanted the mood to be cool and modern to reflect the fact I work with digital products, and take a analytical,  research-heavy approach to design.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;typography&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Wanted to use a single font family: in line with minimalist philosophy, not so much to download. Also, most of the best pairings are with serif fonts, but serif fonts tend to have a warmer, more classical mood than I desired.&lt;/p&gt;

&lt;p&gt;Because I wanted to restrict myself to a single family, the font had to work in print as well as on the web. I also wanted a variety of weights so it wouldn’t get too monotonous. &lt;/p&gt;

&lt;p&gt;FF DIN https://www.fontshop.com/families/ff-din
DIN Next http://www.linotype.com/517415/DINNext-family.html&lt;/p&gt;

&lt;p&gt;I’ve always had a soft spot for DIN, despite the fact it’s something of a design cliché. In fact, I initially wanted to use &lt;a href=&quot;https://www.fontshop.com/families/ff-din&quot;&gt;FF DIN&lt;/a&gt;, an update of the classic DIN font by &lt;a href=&quot;https://www.fontshop.com/designers/albert-jan-pool&quot;&gt;Albert-Jean Pool&lt;/a&gt;, for this website (and my CV, business cards, etc.) but just couldn’t justify the licensing costs for personal use. I also looked at &lt;a href=&quot;http://www.linotype.com/517415/DINNext-family.html&quot;&gt;DIN Next&lt;/a&gt; by &lt;a href=&quot;http://www.linotype.com/469/akirakobayashi.html&quot;&gt;Akira Kobayashi&lt;/a&gt;, but wasn’t fond of the way rendered as a web font, particularly the bolder weights. &lt;/p&gt;

&lt;p&gt;So I looked at alternatives. News Gothic offers a vertical emphasis somewhat similar to DIN, but only comes in a limited number of weights. I looked at Roboto and it’s predecessor Droid Sans, but they’re &lt;a href=&quot;http://typographica.org/on-typography/roboto-typeface-is-a-four-headed-frankenstein/&quot;&gt;frankenfonts&lt;/a&gt;, and in any event too closely associated with the Android platform — I’m not a Google product. I’d used Helvetica Neu for previous versions of my CV, but it just felt too ‘upscale design studio’ for the website. I also tried Futura, which I’ve always admired, but for body copy…no. It would need a second face, and I’d already ruled that out. &lt;/p&gt;

&lt;p&gt;Then  &lt;a href=&quot;http://www.adobe.com/products/type/font-designers/paul-hunt.html&quot;&gt;Paul D. Hunt&lt;/a&gt; used it as inspiration for Adobe Source Sans. &lt;/p&gt;

&lt;p&gt;Source Sans doesn’t have vertical emphasis of DIN or News Gothic, and carries a bit more warmth than either. But it does have&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;colours&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;white: respectful of environment &amp;amp; potential employers (doesn’t waste printer ink); black prints text clearly regardless of printer (grey may suffer from halftoning/blurry edges); red prints OK on monochrome, adds a bit of colour/interest on colour and stands out against both the white BG and the black text.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;layout&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;on CV, name &amp;amp; contact details in upper right as when stapled, paper-clipped, put in folder people using left-to-right languages fasten on left &amp;amp; riffle right edge&lt;/p&gt;

&lt;p&gt;on web, no riffling but wanted to balance navigation, traditionally on left; smaller widths, logo on right: tablet view has nav on top, reads badly with logo on right; on mobile, nav on bottom but right-aligned logo is unbalanced&lt;/p&gt;

&lt;p&gt;Width defined by max comfortable line length for 16px text, margins and spacing also defined by text size.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
				<pubDate>Thu, 12 Nov 2015 00:09:09 +0000</pubDate>
				<link>http://localhost:4000/2015/11/12/building-my-site-design/</link>
				<guid isPermaLink="true">http://localhost:4000/2015/11/12/building-my-site-design/</guid>
			</item>
		
			<item>
				<title>The Movie Blurb Dialogue</title>
				<description>&lt;blockquote&gt;
  &lt;p&gt;‘Astonishing…breathtaking!’&lt;/p&gt;

  &lt;p&gt;&lt;cite&gt;— Ralph Stuffyshirt, &lt;em&gt;The Daily Bungle&lt;/em&gt;&lt;/cite&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Consider the &lt;a href=&quot;https://twitter.com/benfraserlee/status/641368752798306304&quot;&gt;movie blurb&lt;/a&gt;: a fragment of text splashed across an ad for a mediocre film. It gives the impression of clarity without actually offering any. What is ‘astonishing’? The quality of the special effects? The director’s incompetence? The blurb lacks the context you need to understand it.&lt;/p&gt;

&lt;p&gt;So too with Apple’s iCloud Password dialogue.&lt;/p&gt;

&lt;!-- image1 --&gt;

&lt;!--more--&gt;

&lt;p&gt;This dialogue popped up as the result of a &lt;a href=&quot;https://www.google.co.uk/search?q=icloud+sign+in+startup&quot;&gt;bug in OS X&lt;/a&gt;. Putting aside the annoyance of the bug, this dialogue still has a problem: it lacks context. Why do I need to enter my password? More importantly, which app is asking for my password? The movie blurb at least states the source. The dialogue does not, nor is it a sheet attached to an application window. And it just interrupted my work at random, not in response to anything I did. There is know way of knowing which app spawned it or why.&lt;/p&gt;

&lt;p&gt;That’s a problem. Just as the movie blurb tries to convince you to spend your money on a crappy film, this dialogue could be asking me to give my iCloud password to a malware author. Training users to enter their password whenever asked makes them likelier targets for &lt;a href=&quot;https://en.wikipedia.org/wiki/Phishing&quot;&gt;phishing attacks&lt;/a&gt;. That’s crossing-the-streams level Bad.&lt;/p&gt;

&lt;p&gt;There’s a better way.&lt;/p&gt;

&lt;p&gt;Adding the name of the source application to the dialogue won’t cut it, as the dialogue would still be easy to spoof. Launching the app isn’t the answer either: doing so without the user’s permission interrupts their work for something that doesn’t necessarily need immediate attention. Enter the notification banner.&lt;/p&gt;

&lt;!-- image2 --&gt;

&lt;p&gt;Notification banners let the user know something is amiss without interrupting their work. This banner also tells the user it’s OS X that needs my iCloud password. And if I click on ‘Enter’, the banner can give me proof:&lt;/p&gt;

&lt;!-- image3 --&gt;

&lt;p&gt;Moving the password request to a sheet attached to the iCloud preference pane gives reassures me that it is, in fact, OS X asking for their password and not some dodgy application or website.&lt;/p&gt;

&lt;p&gt;Like &lt;a href=&quot;https://www.youtube.com/watch?v=kENzRvSoP-A&quot;&gt;unwanted cameos&lt;/a&gt; in movies, software bugs happen. But software shouldn’t subject us to the movie blurb treatment when they do. Always give the user as much context as you can, regardless of the situation.&lt;/p&gt;
</description>
				<pubDate>Fri, 14 Aug 2015 00:00:00 +0100</pubDate>
				<link>http://localhost:4000/2015/08/14/movie-blurb-dialogues/</link>
				<guid isPermaLink="true">http://localhost:4000/2015/08/14/movie-blurb-dialogues/</guid>
			</item>
		
			<item>
				<title>Y! Security</title>
				<description>&lt;!-- image1 --&gt;

&lt;p&gt;Whenever I travel out of the UK, the first time I connect to the internet with one of my gadgets I get an email from Yahoo! stating they detected a sign-in attempt from an unrecognised device in {&lt;em&gt;name of the country I’m in&lt;/em&gt;}, and asking me to sign in with the device I ‘usually use’.&lt;/p&gt;

&lt;p&gt;Huh? I just signed in with a laptop/phone I use every day. What gives?&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;Usability and security aren’t comfortable bedfellows. Indeed, the point of security is to make a device or system &lt;em&gt;unusable&lt;/em&gt; to most users. Where the two fields meet, the result is often awkward. Yahoo’s ‘unrecognised sign-in’ process is a classic example.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disclosure/disclaimer:&lt;/strong&gt; I worked at Yahoo! for 5 years. I still know people there. I am not second-guessing their decisions, as I don’t know the technical, legal, and economic constraints they are balancing. Rather, I am highlighting the difficulty of balancing security and usability in a mobile, multi-device world.&lt;/p&gt;

&lt;p&gt;Presumably, Yahoo! is using some combination of a software identifier (such as a cookie) and some form of &lt;a href=&quot;https://en.wikipedia.org/wiki/Geolocation_software&quot;&gt;geolocation&lt;/a&gt; to determine whether you’ve signed in from that device before. It’s a security feature, designed to detect when a sign-in attempt is being made by someone other than the account owner: if the sign-in comes from a country other than the one the account holder is usually in, it gets flagged as a possible hack attempt. But the email isn’t clear. They mention ‘keeping your account safe’, but don’t explain what they think is happening and why.&lt;/p&gt;

&lt;!-- image2 --&gt;

&lt;p&gt;Google sends a similar email when you add your Google account to a new device, but they are much clearer about what is happening and why:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Why are we sending this? We take security very seriously and we want to keep you in the loop on important actions in your account.&lt;/p&gt;

  &lt;p&gt;We were unable to determine whether you have used this browser or device with your account before. This can happen when you sign in for the first time on a new computer, phone or browser, when you use your browser’s incognito or private browsing mode or clear your cookies or when somebody else is accessing your account.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;They also don’t require any action if the sign-in attempt was legitimate. Yahoo! asks you to sign in with your ‘usual device’. But which usual device? Phone? Laptop? Work laptop? I sign in from all three daily. More, I’m out of country. What if I don’t have my ‘usual device’? Will my account be locked? Will I still get email?&lt;/p&gt;

&lt;p&gt;Some years back, Yahoo! used to ask you to sign in to your Yahoo! account via the  web, so I tried signing in to my Yahoo! Mail account via the web. I got another email much more like the Google email, telling me I’m all set if the unrecognised sign-in attempt was from me.&lt;/p&gt;

&lt;!-- image3 --&gt;

&lt;!--

Email: sign-in not from usual device
	what is usual device?
	what if don’t have?
	What if don’t do?
Sign-in from web
	previous email said to sign-in from web
	second email, saying if was you are all set
Google
	state is Security
	can’t determine if have used device (why email)
	when can happen (why think so)
	clearly explain next steps
	what happens if don’t do?
Apple
Possible difference
	no hardware access for Y!
Possible solutions
	could still be more clear on why email
	should state what happens
	could go back to sign in from web
disclaimer
Google email

--&gt;
</description>
				<pubDate>Tue, 11 Aug 2015 08:29:06 +0100</pubDate>
				<link>http://localhost:4000/2015/08/11/yahoo-account-security/</link>
				<guid isPermaLink="true">http://localhost:4000/2015/08/11/yahoo-account-security/</guid>
			</item>
		
			<item>
				<title>Building My Site: Server Side Code</title>
				<description>&lt;p&gt;In my &lt;a href=&quot;/2015/06/10/building-my-site-publishing/&quot;&gt;first post&lt;/a&gt;, I explained how I’m using &lt;a href=&quot;http://jekyllrb.com/&quot;&gt;Jekyll&lt;/a&gt;, &lt;a href=&quot;https://git-scm.com&quot;&gt;Git&lt;/a&gt;, and bash aliases to publish this site. I chose this setup because it keeps the server-side of things simple: there’s no database, and no code executing when a page is served. Just some &lt;a href=&quot;http://daringfireball.net/projects/markdown/syntax&quot;&gt;markdown&lt;/a&gt; files which get mushed together with templates to produce static HTML files.&lt;/p&gt;

&lt;p&gt;For the most part, the site follows that simple formula. But there are a few instances where I need a bit more control over formatting, or a bit of logic to avoid maintaining links by hand. Enter the &lt;a href=&quot;http://www.yaml.org&quot;&gt;YAML&lt;/a&gt; serialisation format and the &lt;a href=&quot;http://liquidmarkup.org&quot;&gt;Liquid&lt;/a&gt; template language.&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;Most of this site is pretty vanilla, and since the &lt;a href=&quot;http://jekyllrb.com/docs/home/&quot;&gt;Jekyll documentation&lt;/a&gt; is quite good I won’t rehash the basics here. Similarly, the &lt;a href=&quot;https://en.wikipedia.org/?title=YAML&quot;&gt;Wikipedia YAML article&lt;/a&gt; and &lt;a href=&quot;https://github.com/Shopify/liquid/wiki/Liquid-for-Designers&quot;&gt;Liquid documentation&lt;/a&gt; provide good guides to YAML and Liquid, respectively (the &lt;a href=&quot;https://docs.shopify.com/themes/liquid-documentation/basics&quot;&gt;Shopify Liquid documentation&lt;/a&gt; is also good). Instead, I’ll focus on how I’ve applied these technologies to the specific needs of my site.&lt;/p&gt;

&lt;h2 id=&quot;cv&quot;&gt;CV&lt;/h2&gt;

&lt;p&gt;Markdown sacrificies sophisticated formatting to be easy to read and write. That’s great for basic article pages like blog posts. But a &lt;a href=&quot;/cv/&quot;&gt;cv&lt;/a&gt; needs to communicate a lot of information quickly, and so requires more sophisticated structure, and formatting to communicate that structure.&lt;/p&gt;

&lt;p&gt;The most straightforward way to add that structure is to put the markup directly in the markdown, but that means instead of writing markdown like this:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;markdown&quot;&gt;&lt;span class=&quot;nt&quot;&gt;* __&lt;/span&gt;Web Standards Project, Jul. 1998–Mar. 2007:&lt;span class=&quot;nt&quot;&gt;__&lt;/span&gt; Served as project manager and volunteer coordinator during launch. Founded task forces and served on the steering committee. Wrote and edited opinion pieces and press releases. Promoted initiatives in online communities and email lists.&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You write HTML like this:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;nt&quot;&gt;&amp;lt;h2&amp;gt;&amp;lt;strong&amp;gt;&lt;/span&gt;Web Standards Project&lt;span class=&quot;nt&quot;&gt;&amp;lt;span&amp;gt;&lt;/span&gt; • &lt;span class=&quot;nt&quot;&gt;&amp;lt;/span&amp;gt;&amp;lt;/strong&amp;gt;&lt;/span&gt;Jul. 1998–Mar. 2007&lt;span class=&quot;nt&quot;&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
	&lt;span class=&quot;nt&quot;&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Served as project manager and volunteer coordinator during launch. Founded task forces and served on the steering committee. Wrote and edited opinion pieces and press releases. Promoted initiatives in online communities and email lists.&lt;span class=&quot;nt&quot;&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;					
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;It’s less legible, and also more brittle: miss out a &lt;code&gt;&amp;lt;/ul&amp;gt;&lt;/code&gt; and you have a broken page. For a write-and-forget page that’s not a big concern. But if I’m looking for a job I need to be able to tweak the text to match the role I’m applying for. Each edit is an opportunity to break the HTML, one I seem constitutionally incapable of declining.&lt;/p&gt;

&lt;p&gt;I also need a &lt;a href=&quot;/download/chris_kaminski-cv.pdf&quot;&gt;PDF&lt;/a&gt; version to print or send via email. It’s possible to generate a PDF from the HTML version, and printing to PDF from Safari will even get you working hyperlinks. But getting a precise print layout with HTML + CSS is still more time-consuming than with a word processor. Until I polish up the print styles for my CV, I’m stuck with two versions and copying changes between them. Cutting and pasting around HTML tags just is just begging for errors, but wrapping structured text with repetitive HTML is exactly the problem template languages like Liquid were designed to solve.&lt;/p&gt;

&lt;p&gt;A CV is mostly a series of lists: previous roles, skills, and so on. This is the perfect sort of data for YAML, which lets you create lists and key-value pairs with a bit of plain text formatting:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;yaml&quot;&gt;&lt;span class=&quot;p-Indicator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;l-Scalar-Plain&quot;&gt;company&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;l-Scalar-Plain&quot;&gt;Web Standards Project&lt;/span&gt;
  &lt;span class=&quot;l-Scalar-Plain&quot;&gt;dates&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;l-Scalar-Plain&quot;&gt;Jul. 1998–Mar. 2007&lt;/span&gt;
  &lt;span class=&quot;l-Scalar-Plain&quot;&gt;description&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;l-Scalar-Plain&quot;&gt;Served as project manager and volunteer coordinator during launch. Founded task forces and served on the steering committee. Wrote and edited opinion pieces and press releases. Promoted initiatives in online communities and email lists.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I then use Liquid &lt;code&gt;for&lt;/code&gt; loops to iterate through the various lists and apply the appropriate markup, using &lt;code&gt;if&lt;/code&gt; blocks to hide sections that aren’t present (descriptions for very old jobs, for example):&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;ol&amp;gt;&lt;/span&gt;
	{% for job in page.experience %}
	&lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&amp;lt;h2&amp;gt;&amp;lt;strong&amp;gt;&lt;/span&gt;{{ job.company }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;span&amp;gt;&lt;/span&gt; • &lt;span class=&quot;nt&quot;&gt;&amp;lt;/span&amp;gt;&amp;lt;/strong&amp;gt;&lt;/span&gt;{{ job.dates }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
		{% if job.description %}&lt;span class=&quot;nt&quot;&gt;&amp;lt;p&amp;gt;&lt;/span&gt;{{ job.description }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;{% endif %}
	&lt;span class=&quot;nt&quot;&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
	{% endfor %}
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/ol&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This system minimises cut-and-paste errors and makes it quicker to adjust the markup as there’s only one list item of any given type to amend. It works well enough that even once I refine my print styles to the point I can generate the PDF by printing the web page, I’ll still want to use YAML + Liquid (or something similar) to generate that page.&lt;/p&gt;

&lt;h2 id=&quot;portfolio&quot;&gt;Portfolio&lt;/h2&gt;

&lt;p&gt;Unlike the CV, it’s unlikely I’ll ever work out a system for generating web and PDF versions of my &lt;a href=&quot;/portfolio/&quot;&gt;portfolio&lt;/a&gt; from the same source. For one, the PDF is a single multi-page file where on the web each project really needs its own page to keep downloads manageable and facilitate direct linking. &lt;/p&gt;

&lt;p&gt;As well, many of the images were originally vector diagrams. The can be embedded in a PDF as native vectors without making the file size ridiculous. But they’re too complex to convert cleanly to SVG files, and even after GZIP compression the files are often larger than web-resolution PNG counterparts. &lt;/p&gt;

&lt;p&gt;Finally, a layout optimised for print is typically very different than one optimised for responsive display on the web, and each page of the PDF is formatted uniquely for its content. That’s no big deal when using grids in a layout program. But with HTML + CSS, changing the content also means changing the CSS, and maybe the markup, and then re-testing across multiple browsers. Separate versions of the portfolio for print and web are probably here to stay.&lt;/p&gt;

&lt;p&gt;Fortunately, the items in my &lt;a href=&quot;/portfolio/&quot;&gt;portfolio&lt;/a&gt; are basic article-type pages, so markdown works fine and makes it easy to cut-and-paste between the web and print versions. So I could have created these as ‘static’ Jekyll pages, but I would have had to create the portfolio index and section navigation by hand. Instead, I’ve used a collection.&lt;/p&gt;

&lt;p&gt;Recent versions of Jekyll have built-in support for &lt;a href=&quot;http://jekyllrb.com/docs/collections/&quot;&gt;collections&lt;/a&gt;, which are sets of related pages with their own namespace and properties. Unfortunately, my web host only supports an older version of Jekyll. So instead I used the &lt;a href=&quot;https://github.com/jeffkole/jekyll-page-collections&quot;&gt;&lt;samp&gt;jekyll-page-collections&lt;/samp&gt;&lt;/a&gt; plugin.&lt;/p&gt;

&lt;p&gt;It’s easy enough to use: just drop the plugin file into Jekyll’s &lt;samp&gt;_plugins&lt;/samp&gt; directory, add your collection name to a &lt;samp&gt;collections:&lt;/samp&gt; list in the &lt;samp&gt;_config.yaml&lt;/samp&gt; file, and create the pages in the collection in a directory with the same name as your collection but preceded by an &lt;samp&gt;_&lt;/samp&gt;. You have to name collection pages with the &lt;samp&gt;w/yyyy-mm-dd-[slug]&lt;/samp&gt; convention used by Jekyll posts, but that makes it easy to reorder them by changing the dates or to hide a page by removing the date entirely (e.g. to change the list of projects for specific job opportunity). Jekyll permalinks keep the URLs tidy and consistent, regardless of the dates in the filenames.&lt;/p&gt;

&lt;p&gt;For the subnav and portfolio index, I add a description, navigation name, and thumbnail image to the YAML front matter for each project. I then loop through the collection to generate the appropriate list. Everything about a given project (save images) is in one file, which makes for easy updates.&lt;/p&gt;

&lt;h2 id=&quot;images&quot;&gt;Images&lt;/h2&gt;

&lt;p&gt;Images are really the only part of the site that required a bit of cleverness on the server side, and even then the solution is pretty simple.&lt;/p&gt;

&lt;p&gt;Markdown allows you to embed images, but it’s really basic: it only allows for &lt;code&gt;title&lt;/code&gt; and &lt;code&gt;alt&lt;/code&gt; attributes; no &lt;code&gt;class&lt;/code&gt; or &lt;code&gt;id&lt;/code&gt;. So there’s no way to float the image. And if you need a caption or link, you’re out of luck.&lt;/p&gt;

&lt;p&gt;So instead of placing the images inline, I put the images for a project or blog post in the YAML front matter, like so:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;yaml&quot;&gt;&lt;span class=&quot;l-Scalar-Plain&quot;&gt;images&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt;
  &lt;span class=&quot;p-Indicator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;l-Scalar-Plain&quot;&gt;small&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;l-Scalar-Plain&quot;&gt;it-portal-concept-model-small.png&lt;/span&gt;
    &lt;span class=&quot;l-Scalar-Plain&quot;&gt;large&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;l-Scalar-Plain&quot;&gt;it-portal-concept-model-large.png&lt;/span&gt;
    &lt;span class=&quot;l-Scalar-Plain&quot;&gt;caption&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;l-Scalar-Plain&quot;&gt;Concept model&lt;/span&gt;
    &lt;span class=&quot;l-Scalar-Plain&quot;&gt;alt&lt;/span&gt;&lt;span class=&quot;p-Indicator&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;l-Scalar-Plain&quot;&gt;Content model&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then in the post, I use an HTML comment to place the images:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&lt;span class=&quot;c&quot;&gt;&amp;lt;!-- image1 --&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Using an HTML comment has two advantages. First, markdown processors ignore HTML, so they won’t munge it. Second, if something goes wrong and it doesn’t get replaced with an image, there’s just a tiny, nonsensical comment in the page source rather than visible breakage. One could argue this is abusing HTML comments, which should only be actual comments. But logically, if everything is working it never gets into an HTML document, so arguing HTML purity seems a bit daft. And from a practical standpoint, &lt;a href=&quot;http://httpd.apache.org/docs/2.2/howto/ssi.html&quot;&gt;Apache SSIs&lt;/a&gt; have been ‘abusing’ comments for a couple decades now with no harm done. If you’re still not persuaded, &lt;a href=&quot;https://www.google.com/maps/place/Easter+Island,+Chile/@-27.108786,-109.352951,8z/data=!4m2!3m1!1s0x9947f017a8d4ae2b:0xbbe5b3edc02a2db6?hl=en&quot;&gt;this is where the people who care live&lt;/a&gt;. Tell them your trouble.&lt;/p&gt;

&lt;p&gt;In my templates, I assign the rendered HTML page &lt;code&gt;content&lt;/code&gt; to a &lt;code&gt;withImages&lt;/code&gt; variable, then us an &lt;code&gt;if&lt;/code&gt; statement to check if the page has an &lt;code&gt;images&lt;/code&gt; array. If so, I loop through the array one at a time. For each iteration, I generate a replacement slug:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;{% capture slug %}&lt;span class=&quot;c&quot;&gt;&amp;lt;!-- image{{ forloop.index }} --&amp;gt;&lt;/span&gt;{% endcapture %}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I use another Liquid &lt;code&gt;capture&lt;/code&gt; block to capture the HTML for the image, filed with the values from the current image from the &lt;code&gt;images&lt;/code&gt; array. As with the CV, I use &lt;code&gt;for&lt;/code&gt; statements to include only the elements (classes, link to an enlargement, caption, etc.) present for that image. I then use the Liquid &lt;code&gt;replace&lt;/code&gt; filter to replace the HTML comment in the text with the image markup:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;{% assign withImages = withImages | replace:slug,markup %}	
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;All that goes in a Liquid &lt;code&gt;include&lt;/code&gt; for easy maintenance. &lt;/p&gt;

&lt;p&gt;Back in the template, I output the contents of &lt;code&gt;withImages&lt;/code&gt; into the page. I could just do the replacements right in the &lt;code&gt;content&lt;/code&gt; variable, but it seems prudent to keep the unadulterated page content around.&lt;/p&gt;

&lt;p&gt;The system is a bit brittle, as it requires knowing exactly what order images are in the YAML array. But as the array is defined in the same file as the slugs are placed that doesn’t concern me overmuch. &lt;/p&gt;

&lt;p&gt;As well, this sort of output filter could arguably be better implemented as a Jekyll plugin written in Ruby, if only for performance reasons. But as it only runs for pages with an &lt;code&gt;images&lt;/code&gt; array, and I’d want to be able to edit the HTML templates without digging into Ruby, the benefits to doing so seem small.&lt;/p&gt;

&lt;p&gt;Bottom line, I’ve got a way to place images wherever I wish within an otherwise-vanilla markdown page and include classes (e.g. for floating them with CSS), a link to an enlargement, &lt;code&gt;alt&lt;/code&gt; text, and so on. I can extend it whenever I like by editing a single include file and, provided the enhancements are wrapped &lt;code&gt;if&lt;/code&gt; statements, old pages will continue to work undisturbed. Eventually, managing all the &lt;code&gt;if&lt;/code&gt; statements may get cumbersome, but for now it does the job.&lt;/p&gt;

&lt;h2 id=&quot;series-navigation&quot;&gt;Series navigation&lt;/h2&gt;

&lt;p&gt;The last little bit of Liquid-fu is the navigation for posts belonging to a series, like this one. That’s accomplished by looking for a &lt;code&gt;series&lt;/code&gt; property in the YAML front matter of each post as its rendered. I could have used &lt;code&gt;page.tags&lt;/code&gt; or &lt;code&gt;page.categories&lt;/code&gt;, but a series doesn’t seem to me to be the same thing as either. Rather than piggyback on a not-quite-right property that might cause headaches should I decide to categorise or tag my posts later I elected to create my own property specifically for series of posts.&lt;/p&gt;

&lt;p&gt;If the &lt;code&gt;series&lt;/code&gt; property is there and has a value, I loop through the build-in Jekyll &lt;code&gt;site.posts&lt;/code&gt; collection, testing each for a matching &lt;code&gt;series&lt;/code&gt;. When I find one, I add a link to that post to the text in a variable. When I’m done collecting links, I place the contents in the page. It looks like this:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;{% for post in site.posts %}
	{% if post.series == page.series  %}
		{% capture series_nav %}
&lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&amp;lt;a&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;{%&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;post&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;title =&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;na&quot;&gt;title&lt;/span&gt;  &lt;span class=&quot;err&quot;&gt;%}&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;active&amp;quot;&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;{%&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;endif&lt;/span&gt; &lt;span class=&quot;err&quot;&gt;%}&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;href=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;{{ post.url }}&amp;#39;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;{{ post.title }}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;/span&gt;{{ series_nav }}
		{% endcapture %}
	{% endif %}
{% endfor %}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The existing &lt;code&gt;series_nav&lt;/code&gt; is inserted at the end the &lt;code&gt;capture&lt;/code&gt; block because the &lt;code&gt;site.posts&lt;/code&gt; collection is in reverse-chronological order. I want the posts in the series navigation to be in chronological order, so I have to put each new link before the ones I’ve already created.&lt;/p&gt;

&lt;p&gt;Also, to get the active page indicator I test to see if the &lt;code&gt;post.title&lt;/code&gt; of the matched post is the same as the current &lt;code&gt;page.title&lt;/code&gt; and add a class if it is. Using a content property like this is a bit dirty; it’s generally better to abstract this sort of thing into an ID. But since both sides of the test are reading a value derived from exactly the same bit of text in the same file, the dangers seem minimal and it avoids having to add an additional ID property to the frontmatter.&lt;/p&gt;

&lt;p&gt;When this blog has more posts, looping through every post on the site may get prohibitively slow and I’ll need to look into something more clever. But as with the images system, for now it does what I need.&lt;/p&gt;

&lt;h2 id=&quot;escaping-liquid-tags&quot;&gt;Escaping Liquid tags&lt;/h2&gt;

&lt;p&gt;The last bit worth mentioning is something I ran into while writing this post: escaping Liquid tags for inclusion in code samples. &lt;/p&gt;

&lt;p&gt;My Jekyll installation uses an older version the &lt;a href=&quot;http://pygments.org&quot;&gt;Pygments&lt;/a&gt; syntax highlighter that doesn’t support Liquid (the most recent versions does, but I can’t use it because shared hosting). Instead, I’ve resorted to using Pygments’ HTML lexer and escaping the Liquid opening tags as a Liquid literal (&lt;code&gt;{{&quot; &quot;}}&lt;/code&gt;), like this:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;{{&amp;quot;{%&amp;quot;}} highlight html %}
	&lt;span class=&quot;nt&quot;&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;{{&amp;quot;{%&amp;quot;}} post.title %}&lt;span class=&quot;nt&quot;&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
{{&amp;quot;{%&amp;quot;}} endhighlight %}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I got the idea from a &lt;a href=&quot;http://tesoriere.com/2010/08/25/liquid-code-in-a-liquid-template-with-jekyll/&quot;&gt;post by Scott Tesoriere&lt;/a&gt;. It looks gnarly, but it works (as a sidenote, the double-escapes above were created using &lt;code&gt;{{' '}}&lt;/code&gt; to &lt;a href=&quot;http://knowyourmeme.com/memes/we-need-to-go-deeper&quot;&gt;escape the escape&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;That’s pretty much all there is to the server-side code for this blog. So far, it working exactly as I hoped. Editing and adding pages is much quicker and less error-prone with YAML and markdown than were I editing HTML directly, and editing the Liquid templates and includes is considerably easier than mucking about with gobs of repetitive HTML. For once, it seems the ‘simple solution’ actually is.&lt;/p&gt;
</description>
				<pubDate>Wed, 24 Jun 2015 00:00:00 +0100</pubDate>
				<link>http://localhost:4000/2015/06/24/building-my-site-server-side/</link>
				<guid isPermaLink="true">http://localhost:4000/2015/06/24/building-my-site-server-side/</guid>
			</item>
		
			<item>
				<title>I ♥ San Francisco</title>
				<description>&lt;p&gt;If you follow typography or Apple at all, you’ve probably heard the upcoming iOS9 and Mac OS X El Capitan will use San Francisco as their system font, rather than the &lt;a href=&quot;http://spiekermann.com/en/helvetica-sucks/&quot;&gt;controversial&lt;/a&gt; Helvetica Neue.&lt;/p&gt;

&lt;p&gt;I love the change.&lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;I fell in love with San Francisco the moment Apple introduced it as the font for the Apple Watch. I love its clean lines, slightly compressed letterforms and generous horizontal spacing. It has a precision-machined feel to it reminiscent of &lt;a href=&quot;https://en.wikipedia.org/wiki/DIN_1451&quot;&gt;DIN 1451&lt;/a&gt;.&lt;/p&gt;

&lt;!-- image1 --&gt;

&lt;p&gt;I tried it out as my system font using the technique described in &lt;a href=&quot;http://gizmodo.com/helvetica-is-the-worst-change-your-yosemite-font-to-sa-1668350413&quot;&gt;this Gizmodo post&lt;/a&gt; and absolutely loved it for both aesthetic and legibility reasons. This Wired article discussing the switch from &lt;a href=&quot;http://www.wired.com/2015/06/apple-abandoned-worlds-beloved-typeface/?mbid=social_twitter&quot;&gt;a typographer’s perspective&lt;/a&gt; pretty much sums up my impression. &lt;/p&gt;

&lt;p&gt;Sadly, the early versions of the font didn’t have all the glyphs and weights necessary to be a system font in OS X. The resulting display glitches ultimately convinced me to switch back. That won’t be an issue anymore.&lt;/p&gt;

&lt;p&gt;Apple has now posted &lt;a href=&quot;https://developer.apple.com/fonts/&quot;&gt;official versions of the font&lt;/a&gt; for download, along with tools for working with fonts in OS X and iOS and specifications for the TrueType fonts and their ‘advanced’ font rendering technology. They’ve also posted a &lt;a href=&quot;https://developer.apple.com/videos/wwdc/2015/?id=804&quot;&gt;video of the WWDC session on San Francisco&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Back in the day, &lt;a href=&quot;https://en.wikipedia.org/wiki/Susan_Kare_&quot;&gt;Susan Kare’s&lt;/a&gt; ‘city’ fonts — &lt;a href=&quot;https://en.wikipedia.org/wiki/New_York_(typeface)&quot;&gt;New York&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Chicago_(typeface)&quot;&gt;Chicago&lt;/a&gt;, &lt;a href=&quot;https://en.wikipedia.org/wiki/Geneva_(typeface)&quot;&gt;Geneva&lt;/a&gt;, and &lt;a href=&quot;https://en.wikipedia.org/wiki/Monaco_(typeface)&quot;&gt;Monaco&lt;/a&gt; — were staples on the Mac. Apart from Monaco, which is still in use as the default monospace font in OS X, they’ve mostly fallen by the wayside since OS X replaced Chicago and Geneva were replaced by &lt;a href=&quot;https://en.wikipedia.org/wiki/Lucida_Grande&quot;&gt;Lucida Grande&lt;/a&gt; as they system font in OS X 10.0. San Francisco is a welcome revival of the series. &lt;/p&gt;

&lt;p class=&quot;credit&quot;&gt;This post was also published on the &lt;a href=&quot;http://blog.tobiasandtobias.com/?p=389&amp;amp;preview=true&quot;&gt;Tobias &amp;amp; Tobias blog&lt;/a&gt;.&lt;/p&gt;
</description>
				<pubDate>Tue, 16 Jun 2015 00:00:00 +0100</pubDate>
				<link>http://localhost:4000/2015/06/16/i-heart-san-francisco/</link>
				<guid isPermaLink="true">http://localhost:4000/2015/06/16/i-heart-san-francisco/</guid>
			</item>
		
			<item>
				<title>Building My Site: Publishing</title>
				<description>&lt;p&gt;I &lt;a href=&quot;http://www.nooctothorpe.com/blog/2015/5/27/finally&quot;&gt;finally&lt;/a&gt; built a blog.&lt;/p&gt;

&lt;p&gt;To get past the blank page problem (and for my own future reference), I’m going to write a few posts about how I did it and why I did it that way. I’ll start with the publishing process. &lt;/p&gt;

&lt;!--more--&gt;

&lt;p&gt;About a year ago, I decided to redesign my 10-year-old portfolio site. As my career focus had settled on UX design, I took a &lt;a href=&quot;http://en.wikipedia.org/wiki/The_Crystal_Goblet&quot;&gt;Beatrice Warde&lt;/a&gt; approach: I wanted the site to be ‘transparent’, to just present the content as simply as possible with a minimum of technical and visual flourishes. That meant keeping both the technology and the design as simple as possible.&lt;/p&gt;

&lt;p&gt;So when I decided to add a blog I chose to use &lt;a href=&quot;http://jekyllrb.com&quot;&gt;Jekyll&lt;/a&gt;, which publishes a static site (i.e. just plain HTML pages served straight from the filesystem), rather than something like &lt;a href=&quot;https://wordpress.org&quot;&gt;WordPress&lt;/a&gt;, which assembles pages using text pulled from a database and various bits of code. &lt;a href=&quot;http://vitobotta.com/about/&quot;&gt;Vito Botta&lt;/a&gt; has written some rather thorough posts on the &lt;a href=&quot;http://vitobotta.com/migrating-from-wordpress-to-jekyll-part-one-why-i-gave-up-on-wordpress/&quot;&gt;advantages&lt;/a&gt; and &lt;a href=&quot;http://vitobotta.com/switched-jekyll-back-wordpress/&quot;&gt;disadvantages&lt;/a&gt; of Jekyll relative to WordPress, if you’re interested in that sort of thing. What swung the decision for me were WordPress’s ‘security’ (I’ve been bitten by that before), constant updates, and the relative complexity of implementing a custom design. &lt;/p&gt;

&lt;p&gt;The downside of Jekyll is that to publish, you have to use whatever computer hosts your Jekyll source files to build the site, then move the files to the server. That means no editing from, say, a smartphone without setting up SSH access to the main machine. It also means no remote editing without opening a port on your home router. Ugh.&lt;/p&gt;

&lt;p&gt;The ‘simple’ solution is to run Jekyll right on the server and have the source files there. It’s still pretty secure, as you need to be able to access the shell to run Jekyll. And it allows me to build the site and move the files into position with a couple of shell commands. First I run:&lt;/p&gt;

&lt;p&gt;&lt;samp&gt;jekyll build &amp;ndash;source [jekyll directory] &amp;ndash;destination [directory to build the site in]&lt;/samp&gt;&lt;/p&gt;

&lt;p&gt;Which builds the site in a ‘safe’ directory. Jekyll clears everything out of the directory before putting the site files in, so I don’t want it just building to the www directory.&lt;/p&gt;

&lt;p&gt;Then I run:&lt;/p&gt;

&lt;p&gt;&lt;samp&gt;cp -r [directory the site was built in]/. [www directory]&lt;/samp&gt;&lt;/p&gt;

&lt;p&gt;Which overwrites the old site files with the new ones, but leaves everything else alone.&lt;/p&gt;

&lt;p&gt;Of course, I also want to be able to test the site in my live environment before actually making it live. By default, Jekyll assumes everything will be placed in the www root, so just publishing the site to a subdirectory will break the links unless you change the default site path in the configuration file. Rather than risk putting the wrong configuration live, I created a subdomain on my site (&lt;a href=&quot;http://staging.setmajer.com&quot;&gt;staging.setmajer.com&lt;/a&gt;) and publish to that.&lt;/p&gt;

&lt;p&gt;The drawback to generating the site on my server is it leaves me editing remotely, which means some combination of a command line editor, no offline editing, lag when saving, or edit, then upload to view your changes. None of which is ideal.&lt;/p&gt;

&lt;p&gt;I needed source management anyway, so I decided to use &lt;a href=&quot;https://git-scm.com&quot;&gt;Git&lt;/a&gt; to keep everything in sync. I created a bare repository on my server and set that as the master for the working repository on my local machine. Next, I created a second repository on the server to be a working repository so I can edit remotely via SSH when needed. I can also set up Git repositories and Jekyll on my Dell Venue tablet, my work laptop, etc. As long as I remember to commit my changes, all should be well.&lt;/p&gt;

&lt;p&gt;I could have used &lt;a href=&quot;https://github.com&quot;&gt;Github&lt;/a&gt; for the master, but getting to grips with Github seemed like another layer of complexity. Plus, I’m not ready to display my ropey liquid templates to the world just yet.&lt;/p&gt;

&lt;p&gt;It’s working fine so far in tests with my home and work laptops. The next thing I need to do is find an editor for my iPad, Moto G, and/or Kindle that will let me edit offline and then push the edits onto my server when I have connectivity.&lt;/p&gt;

&lt;p&gt;Even after creating shell aliases to combine commands, the setup feels like it’s too clever by half. Just look at how much verbiage it took to explain it (and well done you for getting this far — now for the love of dog go find something more interesting to do, like watching some paint dry). That said, it does seem more straightforward than many of the &lt;a href=&quot;http://jekyllrb.com/docs/deployment-methods/&quot;&gt;deployment methods&lt;/a&gt; documented on the Jekyll site, and lets me control where and when to deploy without mucking about with Git branches or the like. &lt;/p&gt;

&lt;p&gt;In any case, 17 years after I first launched setmajer.com I &lt;em&gt;finally&lt;/em&gt; have a live and usable blog. That’s something, anyway.&lt;/p&gt;
</description>
				<pubDate>Wed, 10 Jun 2015 00:00:00 +0100</pubDate>
				<link>http://localhost:4000/2015/06/10/building-my-site-publishing/</link>
				<guid isPermaLink="true">http://localhost:4000/2015/06/10/building-my-site-publishing/</guid>
			</item>
		
	</channel>
</rss>
