-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,39 @@ | ||
# envoy.com Webflow Website Scripts | ||
|
||
> :warning: **this repo is public**: Do not include any sensitive code here. | ||
## Intro | ||
|
||
For hosting public scripts used on envoy.com webflow website | ||
|
||
These scripts are used for various purposes including but not limited to: | ||
|
||
- Handling what happens after form submissions (/utils/form-handlers.js) | ||
- Table of contents on the blog | ||
- Marketo CSS styles | ||
- Calculator component on Virtual Front Desk page | ||
- Trigger Chili Piper booking tool on events template pages | ||
|
||
## Setup | ||
|
||
The repo has a Github action (auto-tag.yml) to automatically manage versions. | ||
|
||
Versions are tracked in the .version file as an auto-incrementing integer. Each time you push code, the version will update by 1. | ||
|
||
Every time you push to the main branch, the Github action creates a tag. | ||
|
||
With the tag, you can create new releases and use jsdelivr to serve the scripts. | ||
|
||
for example, to use the form-handlers.js script you can use the following URL: | ||
|
||
``` | ||
https://cdn.jsdelivr.net/gh/envoy/webflow-website@<tag>/src/utils/form-handlers.js | ||
``` | ||
|
||
In Webflow site-wide custom code settings, you'll see this: | ||
|
||
``` | ||
<script defer src='https://cdn.jsdelivr.net/gh/envoy/webflow-website@30/src/utils/form-handlers.js' type="text/javascript"></script> | ||
``` | ||
|
||
It's a minimal approach to version control and serving scripts to the website. |