Giter Site home page Giter Site logo

carraway's Introduction

Carraway

Carraway

Tool to simplify building a Gatsby site. For more information see Motivation and Implementation below.

Installation

# using npm:

npm install gatsby carraway

# using yarn:

yarn add gatsby carraway

Usage

Create a gatsby.config.json file in your repos root or add a gatsby field to your package.json, with the following structure:

{
  "siteMetadata": {},
  "plugins": []
}

This will act the basis for the Gatsby site Carraway builds.

Building Site

To build your Gatsby site with Carraway, run:

carraway build

Development Mode

To run your Gatsby site in development mode with Carraway, run:

carraway develop

Cleaning Up

To clean up the artifacts created by Gatsby and Carraway, run:

carraway clean

Motivation

While building my website, the website for my surname, the AtomLinter website, and AtomBuild website I became very interested with idea of separating the content of a website from the code that renders it to a webpage.

Gatsby does a lot of the work for us by letting us isolate how data and content is handled from the React code that renders it. The framework then takes this one step further by allowing you to isolate entire website themes, and slotting in content and data.

Carraway aims to take this functionality to the next step with the goal of creating Gatsby sites with repos that contain no code, just the site's data, content, and configuration.

Sites using Carraway will still be using Gatsby, and you will have to configure it as such. However instead of configuring Gatsby in a gatsby-config.js at the repo's root, Carraway sites will be configured using JSON in a gatsby.config.json file at the repo's root or under the gatsby field in the repo's package.json.

Why Carraway?

In The Great Gatsby the reader follows the tale of narrator Nick Carraway as he recalls his summer with the titular character Jay Gatsby. Through the course of the book Nick befriends Gatsby and helps him attain a lifelong muse.

Similar to this dynamic of classic American literature, our Carraway simply hopes to make things easier for us and Gatsby.

Implementation

Much like the character its named after, this package is rather simple.

Carraway creates a gatsby-config.js for Gatsby to interact with, and invokes Gatsby for you. This lets us declare our site's configuration somewhere else, while providing it to Gatsby when Gatsby needs it.

Prior Art

  • Gatsby - powerful static-site generating framework
  • Docz - builds a Gatsby site based on repo content

License

Copyright Kepler Sticka-Jones 2019. Licensed ISC.

carraway's People

Contributors

dependabot-preview[bot] avatar imgbot[bot] avatar keplersj avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.