<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Posts on Brendan Quinn</title>
    <link>http://brendan-quinn.xyz/post/</link>
    <description>Recent content in Posts on Brendan Quinn</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 22 Feb 2016 22:46:42 -0500</lastBuildDate>
    <atom:link href="http://brendan-quinn.xyz/post/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>Simple Linting using SCSSlint, ESlint, and Gulp in Atom</title>
      <link>http://brendan-quinn.xyz/post/simple-linting-using-scsslint-eslint-and-gulp-in-atom</link>
      <pubDate>Mon, 22 Feb 2016 22:46:42 -0500</pubDate>
      
      <guid>http://brendan-quinn.xyz/post/simple-linting-using-scsslint-eslint-and-gulp-in-atom</guid>
      <description>

&lt;p&gt;On small projects it is important to be mindful of your development process, but it is also important to make light work out of setting up a development environment.  For me, while working on a Wordpress project for a friend, this means making quick use of npm, gulp, scss-lint, and eslint.  For simplicity&amp;rsquo;s sake, the use-case will be creating a child theme in Wordpress, writing our CSS in SCSS, writing our javaScript in ES6 standards, and doing this all the the Atom text editor.&lt;/p&gt;

&lt;h2 id=&#34;file-structure:bbae15dbe0acb2c92ff96321782edcee&#34;&gt;File Structure&lt;/h2&gt;

&lt;pre&gt;&lt;code class=&#34;language-linux&#34;&gt;wp-content/
  |
  + plugins/
  |
  - themes/
    |
    - child-theme/
      |
      + css/
      |
      + js/
      |
      + node_modules/
      |
      - src/
        |
        - scss/
          |
          - main.scss
        |
        - js/
          |
          - main.js
      |
      - .eslintrc
      |
      - gulpfile.js
      |
      - package.json
      |
      - style.css
    |
    + parent-theme/
  |
  - index.php
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id=&#34;atom-packages-and-linting:bbae15dbe0acb2c92ff96321782edcee&#34;&gt;Atom Packages and Linting&lt;/h2&gt;

&lt;p&gt;Now let&amp;rsquo;s get Atom where it needs to be, if you don&amp;rsquo;t already install both the &lt;code&gt;linter-eslint&lt;/code&gt; and &lt;code&gt;linter-scss-lint&lt;/code&gt; packages and enable them.  This much will begin lintig your &lt;code&gt;.scss&lt;/code&gt; files.  To lint our javaScript files need a &lt;code&gt;.eslintrc&lt;/code&gt; file.  With the mindset of keeping it simple, I utilize &lt;a href=&#34;https://github.com/airbnb/javascript&#34;&gt;Airbnb&amp;rsquo;s lint rules&lt;/a&gt;.  Their code styles are well documented and it is easy to install.  My &lt;code&gt;.eslintrc&lt;/code&gt; is this simple.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-json&#34;&gt;{
  &amp;quot;extends&amp;quot;: &amp;quot;airbnb/base&amp;quot;,
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The linter won&amp;rsquo;t be functional until the supporting node packages are installed.  Run &lt;code&gt;npm install &amp;ndash;save-dev eslint-config-airbnb eslint&lt;/code&gt; (&lt;a href=&#34;https://www.npmjs.com/package/eslint-config-airbnb&#34;&gt;Thank you, good documentation&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Great, now SCSS and ES6 javaScript files will lint.  Once, &lt;code&gt;gulpfile.js&lt;/code&gt; is setup we&amp;rsquo;ll be on our way.&lt;/p&gt;

&lt;h2 id=&#34;setting-up-gulp:bbae15dbe0acb2c92ff96321782edcee&#34;&gt;Setting up Gulp&lt;/h2&gt;

&lt;p&gt;Several node packages are needed in our gulp file.  Running this single command in your terminal will take care of all our needs:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-linus&#34;&gt;npm install --save-dev  gulp gulp-autoprefixer gulp-babel
                        gulp-concat gulp-cssnano gulp-rename
                        gulp-ruby-sass gulp-sourcemaps
                        babel-preset-es2015
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Boom.  Given the file structure above, I want to take &lt;code&gt;.scss&lt;/code&gt; files from &lt;code&gt;&amp;hellip;/src/scss&lt;/code&gt; and &lt;code&gt;.js&lt;/code&gt; files from &lt;code&gt;&amp;hellip;src/js&lt;/code&gt; and map them to &lt;code&gt;css&lt;/code&gt; and &lt;code&gt;js&lt;/code&gt;, respectively.  This gulp file will do that for us, while watching for changes in the source files.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-javascript&#34;&gt;const gulp = require(&#39;gulp&#39;);
const sass = require(&#39;gulp-ruby-sass&#39;);
const autoprefixer = require(&#39;gulp-autoprefixer&#39;);
const minifycss = require(&#39;gulp-minify-css&#39;);
const rename = require(&#39;gulp-rename&#39;);
const sourcemaps = require(&#39;gulp-sourcemaps&#39;);
const babel = require(&#39;gulp-babel&#39;);
const concat = require(&#39;gulp-concat&#39;);

gulp.task(&#39;babel&#39;, () =&amp;gt;
    gulp.src(&#39;src/js/**/*.js&#39;)
      .pipe(sourcemaps.init())
      .pipe(babel({
        presets: [&#39;es2015&#39;],
      }))
      .pipe(concat(&#39;main.js&#39;))
      .pipe(sourcemaps.write(&#39;.&#39;))
      .pipe(gulp.dest(&#39;js&#39;))
);

gulp.task(&#39;sass&#39;, () =&amp;gt;
  sass(&#39;src/scss/main.scss&#39;, { style: &#39;expanded&#39; })
    .pipe(gulp.dest(&#39;css&#39;))
    .pipe(autoprefixer(&#39;last 2 version&#39;, &#39;safari 5&#39;, &#39;ie 8&#39;, &#39;ie 9&#39;, &#39;opera 12.1&#39;))
    .pipe(gulp.dest(&#39;css&#39;))
    .pipe(rename({ suffix: &#39;.min&#39; }))
    .pipe(minifycss())
    .pipe(gulp.dest(&#39;css&#39;))
);

gulp.task(&#39;watch&#39;, () =&amp;gt; {
  gulp.watch(&#39;src/scss/**/*.scss&#39;, [&#39;sass&#39;]);
  gulp.watch(&#39;src/js/**/*.js&#39;, [&#39;babel&#39;]);
});


gulp.task(&#39;default&#39;, [&#39;sass&#39;, &#39;babel&#39;, &#39;watch&#39;], () =&amp;gt; {});
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;There you have it.  While in the &lt;code&gt;child-theme&lt;/code&gt; directory, run the &lt;code&gt;gulp&lt;/code&gt; command to see it all compile and watch for changes.&lt;/p&gt;

&lt;p&gt;I hope this was helpful.  Feel free to comment if you have any questions.&lt;/p&gt;

&lt;p&gt;All the Best,&lt;/p&gt;

&lt;p&gt;Brendan&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Working with Hugo&#39;s Internal Partial Templates: Facebook and Open Graph</title>
      <link>http://brendan-quinn.xyz/post/working-with-hugos-internal-partial-templates-facebook-and-open-graph</link>
      <pubDate>Fri, 12 Feb 2016 03:01:40 -0500</pubDate>
      
      <guid>http://brendan-quinn.xyz/post/working-with-hugos-internal-partial-templates-facebook-and-open-graph</guid>
      <description>&lt;p&gt;Hugo&amp;rsquo;s internal templates are a thoughtful idea, &lt;a href=&#34;http://brendan-quinn.xyz/post/working-with-hugos-internal-partial-templates-twitter-cards/&#34;&gt;as I discussed earlier&lt;/a&gt;, but it is important to check out the &lt;a href=&#34;live within hugo](https://github.com/spf13/hugo/blob/e445c35d6a0c7f5fc2f90f31226cd1d46e048bbc/tpl/template_embedded.go&#34;&gt;source code&lt;/a&gt; in order to be cognizant that you are making the most out of the helper-template.  In supplementing the &lt;a href=&#34;http://themes.gohugo.io/theme/hugo-icarus/&#34;&gt;theme&lt;/a&gt; this blog is built on, I saw my meta data wasn&amp;rsquo;t filling out or seemed to have some missing chunks.  After investigating the source code, part of the issue was that I wasn&amp;rsquo;t defining my config files correctly.  Once updated, they got me a bit farther.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-html&#34;&gt;&amp;lt;!-- config.toml --&amp;gt;
...
[params]
  author = &amp;quot;Brendan Quinn&amp;quot;
  description = &amp;quot;Hey there, I&#39;m Brendan Quinn, an energetic introvert with a love of family, walking/hiking, listening, teaching, and code.&amp;quot;
  site_description = &amp;quot;Hey there, I&#39;m Brendan Quinn, an energetic introvert with a love of family, walking/hiking, listening, teaching, and code.&amp;quot;
  images = [&amp;quot;http://brendan-quinn.xyz/css/images/Brendan-Quinn-seo.jpg&amp;quot;]
...
[social]
...
  facebook        = &amp;quot;quinn.197&amp;quot;
  facebook_admin  = &amp;quot;&amp;quot;
  facebook_app_id = &amp;quot;&amp;lt;!-- Get from the FB Dev Page --&amp;gt;&amp;quot;
...

&amp;lt;!-- content/post/using-html5-responsive-images.md --&amp;gt;
+++
banner = &amp;quot;css/images/banners/responsive-images-landscape.jpg&amp;quot;
categories = [&amp;quot;Responsive Design&amp;quot;]
date = &amp;quot;2016-02-09T16:30:47-05:00&amp;quot;
description = &amp;quot;Using &amp;amp;lt;picture&amp;amp;gt; &amp;amp;lt;source&amp;amp;gt; and &amp;amp;lt;img&amp;amp;gt; HTML5 elements combined with the \&amp;quot;media\&amp;quot;, \&amp;quot;srcset\&amp;quot;, and \&amp;quot;size\&amp;quot; attributes, it is possible and even necessary to make responsive images for your users.&amp;quot;
images = [&amp;quot;http://brendan-quinn.xyz/css/images/banners/responsive-images-landscape-seo.jpg&amp;quot;]
menu = &amp;quot;&amp;quot;
tags = [&amp;quot;CSS&amp;quot;, &amp;quot;HTML5&amp;quot;]
title = &amp;quot;Using HTML5 and Media Queries for Responsive Images&amp;quot;

[params]
  bannerLg = &amp;quot;css/images/banners/responsive-images-landscape-lg.jpg&amp;quot;
  bannerMd = &amp;quot;css/images/banners/responsive-images-landscape-md.jpg&amp;quot;
  bannerSm = &amp;quot;css/images/banners/responsive-images-landscape-sm.jpg&amp;quot;
+++
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;While this filled out some more fields one compiled, this didn&amp;rsquo;t get me all the way there.  So I made a supplemental partial template for facebook and open graph meta elements.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-html&#34;&gt;&amp;lt;!-- the old --&amp;gt;

  &amp;lt;!-- themes/theme/layouts/partials/head.html --&amp;gt;
  {{ template &amp;quot;_internal/opengraph.html&amp;quot; . }}
  {{ template &amp;quot;_internal/google_news.html&amp;quot; . }}
  {{ template &amp;quot;_internal/schema.html&amp;quot; . }}
  {{ template &amp;quot;_internal/twitter_cards.html&amp;quot; . }}

  &amp;lt;!-- internal partial --&amp;gt;
  &amp;lt;meta property=&amp;quot;og:title&amp;quot; content=&amp;quot;{{ .Title }}&amp;quot; /&amp;gt;
  &amp;lt;meta property=&amp;quot;og:description&amp;quot; content=&amp;quot;{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}&amp;quot; /&amp;gt;
  &amp;lt;meta property=&amp;quot;og:type&amp;quot; content=&amp;quot;{{ if .IsPage }}article{{ else }}website{{ end }}&amp;quot; /&amp;gt;
  &amp;lt;meta property=&amp;quot;og:url&amp;quot; content=&amp;quot;{{ .Permalink }}&amp;quot; /&amp;gt;
  {{ with .Params.images }}
    {{ range first 6 . }}
      &amp;lt;meta property=&amp;quot;og:image&amp;quot; content=&amp;quot;{{ . | absURL }}&amp;quot; /&amp;gt;
    {{ end }}
  {{ end }}
  {{ if not .Date.IsZero }}
    &amp;lt;meta property=&amp;quot;og:updated_time&amp;quot; content=&amp;quot;{{ .Date.Format &amp;quot;2006-01-02T15:04:05-07:00&amp;quot; | safeHTML }}&amp;quot;/&amp;gt;
  {{ end }}
  {{ with .Params.audio }}
    &amp;lt;meta property=&amp;quot;og:audio&amp;quot; content=&amp;quot;{{ . }}&amp;quot; /&amp;gt;
  {{ end }}
  {{ with .Params.locale }}
    &amp;lt;meta property=&amp;quot;og:locale&amp;quot; content=&amp;quot;{{ . }}&amp;quot; /&amp;gt;
  {{ end }}
  {{ with .Site.Params.title }}
    &amp;lt;meta property=&amp;quot;og:site_name&amp;quot; content=&amp;quot;{{ . }}&amp;quot; /&amp;gt;
  {{ end }}
  {{ with .Params.videos }}
    {{ range .Params.videos }}
      &amp;lt;meta property=&amp;quot;og:video&amp;quot; content=&amp;quot;{{ . | absURL }}&amp;quot; /&amp;gt;
    {{ end }}
  {{ end }}
  &amp;lt;!-- If it is part of a series, link to related articles --&amp;gt;
  {{ $permalink := .Permalink }}
  {{ $siteSeries := .Site.Taxonomies.series }}
    {{ with .Params.series }}
      {{ range $name := . }}
        {{ $series := index $siteSeries $name }}
          {{ range $page := first 6 $series.Pages }}
            {{ if ne $page.Permalink $permalink }}
              &amp;lt;meta property=&amp;quot;og:see_also&amp;quot; content=&amp;quot;{{ $page.Permalink }}&amp;quot; /&amp;gt;
            {{ end }}
          {{ end }}
        {{ end }}
      {{ end }}
      {{ if .IsPage }}
        {{ range .Site.Authors }}
          {{ with .Social.facebook }}
            &amp;lt;meta property=&amp;quot;article:author&amp;quot; content=&amp;quot;https://www.facebook.com/{{ . }}&amp;quot; /&amp;gt;
          {{ end }}
          {{ with .Site.Social.facebook }}
            &amp;lt;meta property=&amp;quot;article:publisher&amp;quot; content=&amp;quot;https://www.facebook.com/{{ . }}&amp;quot; /&amp;gt;
          {{ end }}
          &amp;lt;meta property=&amp;quot;article:published_time&amp;quot; content=&amp;quot;{{ .PublishDate }}&amp;quot; /&amp;gt;
          &amp;lt;meta property=&amp;quot;article:modified_time&amp;quot; content=&amp;quot;{{ .Date }}&amp;quot; /&amp;gt;
          &amp;lt;meta property=&amp;quot;article:section&amp;quot; content=&amp;quot;{{ .Section }}&amp;quot; /&amp;gt;
          {{ with .Params.tags }}
            {{ range first 6 . }}
              &amp;lt;meta property=&amp;quot;article:tag&amp;quot; content=&amp;quot;{{ . }}&amp;quot; /&amp;gt;
            {{ end }}
          {{ end }}
        {{ end }}
      {{ end }}
      &amp;lt;!-- Facebook Page Admin ID for Domain Insights --&amp;gt;
      {{ with .Site.Social.facebook_admin }}
        &amp;lt;meta property=&amp;quot;fb:admins&amp;quot; content=&amp;quot;{{ . }}&amp;quot; /&amp;gt;
      {{ end }}

&amp;lt;!-- the new --&amp;gt;
  &amp;lt;!-- layouts/partials/head.html --&amp;gt;
  {{ partial &amp;quot;seo/og.html&amp;quot; . }}
  {{ template &amp;quot;_internal/google_news.html&amp;quot; . }}
  {{ template &amp;quot;_internal/schema.html&amp;quot; . }}
  {{ template &amp;quot;_internal/twitter_cards.html&amp;quot; . }}

  &amp;lt;!-- layouts/partials/seo/og.html --&amp;gt;
  &amp;lt;meta property=&amp;quot;og:title&amp;quot; content=&amp;quot;{{ .Title }}&amp;quot; /&amp;gt;
  &amp;lt;meta property=&amp;quot;og:description&amp;quot; content=&amp;quot;{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}&amp;quot; /&amp;gt;
  &amp;lt;meta property=&amp;quot;og:type&amp;quot; content=&amp;quot;{{ if .IsPage }}article{{ else }}website{{ end }}&amp;quot; /&amp;gt;
  &amp;lt;meta property=&amp;quot;og:url&amp;quot; content=&amp;quot;{{ .Permalink }}&amp;quot; /&amp;gt;
  {{ if .IsPage }}
    {{ with .Params.images }}
      {{ range first 6 . }}
        &amp;lt;meta property=&amp;quot;og:image&amp;quot; content=&amp;quot;{{ . | absURL }}&amp;quot; /&amp;gt;
      {{ end }}
    {{ end }}
  {{ else }}
    {{ with .Site.Params.images }}
      {{ range first 6 . }}
        &amp;lt;meta property=&amp;quot;og:image&amp;quot; content=&amp;quot;{{ . | absURL }}&amp;quot; /&amp;gt;
      {{ end }}
    {{ end }}
  {{ end }}
  {{ if not .Date.IsZero }}
    &amp;lt;meta property=&amp;quot;og:updated_time&amp;quot; content=&amp;quot;{{ .Date.Format &amp;quot;2006-01-02T15:04:05-07:00&amp;quot; | safeHTML }}&amp;quot;/&amp;gt;
  {{ end }}
  {{ with .Params.audio }}
    &amp;lt;meta property=&amp;quot;og:audio&amp;quot; content=&amp;quot;{{ . }}&amp;quot; /&amp;gt;
  {{ end }}
  {{ with .Params.locale }}
    &amp;lt;meta property=&amp;quot;og:locale&amp;quot; content=&amp;quot;{{ . }}&amp;quot; /&amp;gt;
  {{ end }}
  {{ with .Site.Params.title }}
    &amp;lt;meta property=&amp;quot;og:site_name&amp;quot; content=&amp;quot;{{ . }}&amp;quot; /&amp;gt;
  {{ end }}
  {{ with .Params.videos }}
    {{ range .Params.videos }}
      &amp;lt;meta property=&amp;quot;og:video&amp;quot; content=&amp;quot;{{ . | absURL }}&amp;quot; /&amp;gt;
    {{ end }}
  {{ end }}
  &amp;lt;!-- If it is part of a series, link to related articles --&amp;gt;
  {{ $permalink := .Permalink }}
  {{ $siteSeries := .Site.Taxonomies.series }}
  {{ with .Params.series }}
    {{ range $name := . }}
      {{ $series := index $siteSeries $name }}
        {{ range $page := first 6 $series.Pages }}
          {{ if ne $page.Permalink $permalink }}
            &amp;lt;meta property=&amp;quot;og:see_also&amp;quot; content=&amp;quot;{{ $page.Permalink }}&amp;quot; /&amp;gt;
          {{ end }}
        {{ end }}
      {{ end }}
    {{ end }}
    {{ if .IsPage }}
      {{ range .Site.Authors }}
        {{ with .Social.facebook }}
          &amp;lt;meta property=&amp;quot;article:author&amp;quot; content=&amp;quot;https://www.facebook.com/{{ . }}&amp;quot; /&amp;gt;
        {{ end }}
        {{ with .Site.Social.facebook }}
          &amp;lt;meta property=&amp;quot;article:publisher&amp;quot; content=&amp;quot;https://www.facebook.com/{{ . }}&amp;quot; /&amp;gt;
        {{ end }}
        &amp;lt;meta property=&amp;quot;article:published_time&amp;quot; content=&amp;quot;{{ .PublishDate }}&amp;quot; /&amp;gt;
        &amp;lt;meta property=&amp;quot;article:modified_time&amp;quot; content=&amp;quot;{{ .Date }}&amp;quot; /&amp;gt;
        &amp;lt;meta property=&amp;quot;article:section&amp;quot; content=&amp;quot;{{ .Section }}&amp;quot; /&amp;gt;
        {{ with .Params.tags }}
          {{ range first 6 . }}
            &amp;lt;meta property=&amp;quot;article:tag&amp;quot; content=&amp;quot;{{ . }}&amp;quot; /&amp;gt;
          {{ end }}
        {{ end }}
      {{ end }}
    {{ end }}
    &amp;lt;!-- Facebook Page Admin ID for Domain Insights --&amp;gt;
    {{ with .Site.Social.facebook_admin }}
      &amp;lt;meta property=&amp;quot;fb:admins&amp;quot; content=&amp;quot;{{ . }}&amp;quot; /&amp;gt;
    {{ end }}
    {{ with .Site.Social.facebook_app_id }}
      &amp;lt;meta property=&amp;quot;fb:app_id&amp;quot; content=&amp;quot;{{ . }}&amp;quot; /&amp;gt;
    {{ end }}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;As you can see I still have some work to do here.  Even after cleaning it up and making some small changes to &lt;code&gt;og:image&lt;/code&gt;  I still think this is one &lt;code&gt;{{ end }}&lt;/code&gt; tag away from complete.  But, hey, during testing it worked out, so I will continue to play and update this post if any new information comes to light.&lt;/p&gt;

&lt;p&gt;Oh, and as always, don&amp;rsquo;t forget to test your meta data with facebook&amp;rsquo;s &lt;a href=&#34;https://developers.facebook.com/tools/debug/og/object/&#34;&gt;Open Graph Object Debugger&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;http://brendan-quinn.xyz/css/images/facebook-open-graph-debugger.jpg&#34; alt=&#34;Facebooks Open Graph Debugger&#34; /&gt;&lt;/p&gt;

&lt;p&gt;All the Best,&lt;/p&gt;

&lt;p&gt;Brendan&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Working with Hugo&#39;s Internal Partial Templates: twitter-cards</title>
      <link>http://brendan-quinn.xyz/post/working-with-hugos-internal-partial-templates-twitter-cards</link>
      <pubDate>Fri, 12 Feb 2016 03:01:40 -0500</pubDate>
      
      <guid>http://brendan-quinn.xyz/post/working-with-hugos-internal-partial-templates-twitter-cards</guid>
      <description>&lt;p&gt;Hugo&amp;rsquo;s internal templates are neat and helpful.  They are templates that &lt;a href=&#34;https://github.com/spf13/hugo/blob/e445c35d6a0c7f5fc2f90f31226cd1d46e048bbc/tpl/template_embedded.go&#34;&gt;live within hugo&lt;/a&gt; and can be referenced similar to other templates.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-html&#34;&gt;{{ template &amp;quot;_internal/opengraph.html&amp;quot; . }}
{{ template &amp;quot;_internal/google_news.html&amp;quot; . }}
{{ template &amp;quot;_internal/schema.html&amp;quot; . }}
{{ template &amp;quot;_internal/twitter_cards.html&amp;quot; . }}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;As I developed this blog with Hugo&amp;rsquo;s help, I needed to dive into the &lt;code&gt;_internal/twitter_cards.html&lt;/code&gt; template to make sure I had my &lt;code&gt;config.toml&lt;/code&gt; set up correctly.  That search led me &lt;a href=&#34;https://github.com/spf13/hugo/blob/e445c35d6a0c7f5fc2f90f31226cd1d46e048bbc/tpl/template_embedded.go#L147&#34;&gt;here&lt;/a&gt;.  While helpful, I think it is still in alpha.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-html&#34;&gt;{{ if .IsPage }}
  {{ with .Params.images }}
    &amp;lt;!-- Twitter summary card with large image must be at least 280x150px --&amp;gt;
    &amp;lt;meta name=&amp;quot;twitter:card&amp;quot; content=&amp;quot;summary_large_image&amp;quot;/&amp;gt;
    &amp;lt;meta name=&amp;quot;twitter:image:src&amp;quot; content=&amp;quot;{{ index . 0 | absURL }}&amp;quot;/&amp;gt;
{{ else }}
  &amp;lt;meta name=&amp;quot;twitter:card&amp;quot; content=&amp;quot;summary&amp;quot;/&amp;gt;
{{ end }}
  &amp;lt;!-- Twitter Card data --&amp;gt;
  &amp;lt;meta name=&amp;quot;twitter:title&amp;quot; content=&amp;quot;{{ .Title }}&amp;quot;/&amp;gt;
  &amp;lt;meta name=&amp;quot;twitter:description&amp;quot; content=&amp;quot;{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}&amp;quot;/&amp;gt;
  {{ with .Site.Social.twitter }}
    &amp;lt;meta name=&amp;quot;twitter:site&amp;quot; content=&amp;quot;@{{ . }}&amp;quot;/&amp;gt;
  {{ end }}
  {{ with .Site.Social.twitter_domain }}
    &amp;lt;meta name=&amp;quot;twitter:domain&amp;quot; content=&amp;quot;{{ . }}&amp;quot;/&amp;gt;
  {{ end }}
  {{ range .Site.Authors }}
    {{ with .twitter }}
      &amp;lt;meta name=&amp;quot;twitter:creator&amp;quot; content=&amp;quot;@{{ . }}&amp;quot;/&amp;gt;
    {{ end }}
  {{ end }}
{{ end }}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I&amp;rsquo;m still new to Go templating, but it seems to me that the &lt;code&gt;{{ with }}&lt;/code&gt; statement on the second line is missing an &lt;code&gt;{{ end }}&lt;/code&gt; tag.  If true, and once fixed, that would leave the index page without a &lt;code&gt;&amp;lt;meta name=&amp;ldquo;twitter:image&amp;rdquo; content=&amp;ldquo;{{ index . 0 | absURL }}&amp;rdquo;/&amp;gt;&lt;/code&gt; tag.  To fix this I ceated a partial template: &lt;code&gt;ROOT/layouts/seo/twitter.html&lt;/code&gt;.  Here&amp;rsquo;s where my adjustments brought me:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-html&#34;&gt;&amp;lt;!-- layouts/partials/head.html --&amp;gt;
{{ template &amp;quot;_internal/opengraph.html&amp;quot; . }}
{{ template &amp;quot;_internal/google_news.html&amp;quot; . }}
{{ template &amp;quot;_internal/schema.html&amp;quot; . }}
{{ partial &amp;quot;seo/twitter.html&amp;quot; . }}

&amp;lt;!-- layouts/partials/seo/twitter.html --&amp;gt;
{{ if .IsPage }}
  {{ with .Params.images }}
  &amp;lt;!-- Twitter summary card with large image must be at least 280x150px --&amp;gt;
    &amp;lt;meta name=&amp;quot;twitter:card&amp;quot; content=&amp;quot;summary_large_image&amp;quot;/&amp;gt;
    &amp;lt;meta name=&amp;quot;twitter:image:src&amp;quot; content=&amp;quot;{{ index . 0 | absURL }}&amp;quot;/&amp;gt;
    &amp;lt;meta name=&amp;quot;twitter:card&amp;quot; content=&amp;quot;summary&amp;quot;/&amp;gt;
  {{ end }}
  &amp;lt;!-- Twitter Card data --&amp;gt;
  &amp;lt;meta name=&amp;quot;twitter:title&amp;quot; content=&amp;quot;{{ .Title }}&amp;quot;/&amp;gt;
  &amp;lt;meta name=&amp;quot;twitter:description&amp;quot; content=&amp;quot;{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}&amp;quot;/&amp;gt;
  {{ with .Site.Social.twitter }}
    &amp;lt;meta name=&amp;quot;twitter:site&amp;quot; content=&amp;quot;@{{ . }}&amp;quot;/&amp;gt;
  {{ end }}
  {{ with .Site.Social.twitter_domain }}
    &amp;lt;meta name=&amp;quot;twitter:domain&amp;quot; content=&amp;quot;{{ . }}&amp;quot;/&amp;gt;
  {{ end }}
  {{ range .Site.Authors }}
    {{ with .twitter }}
      &amp;lt;meta name=&amp;quot;twitter:creator&amp;quot; content=&amp;quot;@{{ . }}&amp;quot;/&amp;gt;
    {{ end }}
  {{ end }}
{{ else }}
  &amp;lt;meta name=&amp;quot;twitter:card&amp;quot; content=&amp;quot;summary&amp;quot; /&amp;gt;
  {{ with .Site.Social.twitter }}
    &amp;lt;meta name=&amp;quot;twitter:site&amp;quot; content=&amp;quot;@{{ . }}&amp;quot;/&amp;gt;
  {{ end }}
  &amp;lt;meta name=&amp;quot;twitter:title&amp;quot; content=&amp;quot;{{ .Title }}&amp;quot;/&amp;gt;
  &amp;lt;meta name=&amp;quot;twitter:description&amp;quot; content=&amp;quot;{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}&amp;quot;/&amp;gt;
  {{ with .Site.Params.images }}
    {{ range first 6 . }}
      &amp;lt;meta name=&amp;quot;twitter:image&amp;quot; content=&amp;quot;{{ . | absURL }}&amp;quot; /&amp;gt;
    {{ end }}
  {{ end }}
{{ end }}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you choose to do the same or make our own modifications, don&amp;rsquo;t hesitate to test them with Twitter&amp;rsquo;s &lt;a href=&#34;https://cards-dev.twitter.com/validator&#34;&gt;card validator&lt;/a&gt;.  Hopefully it turns out beautifully.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;http://brendan-quinn.xyz/css/images/twitter-card-validator.jpg&#34; alt=&#34;Successful Twitter Card Validation&#34; /&gt;&lt;/p&gt;

&lt;p&gt;All the Best,&lt;/p&gt;

&lt;p&gt;Brendan&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Using HTML5 and Media Queries for Responsive Images</title>
      <link>http://brendan-quinn.xyz/post/using-html5-and-media-queries-for-responsive-images</link>
      <pubDate>Tue, 09 Feb 2016 16:30:47 -0500</pubDate>
      
      <guid>http://brendan-quinn.xyz/post/using-html5-and-media-queries-for-responsive-images</guid>
      <description>

&lt;p&gt;Using &lt;code&gt;&amp;lt;picture&amp;gt;&lt;/code&gt; &lt;code&gt;&amp;lt;source&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; HTML5 elements combined with the &lt;code&gt;media&lt;/code&gt;, &lt;code&gt;srcset&lt;/code&gt;, and &lt;code&gt;size&lt;/code&gt; attributes, it is possible and even necessary to make responsive images for your users.  Doing so will minimize the size of your images, make it your site load faster, and therefore create a better UX. There are two approaches.  To decide, ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Q: Do I want to take into account device orientation and/or screen resolution?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3 id=&#34;answer-1-no:7ea357097035431ef70c20e57337b2ed&#34;&gt;Answer 1: &amp;lsquo;No.&amp;rsquo;&lt;/h3&gt;

&lt;p&gt;Thats cool.  This approach is simpler, which makes sense. It is for a simpler use-case.  Heres an example of an HTML5 responsive &lt;code&gt;&amp;lt;img /&amp;gt;&lt;/code&gt; element.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-css&#34;&gt;/* CSS */
@media only screen and (max-width: 799px) {
  img {
    width: 50%;
  }
}

@media only screen and (min-width: 800px) and (max-width: 1419px) {
  img {
    width: 75%;
  }
}

@media only screen and (min-width: 1240px) {
  img {
    width: 100%;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;pre&gt;&lt;code class=&#34;language-html&#34;&gt;&amp;lt;!--  HTML --&amp;gt;
&amp;lt;img sizes=&amp;quot;(min-width: 1240px) 100vw,
    (min-width: 800px) 75vw,
    (min-width: 0px) 50vw&amp;quot;
  srcset=&amp;quot;http://brendan-quinn.xyz/css/images/responsive-images-portrait-sm-2x.jpg 200w,
    http://brendan-quinn.xyz/css/images/responsive-images-portrait-sm-2x.jpg 400w,
    http://brendan-quinn.xyz/css/images/responsive-images-portrait-md.jpg 528w,
    http://brendan-quinn.xyz/css/images/responsive-images-portrait-lg.jpg 1000w,
    http://brendan-quinn.xyz/css/images/responsive-images-portrait-md-2x.jpg 1046w,
    http://brendan-quinn.xyz/css/images/responsive-images-portrait-lg-1.5x.jpg 1500w,
    http://brendan-quinn.xyz/css/images/responsive-images-portrait-lg-2x.jpg 2000w&amp;quot;
  src=&amp;quot;http://brendan-quinn.xyz/css/images/responsive-images-portrait-sm.jpg&amp;quot;
  alt=&amp;quot;Icelandic Landscape View&amp;quot; /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;code&gt;Sizes&lt;/code&gt; takes a inequality using &lt;code&gt;min-width&lt;/code&gt; or &lt;code&gt;max-width&lt;/code&gt; and the size of the image at each viewport size. &lt;code&gt;(min-width: 800px) 75vw,&lt;/code&gt; coincide with the css width of the image: &lt;code&gt;@media only screen and (min-width: 800px) and (max-width: 1419px) { img {width: 75%;} }&lt;/code&gt;.  This helps the browser calculate the size of the image that it can then search through &lt;code&gt;srcset&lt;/code&gt; and find the appropriate image. If, for example, a user were browsing on a device which had a viewport size of 910px, the second media statement would be satisfied.  It would then calculate 910 * .75 = 675, and look for the appropriate image in &lt;code&gt;srcset&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Srcset&lt;/code&gt; contains a comma delimited list of identical images of different scale and their width.  for example, &lt;code&gt;&lt;a href=&#34;http://brendan-quinn.xyz/css/images/responsive-images-portrait-md-2x.jpg&#34;&gt;http://brendan-quinn.xyz/css/images/responsive-images-portrait-md-2x.jpg&lt;/a&gt; 1046w,&lt;/code&gt; tells us that image &lt;code&gt;responsive-images-portrait-md-2x.jpg&lt;/code&gt; is &lt;code&gt;1046px&lt;/code&gt; wide.  The best image for the use-case given of a viewport of width 910px and therefore and image width of 675px would then be &lt;code&gt;&lt;a href=&#34;http://brendan-quinn.xyz/css/images/responsive-images-portrait-lg.jpg&#34;&gt;http://brendan-quinn.xyz/css/images/responsive-images-portrait-lg.jpg&lt;/a&gt; 1000w,&lt;/code&gt; since it is the smallest image that will not distort to fit the space.&lt;/p&gt;

&lt;p&gt;Here it is &lt;a href=&#34;http://codepen.io/Mathdrquinn/pen/JGwEjL&#34;&gt;live&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;p data-height=&#34;500&#34; data-theme-id=&#34;0&#34; data-slug-hash=&#34;JGwEjL&#34; data-default-tab=&#34;result&#34; data-user=&#34;Mathdrquinn&#34; class=&#39;codepen&#39;&gt;See the Pen &lt;a href=&#39;http://codepen.io/Mathdrquinn/pen/JGwEjL/&#39;&gt;Responsive HTML5 Image Element&lt;/a&gt; by Brendan Quinn (&lt;a href=&#39;http://codepen.io/Mathdrquinn&#39;&gt;@Mathdrquinn&lt;/a&gt;) on &lt;a href=&#39;http://codepen.io&#39;&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;script async src=&#34;//assets.codepen.io/assets/embed/ei.js&#34;&gt;&lt;/script&gt;&lt;/p&gt;

&lt;h3 id=&#34;answer-2-yes-resolution-and-orientation-are-important:7ea357097035431ef70c20e57337b2ed&#34;&gt;Answer 2: &amp;lsquo;Yes. Resolution and orientation are important.&amp;rsquo;&lt;/h3&gt;

&lt;p&gt;Double Cool.  This approach introduces two additional elements: &lt;code&gt;picture&lt;/code&gt; and &lt;code&gt;source&lt;/code&gt;.  Here&amp;rsquo;s the structure:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-html&#34;&gt;&amp;lt;picture&amp;gt;
  &amp;lt;source srcset=&amp;quot;&amp;lt;!-- url for a device pixel ratio of 1 --&amp;gt; 1x,
      &amp;lt;!-- url for a device pixel ratio of 1.5 --&amp;gt; 1.5x,
      &amp;lt;!-- url for a device pixel ratio of 2 --&amp;gt; 2x&amp;quot;
    media=&amp;quot;&amp;lt;!-- Media conditions here--&amp;gt;&amp;quot; /&amp;gt;
  &amp;lt;source srcset=&amp;quot;&amp;lt;!-- url for a device pixel ratio of 1 --&amp;gt; 1x,
      &amp;lt;!-- url for a device pixel ratio of 1.5 --&amp;gt; 1.5x,
      &amp;lt;!-- url for a device pixel ratio of 2 --&amp;gt; 2x&amp;quot;
    media=&amp;quot;-- Media conditions here--&amp;quot; /&amp;gt;
  &amp;lt;img src=&amp;quot;&amp;lt;!-- default url --&amp;gt;&amp;quot; alt=&amp;quot;&amp;quot; /&amp;gt;
&amp;lt;/picture&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Similar to both answer 1 and a switch statement, the browser will load the first source whose media condition evaluates to true with the correct url to match the pixel ratio of the device.&lt;/p&gt;

&lt;p&gt;Because media is separated out into its own attribute, we have available to us all of the options we would in CSS.  Here is a more flushed out example with media queries that consider orientation.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-html&#34;&gt;&amp;lt;picture&amp;gt;
  &amp;lt;source srcset=&amp;quot;http://brendan-quinn.xyz/css/images/responsive-images-landscape-lg.jpg 1x,
      http://brendan-quinn.xyz/css/images/responsive-images-landscape-lg-1.5x.jpg 1.5x,
      http://brendan-quinn.xyz/css/images/responsive-images-landscape-lg-2x.jpg 2x&amp;quot;
    media=&amp;quot;only screen and (min-width: 1240px)&amp;quot;&amp;gt;
  &amp;lt;source srcset=&amp;quot;http://brendan-quinn.xyz/css/images/responsive-images-landscape-md.jpg 1x,
      http://brendan-quinn.xyz/css/images/responsive-images-landscape-md-1.5x.jpg 1.5x,
      http://brendan-quinn.xyz/css/images/responsive-images-landscape-md-2x.jpg 2x&amp;quot;
    media=&amp;quot;only screen and (min-width: 800px)&amp;quot;&amp;gt;
  &amp;lt;source srcset=&amp;quot;http://brendan-quinn.xyz/css/images/responsive-images-landscape-sm.jpg 1x,
      http://brendan-quinn.xyz/css/images/responsive-images-landscape-sm-1.5x.jpg 1.5x,
      http://brendan-quinn.xyz/css/images/responsive-images-landscape-sm-2x.jpg 2x&amp;quot;
    media=&amp;quot;only screen and (min-width: 0px) and (orientation: landscape)&amp;quot;&amp;gt;
  &amp;lt;source srcset=&amp;quot;http://brendan-quinn.xyz/css/images/responsive-images-portrait-sm.jpg 1x,
      http://brendan-quinn.xyz/css/images/responsive-images-portrait-sm-1.5x.jpg 1.5x,
      http://brendan-quinn.xyz/css/images/responsive-images-portrait-sm-2x.jpg 2x&amp;quot;
    media=&amp;quot;all and (min-width: 0px) and (orientation: portrait)&amp;quot;&amp;gt;
  &amp;lt;img src=&amp;quot;http://brendan-quinn.xyz/css/images/responsive-images-landscape-sm-2x.jpg&amp;quot; alt=&amp;quot;Icelandic Landscape&amp;quot; /&amp;gt;
&amp;lt;/picture&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href=&#34;http://codepen.io/Mathdrquinn/pen/rxQPLx&#34;&gt;Live&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;p data-height=&#34;325&#34; data-theme-id=&#34;0&#34; data-slug-hash=&#34;rxQPLx&#34; data-default-tab=&#34;result&#34; data-user=&#34;Mathdrquinn&#34; class=&#39;codepen&#39;&gt;See the Pen &lt;a href=&#39;http://codepen.io/Mathdrquinn/pen/rxQPLx/&#39;&gt;Responsive HTML5 Images&lt;/a&gt; by Brendan Quinn (&lt;a href=&#39;http://codepen.io/Mathdrquinn&#39;&gt;@Mathdrquinn&lt;/a&gt;) on &lt;a href=&#39;http://codepen.io&#39;&gt;CodePen&lt;/a&gt;.&lt;/p&gt;
&lt;script async src=&#34;//assets.codepen.io/assets/embed/ei.js&#34;&gt;&lt;/script&gt;&lt;/p&gt;

&lt;p&gt;While I enjoy the flexibility of this method, it is verbose, and while orientation changing works well on my desktop, I&amp;rsquo;m having issue getting orientation to work on mobile.  I&amp;rsquo;m still looking for a solution and will add the details if I find an answer.&lt;/p&gt;

&lt;p&gt;As always, if you&amp;rsquo;re looking for much more detail on these elements and attributes, visit the &lt;a href=&#34;https://www.w3.org/html/wg/drafts/html/master/semantics.html#embedded-content&#34;&gt;W3C specifications&lt;/a&gt; and pour over them.  While this post just skims the topic of responsive images, it would have been a poor one had I not consulted it.&lt;/p&gt;

&lt;p&gt;All the Best,&lt;/p&gt;

&lt;p&gt;Brendan&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Pointing Hover Domain to Your Heroku App</title>
      <link>http://brendan-quinn.xyz/post/pointing-hover-domain-to-your-heroku-app</link>
      <pubDate>Wed, 03 Feb 2016 09:12:34 -0500</pubDate>
      
      <guid>http://brendan-quinn.xyz/post/pointing-hover-domain-to-your-heroku-app</guid>
      <description>&lt;p&gt;Hosting static sites for free on Github&amp;rsquo;s Pages is fantastic, but it might be more preferable to ru your own server.  My go-to for that is &lt;a href=&#34;https://www.heroku.com/&#34;&gt;Heroku&lt;/a&gt;.  This post will not go into how to host on Heroku (I will assume you already are hosting there), but how to point your purchased &lt;a href=&#34;hover.com&#34;&gt;hover&lt;/a&gt; domain to your Heroku-hosted web-app.  The process has a few more nuances than my previous post on &lt;a href=&#34;http://brendan-quinn.xyz/blog/pointing-hover-domain-to-github-pages/&#34;&gt;pointing to gh-pages&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For the following directions I&amp;rsquo;ll use &lt;your-Heroku-URL&gt; in place of your Heroku URL and &lt;your-hover-URL&gt; as your purchased hover URL.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;On hover click through your desired domain (&lt;a href=&#34;https://hover.com/domain/&#34;&gt;https://hover.com/domain/&lt;/a&gt;&lt;your-hover-URL&gt;).  Under the initial &amp;ldquo;Domain Details&amp;rdquo; tab, edit the &amp;ldquo;Forward This Domain&amp;rdquo; value and enter &lt;your-Heroku-URL&gt;.
&lt;img src=&#34;http://brendan-quinn.xyz/css/images/hover-to-heroku-domain-details.jpg&#34; alt=&#34;hover to Heroku Domain Details example&#34; /&gt;&lt;/li&gt;
&lt;li&gt;Still on hover, move over to the &amp;ldquo;DNS&amp;rdquo; tab.  Click &amp;ldquo;ADD NEW&amp;rdquo;.  Enter the following values:

&lt;ul&gt;
&lt;li&gt;Hostname: www, Record Type: CNAME, Value: &lt;your-Heroku-URL&gt;
And Save.  Your screen should look like this:
&lt;img src=&#34;http://brendan-quinn.xyz/css/images/hover-to-heroku-dns-records.jpg&#34; alt=&#34;hover to Heroku DNS record example&#34; /&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Within your Heroku dashboard, open your app and go to the settings tab (the URL should resemble &lt;a href=&#34;https://dashboard.heroku.com/apps/&#34;&gt;https://dashboard.heroku.com/apps/&lt;/a&gt;&lt;your-Heroku-URL&gt;/settings).  Scroll down to the Domains section and click &amp;ldquo;Add domain&amp;rdquo; and enter the following values:

&lt;ul&gt;
&lt;li&gt;Domain Name: &lt;your-hover-URL&gt;, DNS Target: &lt;your-Heroku-URL&gt;.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Boom goes the dynomite.  Give it a few minutes to settle (it took mine 10-15 min) and you&amp;rsquo;re off and ready!  If you have any trouble, I used hover&amp;rsquo;s chat to talk with a super helpful guy named Ryan.  While you might not get Ryan, hover&amp;rsquo;s service is top-notch and they&amp;rsquo;ll help you out and send you, in my opinion, a few too many emails assuring your issue was resolved.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All the Best,&lt;/p&gt;

&lt;p&gt;Brendan&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Pointing Hover Domain to Github Pages</title>
      <link>http://brendan-quinn.xyz/post/pointing-hover-domain-to-github-pages</link>
      <pubDate>Tue, 02 Feb 2016 09:49:50 -0500</pubDate>
      
      <guid>http://brendan-quinn.xyz/post/pointing-hover-domain-to-github-pages</guid>
      <description>&lt;p&gt;I was introduced to &lt;a href=&#34;hover.com&#34;&gt;hover&lt;/a&gt; by being an info nerd with &lt;a href=&#34;http://99percentinvisible.org/&#34;&gt;99% Invisible&lt;/a&gt;.  Many people still use Go Daddy because it is the industry standard and, for the most part, it is cheaper.  I prefer good customer service and a simple UX, hence my hover preference.  It seems there is still a small lack of resources on integrating hosting services with hover, so I&amp;rsquo;d like to put my findings here.  This process was made a lot easier with help from &lt;a href=&#34;http://michaeljdeeb.com/blog/using-a-custom-domain-with-github-pages/&#34;&gt;Michael Deeb&lt;/a&gt;, though my explanation aims to be more visual and ELI5.  This post assumes you&amp;rsquo;re familiar with Github and the git cli.  If you&amp;rsquo;re not familiar, begin &lt;a href=&#34;https://help.github.com/articles/set-up-git/&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This static blog is hosted using &lt;a href=&#34;https://pages.github.com/&#34;&gt;Github&amp;rsquo;s Pages&lt;/a&gt; (which only handles static sites), which is awesome because it completely free if you don&amp;rsquo;t mind your code being public.  Then spend a couple of dollars your domain of choice from hover and lets begin.&lt;/p&gt;

&lt;p&gt;For the following directions I&amp;rsquo;ll use &lt;GH-Pages-URL&gt; in place of your Github Pages URL and &lt;your-hover-URL&gt; as your purchased hover URL.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Within your hover account, click your desired domain and traverse to the DNS tab.&lt;/li&gt;
&lt;li&gt;Delete all DNS records with a &amp;ldquo;Records&amp;rdquo; value of &amp;ldquo;A&amp;rdquo;.&lt;/li&gt;
&lt;li&gt;Add new records with the following values:

&lt;ul&gt;
&lt;li&gt;Hostname: @, Record Type: A, Value: 192.30.252.153&lt;/li&gt;
&lt;li&gt;Hostname: @, Record Type: A, Value: 192.30.252.154&lt;/li&gt;
&lt;li&gt;Hostname: www, Record Type: CNAME, Value: &lt;GH-Pages-URL&gt;
When complete, your screen should look something like:
&lt;img src=&#34;http://brendan-quinn.xyz/css/images/hover-dns-records.jpg&#34; alt=&#34;hover DNS records example&#34; /&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Go to your Github repo&amp;rsquo;s root directory.  To the right of the green &amp;ldquo;New pull request&amp;rdquo; button, click &amp;ldquo;New file&amp;rdquo;.  Give this file the exact name &amp;ldquo;CNAME&amp;rdquo; (UPPERCASE!!) and enter &lt;your-hover-URL&gt; on line one with no other content and commit the file.  If you prefer to use your favorite editor to create the file and then push it up, be my guest.  The CNAME file should resemble this:
&lt;img src=&#34;http://brendan-quinn.xyz/css/images/Github-CNAME-file.jpg&#34; alt=&#34;Github CNAME file&#34; /&gt;&lt;/li&gt;
&lt;li&gt;Thats it! But be patient.  The redirect can take up to 10 min to settle, although usually it happens in much less time.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All the Best,&lt;/p&gt;

&lt;p&gt;Brendan&lt;/p&gt;
</description>
    </item>
    
  </channel>
</rss>