https://github.com/balena-io/valletta
Tool to build and manage Discourse theme customizations
https://github.com/balena-io/valletta
discourse
Last synced: about 1 year ago
JSON representation
Tool to build and manage Discourse theme customizations
- Host: GitHub
- URL: https://github.com/balena-io/valletta
- Owner: balena-io
- License: apache-2.0
- Created: 2017-03-07T11:25:13.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-02-16T09:49:06.000Z (over 5 years ago)
- Last Synced: 2025-03-26T18:21:17.662Z (about 1 year ago)
- Topics: discourse
- Language: JavaScript
- Size: 21.5 KB
- Stars: 10
- Watchers: 25
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - balena-io/valletta - Tool to build and manage Discourse theme customizations (others)
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.
[](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',
//