Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/balena-io/valletta

Tool to build and manage Discourse theme customizations
https://github.com/balena-io/valletta

discourse

Last synced: 27 days ago
JSON representation

Tool to build and manage Discourse theme customizations

Awesome Lists containing this project

README

        

# valletta

A tool to build and manage [Discourse](https://discourse.org) theme customizations.
Generate `.json` files that you can upload or paste into the Discourse admin
interface, allowing you to use your existing workflow and source control.

[![Build Status](https://travis-ci.org/resin-io/valletta.svg?branch=master)](https://travis-ci.org/resin-io/valletta)

***

## Installation

```sh
$ npm install --save valletta
```

## Usage

You can use valletta from within a node script

```js
const valletta = require('valletta')

valletta.generate({
name: 'My Theme',
srcDir: 'theme_files',
outputDir: 'build'
})
```

or from the command line

```
$ valletta build
```

By default valletta will look for the first matching config file called
`valletta.config.js`, if any, in the current directory, nearest ancestor, or
user's home directory.
The config file should export an options object that will be used to
generate the discourse theme file.

Here is an example `valletta.config.js` file:

```js
module.exports = {
srcDir: 'theme',
outputDir: 'build',
name: 'My custom theme',
enabled: false,
files: {
// CSS
stylesheet: 'stylesheet.css',
// Header
header: 'header.tpl.html',
// Top
top: 'top.tpl.html',
// Footer
footer: 'footer.tpl.html',
//
head_tag: 'head_tag.tpl.html',
//