Plugins

What are ulka plugins ?

Ulka plugins are scripts that lets you to customize the data and the site. Ulkajs makes it more easier to add, modify or delete data.


Using ulka plugins

Using ulka plugins is very straight forward. All you need to do is download the plugin and pass it to the plugins array in ulka-config.js

For eg:
If you want to generate sitemap for your site, then there is a plugin for ulka called ulka-plugin-sitemap

To install it run the following command in root directory of your project.

npm i ulka-plugin-sitemap

Then in your ulka-config.js add ulka-plugin-sitemap to the plugins array

// ulka-config.js

module.exports = {
    ...
    plugins: [`ulka-plugin-sitemap`]
}


Passing options to plugins

Some plugins accepts options from the users. In that case you can pass the object and pass the name of plugins in the resolve key and options in the options key.

// ulka-config.js

module.exports = {
    ...
    plugins: [
        {
            resolve: `ulka-plugin-sitemap`,
            options: {
                lastmod: true,
            }
        }
    ]
}

  Edit this page on github
ulkajs © 2021