NR

Restart blogging

It’s been a long time since I haven’t write anything, and this is another attempt to it. What’s new:

  • new design based on grids
  • static website, with technical details below
  • a “read” section
  • all projects will migrate to Solutions Nicvi

Technical details

Site built with gatsby, with turned off SPA, as described by Scott Nonnenberg. Also I figured out how to host a website in the root of the domain, using DNSimple’s Alias entry and hosted on AWS S3, since the Rackspace CDN does not understand Alias.

Technical issues

Initially I started using the awesome styled-components, but when building the application for static use (no React run time), the styles are not extracted, as described in this issue extract static styles. So I had to migrate all the code to generic React components, and that it’s fairly easy by using functional components:

before:

import styled from 'styled-components';
import { Link } from 'react-router';

const HPLink = styled(Link)`
  box-shadow: none;
  font-size: 0.9rem;
`;

export default HPLink

after:

import React from 'react'
import { Link } from 'react-router';

const HPLink = ({to, ...props}) => {
  return <Link to={to} style={{
    boxShadow: 'none',
    fontSize: '.9rem',
  }}>{props.children}</Link>;
};


export default HPLink
Mar 2nd 2017