Technical & DevelopmentIntermediate
netlify-config
Reference for netlify.toml site configuration
Developer Setup
Setup & Installation
bash
npx skills add https://github.com/netlify/context-and-tools --skill netlify-confignpx skills add https://github.com/netlify/context-and-tools --skill netlify-configOr paste this URL into your assistant to install:
Overview
What This Skill Does
Covers the complete netlify.toml configuration syntax for defining build settings, redirects, headers, deploy contexts, environment variables, functions, and edge functions. The file sits at the repository root and controls how Netlify builds and serves your site.
Application
When to use this Skill
- Configuring integration settings for custom agent workflows.
- Optimizing query execution and response latency in production.
- Developing clean, standard-compliant implementations for enterprise services.
- Troubleshooting connection timeouts and authentication handshakes.
- Monitoring API rate limits and execution pipelines programmatically.
Documentation
Show Skills.md file
Netlify Configuration (netlify.toml)
Place netlify.toml at the repository root (or at the base directory for monorepos).
Build Settings
[build]
base = "project/" # Base directory (default: root)
command = "npm run build" # Build command
publish = "dist/" # Output directory
Redirects
# Basic redirect
[[redirects]]
from = "/old"
to = "/new"
status = 301 # 301 (default), 302, 200 (rewrite), 404
# SPA catch-all
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
# Splat (wildcard)
[[redirects]]
from = "/blog/*"
to = "/news/:splat"
# Path parameters
[[redirects]]
from = "/users/:id"
to = "/api/users/:id"
status = 200
# Force (override existing files)
[[redirects]]
from = "/app/*"
to = "/index.html"
status = 200
force = true
# Proxy to external service
[[redirects]]
from = "/api/*"
to = "https://api.example.com/:splat"
status = 200
[redirects.headers]
X-Custom = "value"
# Country/language conditions
[[redirects]]
from = "/*"
to = "/fr/:splat"
status = 200
conditions = { Country = ["FR"], Language = ["fr"] }
Lines 1 - 61 of 170
Recommendations