webflow-university is a pnpm monorepo with 2 packages:
packages/scripts: TypeScript that builds to browser JavaScript files loaded on Webflow University pages through jsdelivr or a local dev redirect.packages/code-components: React-based Webflow Code Components that are developed locally with Vite and shared into Webflow with the Webflow CLI.
Critical code that depends on user auth state or backend features, such as course progress, is managed in the private
webflow/webflowmonorepo.
The scripts package builds 3 browser bundles into packages/scripts/dist.
dist/index.jsis the main Webflow University script. It initializes sidebar behavior, sidebar active-link highlighting, theme switching, contrast switching, global search behavior, and the/coursesgrid/list UI.dist/pro/index.jsis used on Pro event listing pages. It reads recurrence data from CMS-rendered data attributes, calculates the next event occurrence, updates date/time text, supports a user-timezone toggle, and enables horizontal session-tab scrolling.dist/pro/template-page.jsis used on Pro template/detail pages. It reads session recurrence data from#data-saver, renders upcoming session dates and registration links, and enables horizontal session-tab scrolling.
Use these files from jsdelivr in Webflow, for example:
<script
defer
src="https://cdn.jsdelivr.net/gh/webflow/webflow-university@1.3/packages/scripts/dist/index.js"
></script>The code-components package contains Webflow Code Components for richer UI that is easier to build in React than directly in Webflow. Current components include Autoplay Tabs, WFU CMS Calendar, and ProSphere.
Share components to Webflow with:
pnpm share:componentspnpm install# Serve the scripts package from http://localhost:3000 with live reload
pnpm dev:scripts
# Run the code-components Vite dev server
pnpm dev:components# Build all packages
pnpm build
# Build one package
pnpm build:scripts
pnpm build:componentsCreate a changeset when your change should be released:
pnpm changesetThen follow the prompts to choose the changed package and version bump type. Commit the generated .changeset/*.md file with your PR.
- Open a PR into
main. - Make sure CI passes: tests, lint, type check, and build.
- Merge the PR.
- If the PR included a changeset, GitHub Actions opens a version PR.
- Merge the version PR to create the GitHub release and make the scripts available from jsdelivr.
- Update the script URL inside Webflow if the release includes a major or minor version change. Patch changes are picked up automatically; to force a patch update sooner, purge the jsDelivr cache at jsdelivr.com/tools/purge.
The main way to QA scripts is to run the local dev bundle and redirect the jsdelivr URL to localhost with a redirect service like Requestly.
-
Start the local scripts server:
pnpm dev:scripts
-
In Requestly, create a redirect rule from the jsdelivr script URL to the matching localhost bundle.
Example for the main script:
- From:
https://cdn.jsdelivr.net/gh/webflow/webflow-university@1.3/packages/scripts/dist/index.js - To:
http://localhost:3000/index.js
- From:
-
Open the relevant Webflow University page and verify the behavior in the browser.
For Pro bundles, redirect to the matching local file:
packages/scripts/dist/pro/index.js->http://localhost:3000/pro/index.jspackages/scripts/dist/pro/template-page.js->http://localhost:3000/pro/template-page.js
You can also QA scripts with Chrome local overrides instead of Requestly.
Run the component dev server, test the component locally, then share it to Webflow when ready:
pnpm dev:components
pnpm share:componentspnpm test
pnpm lint
pnpm check
pnpm build