-
Javascript & CSS Quickstart
Looking to add Javascript & CSS to Vanilla? This is the place to start. There's a few different ways to do this, but some are easier and more optimal. Adding JS inside of an Addon Before continuing with this, you need to have and addon. If you don't have one already, see the Addon Quickstart Guide. Using Typescript Modern…
-
Theme Variable Documentation
Documentation is generated by using either the yarn build:variable-docs or the yarn build command. Output is in /dist/variable-schema.json and is a JSON schema for a flat variable structure. Usage Documentation lives inline in the code as docblocks around the variables. Technically the docblocks could be anywhere in any…
-
Theming Quickstart
This documentation is meant for developers using GitHub to create file-based themes. This feature is only available to Enterprise clients with their own cluster on Vanilla Cloud. The easiest way to get started is to start from another theme. Foundation is a good theme to use, as it is what our theming system is based on.…
-
Vanilla's Frontend Build System
Vanilla’s frontend scripts use a single global build process. This is used for all internal Javscript, both in core and addons. What does it do? The included build process uses Typescript and Webpack to bundle typescript files to into javascript bundles. Every addon in your current vanilla project containing entries will…
-
Knowlege-Base Article reactions event
As of release 2020.11 a javascript event (X-Vanilla-Article-Voted) is being fired on each user's reaction. This event is passing the article and knowledge-base records (see our docs) as well as the reaction vote registered (yes|no). Using X-Vanilla-Article-Voted event As a developer you can hook into this event, by just…
-
Vanilla CLI Overview (Deprecated)
Vanilla provides a command line tool to make various tasks easier for developers working on Vanilla Forums core or addons. Current functionalities include: Building frontend assets (scripts, stylesheets, and images). Generating cache files for addons. Converting addons’ PluginInfo/ThemeInfo to the addon.json format.…
-
Adding a customizable Widget to the Theme Editor
This guide will help us through the process of adding a section in the theme editor to style a component. In this example we will be implementing customizable Discussion Lists. Prerequisites You will need: A react component to customize (in this case, the DiscussionList) Theme variables used for styling the component (make…
-
Routing in React
Once a PageDispatchController has been configured and the server is serving a route, the frontend needs to be configured to mount something there. From here the frontend router will attempt to handle as much routing as possible, until it it navigates to a route outside of its current section. Generally this is caused by a…
-
Get Information About The Current User With JavaScript
Do you want details about a currently signed in user so that you can spawn integrations with third-party libraries? Some examples of this are: You want to add a third-party chat application to your page and their provided snippet requires you to supply it with a username and email address. You have a third-party analytics…
-
Vanilla CLI Installation (Deprecated)
Prerequisites Vanilla CLI has the same pre-requisites as Vanilla. Setup Installation with Composer Run composer global require 'vanilla/vanilla-cli'. If your composer bin directory is on your path, you can now run the tool with vanilla. If you are having difficulty locating your composer bin directory it is likely located…