---
title: Snippet Configuration
description: "## What is the config panel? The config panel appears on the snippet edit screen and lists variables when the snippet's source code contains a valid config block — a delimited section near the top of the code that declares…"
url: "https://brightleafdigital.io/docs/snippet-configuration/"
updated: "2026-10-20"
category: GravityOps Code Snippet Manager / Managing Snippets
---

# Snippet Configuration

## What is the config panel?

The config panel appears on the snippet edit screen and lists variables when the snippet's source code contains a valid config block — a delimited section near the top of the code that declares user-configurable values. If no variables are found, the panel shows an empty-state message and a re-scan button.

Instead of editing the snippet code directly, you fill in values in the config panel. GOCSM stores those values in the database and injects them into the generated file each time you save or activate the snippet. This means snippet updates from GitHub never overwrite your customizations.

## Setting config values

1. Open the snippet edit screen.
2. The **Configuration** panel appears below the code editor.
3. Each row shows the **Variable**, its **Default**, a **Value** input for your custom value, and a **Description** (with the annotation type underneath, when the snippet declares one).
4. Enter your values and click **Save Snippet**. The generated file is updated immediately if the snippet is active.

## How to enter values

Values are entered exactly as they would appear in code, and GOCSM checks each one before saving:

- **PHP and JavaScript** — use literal values. Text needs quotes (`'hello'`); numbers, `true`/`false`, and arrays are written as-is. Function calls and variables are not allowed.
- **CSS** — enter the raw value, such as `#0073aa` or `12px`.

If a value is invalid, the save is blocked and the error is shown so you can correct it.

## Orphaned configs

When a variable that you previously configured is removed from the config block — by an update from GitHub, or by you editing a custom snippet's source and saving — that row is moved to the **Orphaned Configuration** section. Your value is preserved in the database but not injected into the snippet anymore. Orphaned rows are shown as a warning so you know the variable is no longer in use.

## Re-scan

The **Re-scan source for config variables** button re-parses the config block from the current source code without saving. This is useful while writing a custom snippet — you can see how GOCSM will interpret your config block before committing.
