Skip to content

Latest commit

 

History

History
75 lines (51 loc) · 1.87 KB

5.extend.md

File metadata and controls

75 lines (51 loc) · 1.87 KB
navigation
title
Extend

Extend

Extend Docus with the power of Nuxt modules

Docus is based on Nuxt, so you can benefit from the existing ecosystem of Nuxt Modules.

Analytics

There are multiple analytics modules that you can use with your documentation. Just choose the one that you prefer.

Plausible

If you want to use Plausible, you can do so with the vue-plausible plugin.

  1. Register on Plausible and add your website info.

  2. Install the Plausible plugin in your project.

::code-group

yarn install vue-plausible
npm install vue-plausible

::

  1. Register the plugin
export default {
  buildModules: [
    'vue-plausible'
  ]
}

::alert type: success

That's it! Deploy your project and enjoy Plausible. ::

Custom integration

If you didn't find the integration you were looking for or if you don't want to use an existing module, you can always can set things up manually. Let's say you want to integrate Plausible Analytics manually.

After you complete registration, Plausible gives you an install snippet, a script tag that looks like this:

<script async defer data-domain="YOUR_DOMAIN" src="https://plausible.io/js/plausible.js"></script>

All you need to do is add this script inside the <head> of your website. This can be done using the head property.

So just edit nuxt.config.js and add the script:

export default {
  head: {
    script: [
      { async: true, defer: true, "data-domain": "YOUR_DOMAIN", src: "https://plausible.io/js/plausible.js" }
    ]
  }
}