Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/samgutentag/sbburgerweek/llms.txt

Use this file to discover all available pages before exploring further.

config.js exports a single THEME object that drives all site identity, metadata, integrations, and runtime behavior — from the favicon emoji and header title to the map’s starting coordinates and the Cloudflare Worker URL. After every change to config.js, run python3 apply-theme.py to propagate your updates to the OG image, CNAME, HTML files, README, and the Worker’s SQL queries.

Complete config.js

The full default configuration file, with all fields and their inline comments:
// Theme configuration — edit this file to rebrand for a different food event.
// After editing, run: python3 apply-theme.py
// This updates og-image, CNAME, HTML fallbacks, and README to match.

const THEME = {
  // Event identity
  eventName: "SB Burger Week 2026",
  eventDates: "Feb 19–25",
  emoji: "🍔",

  // OG image text (two lines for the social preview image)
  ogLine1: "Santa Barbara",
  ogLine2: "Burger Week 2026",

  // Labels (what to call the featured item)
  itemLabel: "burger",
  itemLabelPlural: "burgers",

  // Site URL (used for OG meta tags, embed snippets, print page)
  siteUrl: "https://sbburgerweekmap.com",

  // Description (used for meta tags)
  description:
    "Interactive map of all participating restaurants. Search, filter by area, and get directions.",

  // Header
  sourceLabel: "Source: The Independent",
  sourceUrl: "https://www.independent.com/2026/02/18/go-beast-mode-for-santa-barbara-burger-week-2026",

  // Venmo tip jar (set venmoUser to null to hide the link)
  venmoUser: "samgutentag",
  venmoNote: "Buy me a burger?",

  // Tip jar tiers — size: "s" (custom emoji), "m" (half theme emoji), "l" (full theme emoji)
  // The "m" tier is auto-featured (orange border). Tracking: tip-s, tip-m, tip-l
  tipTiers: [
    { size: "s", label: "Side of Fries", emoji: "🍟", amount: 1 },
    { size: "m", label: "Half a Burger",               amount: 5 },
    { size: "l", label: "Full Burger",                 amount: 10 },
  ],

  // LocalStorage namespace
  storageKey: "sbburgerweek-checklist",

  // Print page
  printTitle: "SB Burger Week 2026 — My Picks",

  // Event start date — used for analytics/stats time filters (ISO date)
  eventStartDate: "2026-02-19",

  // Event end date — concluded banner/modal auto-shows after this date
  // (ISO date, null to never show)
  eventEndDate: "2026-02-25",

  // Map center and zoom level
  mapCenter: [34.42, -119.7],
  mapZoom: 13,

  // GitHub repo URL (used in About modal, footer links)
  githubRepoUrl: "https://github.com/samgutentag/sbburgerweek",

  // Data launch date — before this date, data.js (skeleton) is loaded.
  // On or after this date, data-<year>.js (full menu details) is loaded.
  // Format: "YYYY-MM-DD" in local time, activates at 12:01 AM.
  // Set null to always load full data.
  dataLiveDate: "2026-02-18",

  // Event tracking — Cloudflare Worker URL (null to disable)
  trackUrl: null,

  // Cloudflare Web Analytics (null to disable)
  cfAnalyticsToken: null,

  // Contact email domain — generates sb{itemLabel}week{year}@{domain}
  // Set null to hide the contact link
  contactDomain: "samgutentag.com",

  // Filter definitions — shared by app.js and stats.js
  // Tags: category filters shown in the search menu
  tagFilters: [
    { key: "vegetarian", icon: "🌱", label: "Vegetarian" },
    { key: "glutenFree",  icon: "🚫", label: "Gluten Free" },
    { key: "hasFries",    icon: "🍟", label: "Fries" },
  ],
  // Hours: time-of-day filters (hidden until hours.json loads)
  hoursFilters: [
    { key: "open",   icon: "🟢", label: "Open Now" },
    { key: "lunch",  icon: "☀️",  label: "Lunch" },
    { key: "dinner", icon: "🌙", label: "Dinner" },
  ],

  // Google Places API key for hours fetching (null to disable hours feature)
  // Only used by fetch-hours.py and fetch-place-ids.py, never exposed client-side.
  // The actual key must be stored as a GitHub repo secret: GOOGLE_PLACES_API_KEY
  googlePlacesApiKey: null,
};

// Next event promo (shown in off-season banner). null for generic "check back" message.
THEME.nextEvent = null;

Event state machine

config.js also defines two runtime functions — getEventState() and canCastVotes() — that drive the site’s behaviour based on the current date relative to your event dates. getEventState() returns one of four string values:
StateWhen
off-seasontrackUrl is null, or none of the other conditions match
pre-eventOn or after dataLiveDate and before eventStartDate
duringOn or after eventStartDate and before (or on) eventEndDate
post-eventAfter eventEndDate — the concluded banner appears automatically
canCastVotes() returns true during pre-event and during, and also for 5 days after eventEndDate (the grace period), so late visitors can still upvote their favourites.
function getEventState() {
  var now = new Date();
  var liveDate  = THEME.dataLiveDate   ? new Date(THEME.dataLiveDate   + "T00:01:00") : null;
  var startDate = THEME.eventStartDate ? new Date(THEME.eventStartDate + "T00:00:00") : null;
  var endDate   = THEME.eventEndDate   ? new Date(THEME.eventEndDate   + "T23:59:59") : null;
  if (!THEME.trackUrl) return "off-season";
  if (endDate   && now > endDate)   return "post-event";
  if (startDate && now >= startDate) return "during";
  if (liveDate  && now >= liveDate)  return "pre-event";
  return "off-season";
}

function canCastVotes() {
  var state = getEventState();
  if (state === "pre-event" || state === "during") return true;
  if (state === "post-event" && THEME.eventEndDate) {
    var grace = new Date(THEME.eventEndDate + "T23:59:59");
    grace.setDate(grace.getDate() + 5);
    return new Date() <= grace;
  }
  return false;
}

Tip jar tiers

The tipTiers array controls what appears in the Venmo tip jar modal. Each tier has four fields:
FieldTypeDescription
size"s" | "m" | "l"Controls the display size and emoji. "s" shows a custom emoji field; "m" shows half the theme emoji; "l" shows the full theme emoji.
labelstringHuman-readable label shown below the amount.
emojistringOnly used when size is "s". Ignored for "m" and "l".
amountnumberDollar amount sent to Venmo.
The "m" tier always receives an orange featured border regardless of its position in the array. Setting venmoUser to null hides the entire tip jar. The default tiers from the Burger Week config:
tipTiers: [
  { size: "s", label: "Side of Fries", emoji: "🍟", amount: 1  },
  { size: "m", label: "Half a Burger",               amount: 5  },
  { size: "l", label: "Full Burger",                 amount: 10 },
],

Filter definitions

Two arrays in THEME define the filter buttons rendered in the sidebar’s search panel. tagFilters — dietary and category tag filters. Each entry maps directly to a boolean property on restaurant objects. The default set:
tagFilters: [
  { key: "vegetarian", icon: "🌱", label: "Vegetarian" },
  { key: "glutenFree",  icon: "🚫", label: "Gluten Free" },
  { key: "hasFries",    icon: "🍟", label: "Fries" },
],
hoursFilters — time-of-day filters that appear only after hours.json loads. If the file is absent, these buttons are hidden automatically and the rest of the map works normally. The default set:
hoursFilters: [
  { key: "open",   icon: "🟢", label: "Open Now" },
  { key: "lunch",  icon: "☀️",  label: "Lunch" },
  { key: "dinner", icon: "🌙", label: "Dinner" },
],
Both app.js and stats.js read these arrays directly from the THEME object at runtime, so adding or removing a filter entry takes effect immediately after you reload the page — no apply-theme.py run is required for filter changes alone.
Always run python3 apply-theme.py after any change to config.js. The script updates the following files to match your new config — they cannot read config.js at build time and will show stale values otherwise:
  • og-image.svg and og-image.png (event name, dates, emoji, domain)
  • CNAME (custom domain extracted from siteUrl)
  • index.html, embed/index.html, embed/map/index.html, stats/index.html (favicon, titles, banners, analytics snippet)
  • README.md (hits badge domain, embed snippet, title)
  • workers/track/index.js and .github/workflows/snapshot-tracking.yml (event start date in SQL queries)
For a field-by-field reference covering every THEME property, accepted types, and default values, see Config Field Reference.

Build docs developers (and LLMs) love