Git Product home page Git Product logo

clay-kiln's Introduction

Kiln

illustration of a kiln

๐Ÿ”ฅ Editing tools for Clay ๐Ÿ”ฅ

CircleCI Coverage Status

Powering New York Magazine, Vulture, The Cut, Grub Street. Created by New York Media.

Installation

npm install --save clay-kiln

Kiln comes with compiled scripts and styles, most of which will be automatically inlined by the template.

The logged-in scripts must be copied (from dist/clay-kiln-edit.js and dist/clay-kiln-view.js) into your publicly-served assets directory, as they'll be linked by <script src="[site assetPath]/js/clay-kiln-edit.js"> and <script src="[site assetPath]/js/clay-kiln-view.js">.

This allows your end users' browsers to cache the (fairly weighty) Kiln application code, speeding up page loads across your sites.

Usage

As Kiln itself is a component, it must be included in your layouts and have some data, e.g. allow: true (a convention we use for components that don't otherwise have data in them). Add an instance of Kiln to your bootstraps:

components:
  clay-kiln:
    instances:
      general:
        allow: true

Then create a non-editable component list in your layout (preferably near the end), and add a reference to your Kiln instance:

components:
  layout:
    instances:
      article:
        kilnInternals:
          -
            _ref: /_components/clay-kiln/instances/general

Make sure you add that component list to your layout template, and double check that it isn't editable:

<div class="kiln-internals">{{ > component-list kilnInternals }}</div>

clay-kiln's People

Contributors

amelvisfranco avatar amycheng avatar byronhulcher avatar cperryk avatar davidandrewfrey avatar dependabot[bot] avatar dmabuada avatar elgreg avatar fraddski avatar frederickcxa avatar fxisco avatar greenkeeperio-bot avatar james-owen avatar jasondecastro avatar jonwinton avatar jpope19 avatar kerenlerner avatar mariafdezj avatar mattoberle avatar meijioro avatar nelsonpecora avatar oscarpolanco avatar reubenson avatar rmfarrell avatar scottnash avatar takenpilot avatar ughitsaaron avatar zonika 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.