How to Publish Slater Code to Webflow (Step‑by‑Step)

Add your Slater script to Webflow’s project settings, publish to staging from Slater, verify on webflow.io, then promote to production once everything checks out.

Prerequisites

  • A Webflow project you can publish.
  • A Slater project with at least one code file.

Step‑by‑step

  1. Connect Slater to Webflow
    • Start a new project and connect it to your Webflow project.
    • Open your project and copy the connection script.
    • In Webflow → Project Settings → Custom Code, paste the script (commonly in the site footer) and save.
    • Publish the site so the script is live.
  2. Create or update a file in Slater
    • Use the editor to write or paste your JavaScript.
    • Lint and validate with Slater’s built‑in checks.
  3. Choose your environment and publish
    • From Slater, publish to Staging first.
    • If you use the Smart Script, it will load staging files on webflow.io and production files on your custom domain.
  4. Verify on staging
    • Visit your webflow.io site.
    • Open DevTools → Network and Console to confirm the Slater file loads and no errors are thrown.
    • Test key user flows and interactions.
  5. Promote to production
    • Publish to Production in Slater.
    • Republish your Webflow site to apply changes to your custom domain.
  6. Post‑publish checks
    • Re‑test on the production domain.
    • Set a reminder to review performance (Lighthouse) after deployment.

Troubleshooting

  • I don’t see my changes: Ensure you published the correct environment in Slater and republished your Webflow site.
  • Wrong environment loading: Verify domain context (webflow.io vs. custom domain) and Smart Script setup.
  • A third‑party library isn’t available: Confirm its script is included before your dependent file.
  • Something is wrong in production: In your project settings, turn off "minify production files" for easier debugging.

FAQs

  • Do I need Webflow’s page‑level code too? Use page‑level code only when scoping is needed; otherwise, centralize in Slater.
  • Can I roll back? Yes—republish a previous version from Slater and re‑publish your Webflow site.
  • Does this replace Webflow hosting? No—Slater complements Webflow by managing and hosting your custom JavaScript.
Jared Malan