$ git clone https://github.com/classcentral/review-widget.git
$ cd review-widget
$ python -m SimpleHTTPServer 8000
Head over to http://localhost:8000 to see it live. If you get an error, try changing the port.
Embed the widget either via a course id or auto-detection. Ensure to include the widget.min.js
file found on our CDN.
<div class="classcentral-review" lang="en" data-courseid="2161"> </div>
<script async src="https://d3f1iyfxxz8i1e.cloudfront.net/reviews/widget.min.js" charset="utf-8"></script>
<div class="classcentral-review" data-courseid="auto-detect" data-course-name="Machine Learning for Musicians and Artists" data-provider-courseurl="https://www.kadenze.com/courses/machine-learning-for-musicians-and-artists/info" data-provider-name="kadenze"></div>
<script async src="https://d3f1iyfxxz8i1e.cloudfront.net/reviews/widget.min.js" charset="utf-8"></script>
- Duplicate and rename
config.dev.js.dist
toconfig.dev.js
- Update the parameters to reflect your local setup.
- Run
npx gulp dev
- Output to >
build/widget.dev.js
- Run
npx gulp prod
- Output to >
build/widget.min.js