diff --git a/contents/docs/libraries/docusaurus.mdx b/contents/docs/libraries/docusaurus.mdx index 3dc09e93dc09..dae01833074e 100644 --- a/contents/docs/libraries/docusaurus.mdx +++ b/contents/docs/libraries/docusaurus.mdx @@ -6,40 +6,40 @@ tags: - community --- -> This is a community integration that is not maintained by the PostHog core team. +To easily track your Docusaurus site, you can install the [PostHog plugin](https://github.com/PostHog/posthog-docusaurus). This enables you to autocapture pageviews, clicks, session replays, as well as use the other features of PostHog such as [surveys](/docs/surveys). ## Install +Once you have your Docusaurus site set up, install the PostHog plugin: + ```bash -yarn add posthog-docusaurus +npm install --save posthog-docusaurus ``` -or +or ```bash -npm install --save posthog-docusaurus +yarn add posthog-docusaurus ``` -## How to use +Next, add it to your Docusaurus config with your project API key and instance address, both of which you can find in [your project settings](https://us.posthog.com/settings/project). ```js -// in docusaurus.config.js +// docusaurus.config.js module.exports = { plugins: [ [ "posthog-docusaurus", { apiKey: "", - appUrl: "", // optional + appUrl: "", // optional, defaults to "https://us.i.posthog.com" enableInDevelopment: false, // optional - // other options are passed to posthog-js init as is - // NOTE: options are passed through JSON.stringify(), so functions (such as `sanitize_properties`) are not supported. }, ], ], }; ``` -This will automatically start tracking pageviews, clicks and more. +Run your site again to see events autocaptured by PostHog. -For more instructions, see the [browser JS library](/docs/integrate/client/js). +> **Note:**You can pass additional PostHog [config options](/docs/libraries/js#config) to the plugin, but they are passed through `JSON.stringify()`, so functions (such as `sanitize_properties`) are not supported. \ No newline at end of file diff --git a/src/navs/index.js b/src/navs/index.js index 5034831e6851..6ee24de9bb13 100644 --- a/src/navs/index.js +++ b/src/navs/index.js @@ -1211,11 +1211,8 @@ export const docsMenu = { url: '/docs/libraries/django', }, { - name: 'Docusaurus v2', + name: 'Docusaurus', url: '/docs/libraries/docusaurus', - badge: { - title: '3rd party', - }, }, { name: 'Flask', diff --git a/src/pages/docs/frameworks.tsx b/src/pages/docs/frameworks.tsx index e0b7beee4610..4496d072e00b 100644 --- a/src/pages/docs/frameworks.tsx +++ b/src/pages/docs/frameworks.tsx @@ -26,7 +26,7 @@ export const quickLinks = [ to: '/docs/libraries/django', }, { - name: 'Docusaurus v2', + name: 'Docusaurus', to: '/docs/libraries/docusaurus', }, {