Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docs): upgrade to latest Docus #17

Merged
merged 4 commits into from
Dec 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ node_modules
coverage
dist
sw.*
.output
14 changes: 14 additions & 0 deletions docs/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export default defineAppConfig({
docus: {
socials: {
twitter: '@nuxt_js',
github: 'nuxt-community/ackee-module'
},
header: {
title: 'Nuxt Ackee',
logo: true
},
title: 'Nuxt Ackee',
url: 'https://ackee.nuxtjs.org'
}
})
35 changes: 35 additions & 0 deletions docs/components/Logo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<template>
<svg width="200" height="40" viewBox="0 0 200 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0)">
<path
d="M47.82 30V16.112H50.984L51.264 18.464C51.6933 17.6427 52.3093 16.9893 53.112 16.504C53.9333 16.0187 54.8947 15.776 55.996 15.776C57.7133 15.776 59.048 16.3173 60 17.4C60.952 18.4827 61.428 20.0693 61.428 22.16V30H57.844V22.496C57.844 21.3013 57.6013 20.3867 57.116 19.752C56.6307 19.1173 55.8747 18.8 54.848 18.8C53.84 18.8 53.0093 19.1547 52.356 19.864C51.7213 20.5733 51.404 21.5627 51.404 22.832V30H47.82ZM70.0632 30.336C68.3272 30.336 66.9832 29.7947 66.0312 28.712C65.0978 27.6293 64.6312 26.0427 64.6312 23.952V16.112H68.1872V23.616C68.1872 24.8107 68.4298 25.7253 68.9152 26.36C69.4005 26.9947 70.1658 27.312 71.2112 27.312C72.2005 27.312 73.0125 26.9573 73.6472 26.248C74.3005 25.5387 74.6272 24.5493 74.6272 23.28V16.112H78.2112V30H75.0472L74.7672 27.648C74.3378 28.4693 73.7125 29.1227 72.8912 29.608C72.0885 30.0933 71.1458 30.336 70.0632 30.336ZM80.5743 30L85.6143 23.056L80.5743 16.112H84.4103L87.9383 21.04L91.4383 16.112H95.3023L90.2343 23.056L95.3023 30H91.4383L87.9383 25.072L84.4103 30H80.5743ZM103.774 30C102.318 30 101.151 29.6453 100.274 28.936C99.3963 28.2267 98.9576 26.9667 98.9576 25.156V19.108H96.5776V16.112H98.9576L99.3776 12.388H102.542V16.112H106.294V19.108H102.542V25.184C102.542 25.856 102.682 26.3227 102.962 26.584C103.26 26.8267 103.764 26.948 104.474 26.948H106.21V30H103.774ZM108.195 33.108L115.195 8.244H118.695L111.667 33.108H108.195Z"
fill="var(--logo-fill-color)" />
<path
d="M125.944 30.336C124.749 30.336 123.769 30.1493 123.004 29.776C122.239 29.384 121.669 28.8707 121.296 28.236C120.923 27.6013 120.736 26.9013 120.736 26.136C120.736 24.848 121.24 23.8027 122.248 23C123.256 22.1973 124.768 21.796 126.784 21.796H130.312V21.46C130.312 20.508 130.041 19.808 129.5 19.36C128.959 18.912 128.287 18.688 127.484 18.688C126.756 18.688 126.121 18.8653 125.58 19.22C125.039 19.556 124.703 20.06 124.572 20.732H121.072C121.165 19.724 121.501 18.8467 122.08 18.1C122.677 17.3533 123.443 16.784 124.376 16.392C125.309 15.9813 126.355 15.776 127.512 15.776C129.491 15.776 131.049 16.2707 132.188 17.26C133.327 18.2493 133.896 19.6493 133.896 21.46V30H130.844L130.508 27.76C130.097 28.5067 129.519 29.1227 128.772 29.608C128.044 30.0933 127.101 30.336 125.944 30.336ZM126.756 27.536C127.783 27.536 128.576 27.2 129.136 26.528C129.715 25.856 130.079 25.0253 130.228 24.036H127.176C126.224 24.036 125.543 24.2133 125.132 24.568C124.721 24.904 124.516 25.324 124.516 25.828C124.516 26.3693 124.721 26.7893 125.132 27.088C125.543 27.3867 126.084 27.536 126.756 27.536ZM144.12 30.336C142.701 30.336 141.451 30.028 140.368 29.412C139.285 28.796 138.427 27.9373 137.792 26.836C137.176 25.7347 136.868 24.4747 136.868 23.056C136.868 21.6373 137.176 20.3773 137.792 19.276C138.427 18.1747 139.285 17.316 140.368 16.7C141.451 16.084 142.701 15.776 144.12 15.776C145.893 15.776 147.387 16.2427 148.6 17.176C149.813 18.0907 150.588 19.36 150.924 20.984H147.144C146.957 20.312 146.584 19.7893 146.024 19.416C145.483 19.024 144.839 18.828 144.092 18.828C143.103 18.828 142.263 19.2013 141.572 19.948C140.881 20.6947 140.536 21.7307 140.536 23.056C140.536 24.3813 140.881 25.4173 141.572 26.164C142.263 26.9107 143.103 27.284 144.092 27.284C144.839 27.284 145.483 27.0973 146.024 26.724C146.584 26.3507 146.957 25.8187 147.144 25.128H150.924C150.588 26.696 149.813 27.956 148.6 28.908C147.387 29.86 145.893 30.336 144.12 30.336ZM154.105 30V9.84H157.689V21.74L162.617 16.112H166.873L161.189 22.44L167.797 30H163.317L157.689 23.028V30H154.105ZM175.619 30.336C174.219 30.336 172.977 30.0373 171.895 29.44C170.812 28.8427 169.963 28.0027 169.347 26.92C168.731 25.8373 168.423 24.5867 168.423 23.168C168.423 21.7307 168.721 20.452 169.319 19.332C169.935 18.212 170.775 17.344 171.839 16.728C172.921 16.0933 174.191 15.776 175.647 15.776C177.009 15.776 178.213 16.0747 179.259 16.672C180.304 17.2693 181.116 18.0907 181.695 19.136C182.292 20.1627 182.591 21.3107 182.591 22.58C182.591 22.7853 182.581 23 182.563 23.224C182.563 23.448 182.553 23.6813 182.535 23.924H171.979C172.053 25.0067 172.427 25.856 173.099 26.472C173.789 27.088 174.62 27.396 175.591 27.396C176.319 27.396 176.925 27.2373 177.411 26.92C177.915 26.584 178.288 26.1547 178.531 25.632H182.171C181.909 26.5093 181.471 27.312 180.855 28.04C180.257 28.7493 179.511 29.3093 178.615 29.72C177.737 30.1307 176.739 30.336 175.619 30.336ZM175.647 18.688C174.769 18.688 173.995 18.94 173.323 19.444C172.651 19.9293 172.221 20.676 172.035 21.684H178.951C178.895 20.7693 178.559 20.0413 177.943 19.5C177.327 18.9587 176.561 18.688 175.647 18.688ZM192.353 30.336C190.953 30.336 189.712 30.0373 188.629 29.44C187.546 28.8427 186.697 28.0027 186.081 26.92C185.465 25.8373 185.157 24.5867 185.157 23.168C185.157 21.7307 185.456 20.452 186.053 19.332C186.669 18.212 187.509 17.344 188.573 16.728C189.656 16.0933 190.925 15.776 192.381 15.776C193.744 15.776 194.948 16.0747 195.993 16.672C197.038 17.2693 197.85 18.0907 198.429 19.136C199.026 20.1627 199.325 21.3107 199.325 22.58C199.325 22.7853 199.316 23 199.297 23.224C199.297 23.448 199.288 23.6813 199.269 23.924H188.713C188.788 25.0067 189.161 25.856 189.833 26.472C190.524 27.088 191.354 27.396 192.325 27.396C193.053 27.396 193.66 27.2373 194.145 26.92C194.649 26.584 195.022 26.1547 195.265 25.632H198.905C198.644 26.5093 198.205 27.312 197.589 28.04C196.992 28.7493 196.245 29.3093 195.349 29.72C194.472 30.1307 193.473 30.336 192.353 30.336ZM192.381 18.688C191.504 18.688 190.729 18.94 190.057 19.444C189.385 19.9293 188.956 20.676 188.769 21.684H195.685C195.629 20.7693 195.293 20.0413 194.677 19.5C194.061 18.9587 193.296 18.688 192.381 18.688Z"
fill="#73FAC8" />
<circle cx="17" cy="20" r="17" fill="url(#paint0_linear)" />
</g>
<defs>
<linearGradient id="paint0_linear" x1="0" y1="3" x2="34" y2="37" gradientUnits="userSpaceOnUse">
<stop stop-color="#73FAC8" />
<stop offset="1" stop-color="#00BEE1" />
</linearGradient>
<clipPath id="clip0">
<rect width="200" height="40" fill="white" />
</clipPath>
</defs>
</svg>

</template>

<style scoped lang="ts">
css({
svg: {
'--logo-fill-color': '#003C3C',

'@dark': {
'--logo-fill-color': 'white'
}
}
})
</style>
84 changes: 31 additions & 53 deletions docs/content/en/index.md → docs/content/index.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
---
title: "Documentation"
description: "Track without being tracking on Nuxt with Ackee analytics"
category: "Home"
features:
description: "Track without being tracked on Nuxt with Ackee analytics."
layout: "default"
aside: false
---

# Documentation

Track without being tracked on Nuxt with Ackee analytics.

---

::list
- Add Ackee to your Nuxt app in seconds
- Ask for user consent easily
- Automatic script loading
- Automatic page tracking
- Access to tracker with $ackee
---

Track without being tracked on Nuxt with [Ackee analytics](https://ackee.electerious.com)

## Features

<list :items="features"></list>
::

[Check Release Notes](https://github.com/nuxt-community/ackee-module/blob/main/CHANGELOG.md)

Expand All @@ -30,24 +33,16 @@ This module allows you to plug easily your Nuxt website to a domain on your Acke

Add `@nuxtjs/ackee` dependency to your project:

<code-group>
<code-block label="Yarn" active>

::code-group
<!-- prettier-ignore -->
```bash
```bash [Yarn]
yarn add --dev @nuxtjs/ackee
```

</code-block>
<code-block label="NPM">

<!-- prettier-ignore -->
```bash
```bash [NPM]
npm install --save-dev @nuxtjs/ackee
```

</code-block>
</code-group>
::

Then add `@nuxtjs/ackee` to the `buildModule` section of `nuxt.config.js` and configure your Ackee `server` and `domainId`:

Expand All @@ -65,23 +60,19 @@ Then add `@nuxtjs/ackee` to the `buildModule` section of `nuxt.config.js` and co
}
```

<alert>

::alert
Use the `modules` property instead of `buildModules` if you are using `nuxt < 2.9.0`

</alert>
::

Voilà! Your Nuxt application is ready to report to your Ackee domain~

## Usage

This module injects `$ackee` into your application. It contains an [`ackee-tracker` instance](https://github.com/electerious/ackee-tracker#%EF%B8%8F-instance-api) (but not only, see [asking for consent](#asking-for-consent)). You can use it to create and update new records, actions, and more.

<alert>

::alert
This module already takes care of creating a new record on every page navigation. That's why in most cases you don't need to get beyond the above setup!

</alert>
::

### Sending Events

Expand Down Expand Up @@ -157,23 +148,18 @@ From now on, a new object will be available at the key `details` in the injected

You can configure `@nuxtjs/ackee` with the `ackee` property in your `nuxt.config.js` or directly when registering the module in the `buildModules` array by using the array syntax.

<code-group>
<code-block label="ackee key" active>

::code-group
<!-- prettier-ignore -->
```javascript[nuxt.config.js]
```javascript [ackee key]
export default {
ackee: {
/* configuration */
}
}
```

</code-block>
<code-block label="buildModules array">

<!-- prettier-ignore -->
```javascript[nuxt.config.js]
```javascript [buildModules array]
export default {
buildModules: {
['@nuxtjs/ackee', {
Expand All @@ -182,9 +168,7 @@ export default {
}
}
```

</code-block>
</code-group>
::

### Properties

Expand Down Expand Up @@ -270,17 +254,13 @@ ackee: {
}
```

<alert type="warning">

::alert{type="warning"}
For this feature to work you need to set up an `Access-Control-Allow-Credentials` header on your Ackee installation, [more info](https://docs.ackee.electerious.com/#/docs/CORS%20headers#credentials).
::

</alert>

<alert type="warning">

::alert{type="warning"}
This feature should be turned off when using a wildcard `Access-Control-Allow-Origin` header, [more info](https://docs.ackee.electerious.com/#/docs/Options#cors-headers).

</alert>
::

#### storageKey

Expand Down Expand Up @@ -319,11 +299,9 @@ export default {

This module globally injects a `$ackee` object, meaning that you can access it anywhere using `this.$ackee`. For plugins, `asyncData`, `nuxtServerInit` and middlewares, you can access it from `context.$ackee`.

<alert type="warning">

::alert{type="warning"}
`details.*` methods and properties are only available when using `'opt-in'` or `'opt-out'` with the [detailed](#detailed) option.

</alert>
::

### Methods

Expand Down
15 changes: 0 additions & 15 deletions docs/content/settings.json

This file was deleted.

17 changes: 5 additions & 12 deletions docs/nuxt.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
import { withDocus } from 'docus'
export default defineNuxtConfig({
extends: ['@nuxt-themes/docus'],

export default withDocus({
docs: {
colors: {
primary: '#65deb1'
}
},
generate: {
fallback: true
},
buildModules: [
'vue-plausible'
modules: [
'nuxt-plausible'
],

plausible: {
domain: 'ackee.nuxtjs.org'
}
Expand Down
14 changes: 7 additions & 7 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate"
"dev": "nuxi dev",
"build": "nuxi build",
"start": "nuxi start",
"generate": "nuxi generate"
},
"dependencies": {
"docus": "^0.0.9",
"nuxt": "^2.15.3"
"@nuxt-themes/docus": "^1.1.3",
"nuxt": "^3.0.0"
},
"devDependencies": {
"vue-plausible": "^1.1.3"
"nuxt-plausible": "^0.1.2"
}
}
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
7 changes: 7 additions & 0 deletions docs/tokens.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineTheme, palette } from 'pinceau'

export default defineTheme({
color: {
primary: palette('#65deb1')
}
})
3 changes: 3 additions & 0 deletions docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./.nuxt/tsconfig.json"
}
Loading