Sample Code

Norway

Why Code?


$ git clone https://github.com/yashsoni.com/yashsoni.com.git
$ cd yashsoni.com
$ yarn
$ yarn dev
<div class="meta">Friday, March 9, 2018 at 11:53pm UTC+11</div>
<div class="comment">Some post, comment, song, or link shared</div>
import fetch from 'isomorphic-unfetch';

export default async function(...args) {
  const res = await fetch(...args);

  return res.json();
}

data will contain the JSON response from our API route.

// /api/unsplash

{
  "downloads": 7995,
  "views": 1134429
}
venue_list = []
try:
    data = make_request(url)
for item in data['response']['groups'][0]['items']:
    venue = item['venue']
    venue_list.append(Business(
        venue['name'],
        venue['location']['address'],
        venue['rating'],
        venue['ratingSignals'],
        venue['stats']['checkinsCount']))
except Exception, e:
    print e
@keyframes color {
  0% {
    fill: #99002f;
  }
  50% {
    fill: #ffc426;
  }
  100% {
    fill: #99002f;
  }
}
---
title: Migrating to Hugo
description: Why I chose this static site generator and the benefits you can receive.
date: 2017-09-29
images: ["http://www.leejamesrobinson.com/static/images/migrating-to-hugo/hugo.png"]
categories:
  - code
---