🍊Installation & Initialization
Last updated
Last updated
Installing Yeerlo is as simple as adding up the javascript library with a script tag, and the css with a link tag. The Bare Metal installation is shown below:
Staying updated with latest changes: Our client library is actively being enhanced and developed. To guarantee that you're using the latest and most stable version of our libraries, you can append the current timestamp at the end of the src or href HTML tags. For example: https://sdk.yeerlo.com/v1.js?1703924649579
. Alternatively, you can use any randomly generated number to circumvent our/your caching strategies for these libraries. This approach is also recommended for the css https://sdk.yeerlo.com/v1.min.css?1703924649579
.
Please do note that doing this may lead to a little longer load times, as opposed to situations where your web app employs caching (e.g PWAs) for subsequent & faster load times.
The next step is initializing the Yeerlo Js library. The Bare Metal initialization is shown below:
Alternatively, you can easily get started with the Yeerlo Nuxt library available on NPM here: https://www.npmjs.com/package/@yeerlo/nuxt. The updated initialization parameters can be found in the Github page here: https://github.com/Yeerlo/NuxtYeerlo
This is by far the easiest installation and initialization method available!
Now that you've known how to install and initialize Yeerlo, the next thing is to get acquainted with the possible parameters you can pass to the Yeerlo object when calling new Yeerlo({...});
Helpful tip: always refer back to this section for a proper list of all the parameters you can provide when initializing Yeerlo object.
The table below summarizes the different parameters that can be supplied when creating a new Yeerlo instance:
Hint: a category slug on Yeerlo, is the last part of a category url after the /category/
. For example, the slug in this url https://yeerlo.com/category/arts-and-culture is arts-and-culture
. You can find the available list of categories by simply going to https://yeerlo.com and clicking on the Categories
menu to view all categories.
Property | Type | Required | Meaning |
---|---|---|---|
container
String
Yes
Specifies an exact location within your ui, to inject the events. Could be a class name or Id reference. e.g "#yeerloContainer"
or ".yeerloContainer"
Display modes (creatorId
, creatorIds
, random
, categorySlug
, and countryName
)
String | Array
Yes (but only one mode must be enabled at a time)
Helps you filter the kind of events you would want to display in your web apps. You can filter by country, category slug, creators etc.
layoutMode
String
Yes
Helps you specify a layout for each kind of event mode supported on Yeerlo. The default is events
displayFormat
String
Yes
Indicates how you want to render the events in your web apps. Available formats are default
and simple
limit
Number
No
Helps you limit the number of events shown on each section of your web app. For example, you can display 1 event in your hero section, 3 or 4 in another section of the same page