Skip to content

Commit 869bbcb

Browse files
committed
added cookie consent and policies
1 parent efadd4b commit 869bbcb

File tree

8 files changed

+179
-71
lines changed

8 files changed

+179
-71
lines changed

docs/.vitepress/config.mts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,16 @@ export default defineConfig({
4848
],
4949

5050
footer: {
51-
message: "Released under the MIT License.",
51+
message:
52+
'Released under the MIT License. | <a href="/privacy-policy">Privacy Policy</a> | <a href="/cookie-policy">Cookie Policy</a> | <a style="cursor: pointer" data-cc="show-preferencesModal">Cookie preferences</a>',
5253
copyright: "Copyright © 2020-present",
5354
},
5455

5556
search: { provider: "local" },
5657
},
5758

5859
head: [
59-
[
60-
"link",
61-
{
62-
rel: "stylesheet",
63-
href: "https://cdn.jsdelivr.net/gh/orestbida/[email protected]/dist/cookieconsent.css",
64-
},
65-
],
60+
["link", { rel: "stylesheet", href: "/cookieconsent.css" }],
6661
["script", { defer: "", src: "/init.js" }],
6762
[
6863
"script",
@@ -80,7 +75,7 @@ export default defineConfig({
8075
window.dataLayer = window.dataLayer || [];
8176
function gtag(){dataLayer.push(arguments);}
8277
gtag('js', new Date());
83-
gtag('config', 'G-67G9G0VBCC');
78+
gtag('config', 'G-67G9G0VBCC', { anonymize_ip: true });
8479
`,
8580
],
8681
],

docs/.vitepress/theme/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { observeCodeBlocks } from "./observe-code-blocks";
55

66
export default {
77
...DefaultTheme,
8+
89
enhanceApp({ router }) {
910
if (typeof window !== "undefined") {
1011
onMounted(() => {

docs/cookie-policy.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
sidebar: false
3+
editLink: false
4+
outline: false
5+
prev: false
6+
next: false
7+
---
8+
9+
# Cookie Policy
10+
11+
_Last updated: July 12, 2025_
12+
13+
This website uses cookies to enhance your browsing experience and to collect anonymous analytics data. This policy explains what cookies are, which ones we use, and how you can manage your preferences.
14+
15+
## 1. What are cookies?
16+
17+
Cookies are small text files stored on your device when you visit a website. They allow websites to remember your actions and preferences (such as language or session settings) over a period of time.
18+
19+
Cookies can be:
20+
21+
- **First-party cookies** – set by the website you are visiting
22+
- **Third-party cookies** – set by an external provider (like Google Analytics)
23+
24+
They can also be:
25+
26+
- **Session cookies** – deleted when you close your browser
27+
- **Persistent cookies** – stored for a defined period
28+
29+
## 2. How we use cookies
30+
31+
This site uses only the following types of cookies:
32+
33+
### Strictly necessary cookies
34+
35+
These cookies are required for basic functionality, such as remembering your cookie preferences. They do not track you or store any personally identifiable information.
36+
37+
| Name | Domain | Expiration | Description |
38+
| --------- | --------------------- | ---------- | ---------------------------------- |
39+
| cc_cookie | validator.axe-api.com | 6 months | Remembers your cookie preferences. |
40+
41+
### Performance and analytics cookies
42+
43+
These cookies help us understand how visitors use the site so we can improve it. All data collected is anonymized. These cookies are set **only if you accept analytics cookies** via the cookie banner.
44+
45+
| Name | Domain | Expiration | Description |
46+
| ------ | ---------- | ---------- | ---------------------------------------------------------------------------- |
47+
| ^\_ga | google.com | 2 years | Used to distinguish users by assigning a unique client ID. |
48+
| ^_ga_ | google.com | 2 years | Used by Google Analytics 4 to persist session state for a specific property. |
49+
| ^\_gid | google.com | 24 hours | Used to distinguish users and track user behavior for 24 hours. |
50+
| ^\_gat | google.com | 1 minute | Used to throttle request rate to Google Analytics servers. |
51+
52+
All Google Analytics cookies are configured to **anonymize IP addresses**.
53+
54+
For more information, see [Google’s cookie usage documentation](https://developers.google.com/analytics/devguides/collection/gtagjs/cookie-usage).
55+
56+
## 3. How to manage your preferences
57+
58+
You can change or withdraw your cookie consent at any time by clicking the **“Cookie preferences”** link in the footer of the site.
59+
60+
You can also delete or block cookies via your browser settings. For guidance on how to do this, visit [www.aboutcookies.org](https://www.aboutcookies.org/).
61+
62+
Please note that blocking certain cookies may affect the functionality of the site.
63+
64+
## 4. Changes to this policy
65+
66+
We may update this Cookie Policy from time to time. Changes will be posted on this page with an updated revision date.
67+
68+
---
69+
70+
If you have any questions about our use of cookies, feel free to contact us at [[email protected]](mailto:[email protected]).

docs/getting-started.md

Lines changed: 14 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
footer: true
3+
---
4+
15
# Getting started
26

37
## Installation
@@ -21,11 +25,7 @@ import { validate, setLocales, en } from "robust-validator";
2125

2226
setLocales(en);
2327

24-
const data = {
25-
email: "not-a-valid-email",
26-
name: "John",
27-
surname: "Doe",
28-
};
28+
const data = { email: "not-a-valid-email", name: "John", surname: "Doe" };
2929

3030
const definition = {
3131
email: "required|email",
@@ -50,11 +50,7 @@ import {
5050

5151
setLocales(en);
5252

53-
const data = {
54-
email: "not-a-valid-email",
55-
name: "John",
56-
surname: "Doe",
57-
};
53+
const data = { email: "not-a-valid-email", name: "John", surname: "Doe" };
5854

5955
const definition = {
6056
email: [required(), email()],
@@ -74,18 +70,9 @@ By the example, you would get the following response:
7470
{
7571
"isValid": false,
7672
"isInvalid": true,
77-
"fields": {
78-
"email": false,
79-
"name": true,
80-
"surname": true
81-
},
73+
"fields": { "email": false, "name": true, "surname": true },
8274
"errors": {
83-
"email": [
84-
{
85-
"rule": "required",
86-
"message": "The field is required."
87-
}
88-
]
75+
"email": [{ "rule": "required", "message": "The field is required." }]
8976
}
9077
}
9178
```
@@ -104,31 +91,10 @@ setLocales(en);
10491
const data = {
10592
secret: "some secret",
10693
users: [
107-
{
108-
addresses: [
109-
{
110-
city: "New York",
111-
},
112-
{
113-
city: "Istanbul",
114-
},
115-
],
116-
},
117-
{
118-
addresses: [
119-
{
120-
city: "New York",
121-
},
122-
{
123-
street: "Wall Street",
124-
},
125-
],
126-
},
94+
{ addresses: [{ city: "New York" }, { city: "Istanbul" }] },
95+
{ addresses: [{ city: "New York" }, { street: "Wall Street" }] },
12796
],
128-
permissons: {
129-
read: true,
130-
write: true,
131-
},
97+
permissons: { read: true, write: true },
13298
};
13399

134100
const definition = {
@@ -155,23 +121,12 @@ And this is the content of the `result` variable:
155121
"permissons.delete": false
156122
},
157123
"errors": {
158-
"secret": [
159-
{
160-
"rule": "min",
161-
"message": "The field must be at least 100."
162-
}
163-
],
124+
"secret": [{ "rule": "min", "message": "The field must be at least 100." }],
164125
"users.1.addresses.1.city": [
165-
{
166-
"rule": "required",
167-
"message": "The field is required."
168-
}
126+
{ "rule": "required", "message": "The field is required." }
169127
],
170128
"permissons.delete": [
171-
{
172-
"rule": "required",
173-
"message": "The field is required."
174-
}
129+
{ "rule": "required", "message": "The field is required." }
175130
]
176131
}
177132
}

docs/privacy-policy.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
sidebar: false
3+
editLink: false
4+
outline: false
5+
prev: false
6+
next: false
7+
---
8+
9+
# Privacy Policy
10+
11+
_Last updated: July 12, 2025_
12+
13+
We respect your privacy and are committed to protecting any data you share with us. This privacy policy explains what information we collect, how we use it, and your rights regarding that information.
14+
15+
## 1. Who we are
16+
17+
This website is a documentation site operated by Özgür Adem Işıklı. It does not include forms, logins, or other features that directly collect personal data from users.
18+
19+
If you have questions about this policy or your data, you can contact us at [[email protected]](mailto:[email protected]).
20+
21+
## 2. What data we collect
22+
23+
We do **not** collect personal data such as your name, email address, or IP address directly.
24+
25+
However, we use Google Analytics to collect anonymized usage statistics that help us understand how visitors interact with our website.
26+
27+
## 3. Use of cookies
28+
29+
This site uses:
30+
31+
- **Strictly necessary cookies** to ensure the website functions properly
32+
- **Analytics cookies**, which are optional and used only with your consent
33+
34+
Analytics cookies are not loaded unless you explicitly accept them through the cookie consent banner.
35+
36+
See our [Cookie Policy](/cookie-policy) for detailed information.
37+
38+
## 4. Data collected via Google Analytics
39+
40+
Google Analytics may collect the following types of information:
41+
42+
- Pages visited
43+
- Time spent on each page
44+
- Referring website or URL
45+
- Browser and device type
46+
- Approximate geolocation (city-level)
47+
48+
We have configured Google Analytics to **anonymize IP addresses**, so your full IP address is never stored or processed.
49+
50+
All collected data is aggregated and cannot be used to identify you personally.
51+
52+
## 5. Legal basis for processing
53+
54+
In accordance with Article 6(1)(a) of the GDPR, we process analytics data only after obtaining your **explicit consent**.
55+
56+
You can withdraw your consent at any time using the "Cookie Settings" link in the website footer.
57+
58+
## 6. Data sharing
59+
60+
We do **not** sell, rent, or share your personal data.
61+
62+
We share anonymized usage data with Google LLC through Google Analytics. You can read more about how Google uses this data in their [Privacy Policy](https://policies.google.com/privacy).
63+
64+
## 7. Your rights under GDPR
65+
66+
You have the right to:
67+
68+
- Access the data we hold about you (if any)
69+
- Request correction or deletion of your data
70+
- Withdraw your consent at any time
71+
- Lodge a complaint with your local data protection authority
72+
73+
Since this website does not store personal information or use user accounts, most of these rights are not applicable in practice. However, we are happy to respond to any questions or requests you may have.
74+
75+
## 8. Changes to this policy
76+
77+
We may update this Privacy Policy from time to time. Any changes will be posted on this page with an updated revision date.
78+
79+
---
80+
81+
If you have any questions about this policy, feel free to contact us at [[email protected]](mailto:[email protected]).

docs/public/cookieconsent.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/public/cookieconsent.umd.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/public/init.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ function loadScript(src) {
1111
}
1212

1313
// Usage
14-
loadScript(
15-
"https://cdn.jsdelivr.net/gh/orestbida/[email protected]/dist/cookieconsent.umd.js",
16-
).then(() => {
14+
loadScript("/cookieconsent.umd.js").then(() => {
1715
CookieConsent.run({
1816
categories: {
1917
necessary: { enabled: true, readOnly: true },

0 commit comments

Comments
 (0)