SSGO LogoDOCS

About creators

Creators are, with templates, the central part of an ssgo project. You can see them as page factories. They are basically the entry points of your data fetching and your page building.

In order to be known by ssgo and to be ran, creators must meet two conditions:

The buildPage function

The buildPage function is the function given by ssgo as first parameter of every creator's default exported function. You can call it as much as needed to create pages.

The type of the buildPage function is the following:

(template: string, data: IContextData, options: IBuildPageOptions) => void

IContextData and IBuildPageOptions are defined inside of https://deno.land/x/ssgo/mod.ts

Here's details about the parameters accepted by buildPage:

The ssgoBag object

The ssgoBag is an object containing utilities you might need inside of your creators. It is given by ssgo to every creator's default exported function, as second parameter.

At the moment, the ssgoBag exposes 3 utility functions:

This bag of utilities aims to be filled with more content in the future. If you have an idea of something useful that could be added to the ssgoBag, please feel free to fill and issue.

Tips


Something about this page is wrong? Edit it on GitHub.