Files
kill-the-news/wrangler-example.toml
T
Julien Herr 5d75682702 build: add Wrangler text rule for CSS imports
Add [[rules]] type = "Text" globs = ["**/*.css"] to wrangler-example.toml
so Wrangler bundles .css files as raw text strings importable in TypeScript.
Add src/types/css.d.ts to provide the module declaration for `import css from "*.css"`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 15:43:49 +02:00

67 lines
2.1 KiB
TOML

name = "kill-the-news"
main = "src/index.ts"
compatibility_date = "REPLACE_WITH_COMPATIBILITY_DATE"
compatibility_flags = ["nodejs_compat"]
# Global KV Namespace bindings
kv_namespaces = [
{ binding = "EMAIL_STORAGE", id = "REPLACE_WITH_YOUR_KV_NAMESPACE_ID", preview_id = "REPLACE_WITH_YOUR_PREVIEW_KV_NAMESPACE_ID" }
]
# Optional: R2 bucket for storing email attachment enclosures
# r2_buckets = [
# { binding = "ATTACHMENT_BUCKET", bucket_name = "REPLACE_WITH_YOUR_BUCKET_NAME", preview_bucket_name = "REPLACE_WITH_YOUR_PREVIEW_BUCKET_NAME" }
# ]
# Import CSS files as text strings (inlined in HTML <style> tags)
[[rules]]
type = "Text"
globs = ["**/*.css"]
# Workers Observability (keeps config in sync with dashboard toggle)
[observability.logs]
enabled = true
invocation_logs = true
# Global Environment variables
[vars]
DOMAIN = "REPLACE_WITH_YOUR_DOMAIN" # Your custom domain for emails
# Optional: size-based feed trimming threshold in bytes (default: 524288 = 512 KB)
# FEED_MAX_SIZE_BYTES = "524288"
# Optional: external proxy auth (Authelia/Authentik)
# Comma-separated IPs of trusted reverse proxies
# PROXY_TRUSTED_IPS = "10.0.0.1"
# ── Worker secrets (never put these in [vars]) ──────────────────────────────
# PROXY_AUTH_SECRET must be set as a Worker secret, NOT in [vars]:
# wrangler secret put PROXY_AUTH_SECRET
# WARNING: never add it to [vars] — it would be committed to version control.
# WARNING: disable the workers.dev subdomain in production when using proxy auth.
# Development environment
[env.dev]
workers_dev = true
# Production environment
[env.production]
workers_dev = false
kv_namespaces = [
{ binding = "EMAIL_STORAGE", id = "REPLACE_WITH_YOUR_KV_NAMESPACE_ID" }
]
# Optional: R2 bucket for storing email attachment enclosures
# r2_buckets = [
# { binding = "ATTACHMENT_BUCKET", bucket_name = "REPLACE_WITH_YOUR_BUCKET_NAME" }
# ]
routes = [
{ pattern = "REPLACE_WITH_YOUR_DOMAIN", custom_domain = true },
{ pattern = "www.REPLACE_WITH_YOUR_DOMAIN", custom_domain = true }
]
[env.production.vars]
DOMAIN = "REPLACE_WITH_YOUR_DOMAIN"