https://github.com/clay/clay-kiln
Editing tools for Clay
https://github.com/clay/clay-kiln
clay javascript
Last synced: about 2 months ago
JSON representation
Editing tools for Clay
- Host: GitHub
- URL: https://github.com/clay/clay-kiln
- Owner: clay
- License: mit
- Created: 2015-05-11T18:21:37.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2025-02-06T15:20:32.000Z (4 months ago)
- Last Synced: 2025-03-29T09:12:49.157Z (2 months ago)
- Topics: clay, javascript
- Language: JavaScript
- Homepage: http://docs.clayplatform.com/clay-kiln/
- Size: 19.2 MB
- Stars: 27
- Watchers: 32
- Forks: 27
- Open Issues: 85
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.MD
- License: LICENSE
Awesome Lists containing this project
README
# Kiln
🔥 Editing tools for Clay 🔥
[](https://circleci.com/gh/clay/clay-kiln) [](https://coveralls.io/github/nymag/clay-kiln?branch=master)
Powering [New York Magazine](http://nymag.com/), [Vulture](http://www.vulture.com/), [The Cut](http://www,thecut.com/), [Grub Street](http://www.grubstreet.com/).
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 `` 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:
```yaml
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:
```yaml
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:
```handlebars
<div class="kiln-internals">{{ > component-list kilnInternals }}</div>
```