Skip to content
This repository was archived by the owner on Aug 15, 2023. It is now read-only.

Commit 24f2f9d

Browse files
committed
fix: docs for all
1 parent b36ecc4 commit 24f2f9d

File tree

72 files changed

+1500
-207
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1500
-207
lines changed

docs/docs/intro.md

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,9 @@
22
sidebar_position: 1
33
---
44

5-
# Tutorial Intro
5+
# TrEx
66

7-
Let's discover **Docusaurus in less than 5 minutes**.
7+
## Platforms
88

9-
## Getting Started
10-
11-
Get started by **creating a new site**.
12-
13-
Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**.
14-
15-
### What you'll need
16-
17-
- [Node.js](https://nodejs.org/en/download/) version 14 or above:
18-
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
19-
20-
## Generate a new site
21-
22-
Generate a new Docusaurus site using the **classic template**.
23-
24-
The classic template will automatically be added to your project after you run the command:
25-
26-
```bash
27-
npm init docusaurus@latest my-website classic
28-
```
29-
30-
You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.
31-
32-
The command also installs all necessary dependencies you need to run Docusaurus.
33-
34-
## Start your site
35-
36-
Run the development server:
37-
38-
```bash
39-
cd my-website
40-
npm run start
41-
```
42-
43-
The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.
44-
45-
The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
46-
47-
Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.
9+
- [@tktrex](/tktrex/docs)
10+
- [@yttrex](/yttrex/docs)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import CodeBlock from '@theme/CodeBlock';
2+
3+
## Build
4+
5+
To produce a `production` extension run the following command in your terminal:
6+
7+
<CodeBlock className="language-bash">
8+
yarn {props.platformPrefix}:ext build
9+
</CodeBlock>
10+
11+
Or, if you need a version with `NODE_ENV=development` run:
12+
13+
<CodeBlock className="language-bash">
14+
NODE_ENV=development yarn {props.platformPrefix}:ext build
15+
</CodeBlock>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import CodeBlock from '@theme/CodeBlock';
2+
3+
4+
## Development
5+
6+
### Prerequisites
7+
8+
<ul>
9+
<li>
10+
<a href="backend">
11+
@{props.platformPrefix}trex/backend
12+
</a>{" "}up and running
13+
</li>
14+
</ul>
15+
16+
### Run "watch" mode
17+
18+
To start developing the extension you need to compile the source code with `webpack` by running the following command:
19+
20+
<CodeBlock className="language-bash">
21+
yarn {props.platformPrefix}:ext watch
22+
</CodeBlock>
23+
24+
<p>then, you can open your browser's development panel and load the extension from the output folder <i>{props.platformPrefix}</i>.</p>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import ExtensionDevelopmentPartial from './_development.mdx';
2+
import ExtensionBuildPartial from './_build.mdx'
3+
4+
<p>
5+
This browser extension allows you to contribute to our researches and tracking
6+
algorithm analyses on <b>{props.platformName}</b>.
7+
</p>
8+
9+
<ExtensionDevelopmentPartial platformName={props.platformName} platformPrefix={props.platformPrefix} />
10+
11+
<ExtensionBuildPartial platformName={props.platformName} platformPrefix={props.platformPrefix} />

docs/docusaurus.config.js

Lines changed: 97 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@
33

44
// const lightCodeTheme = require('prism-react-renderer/themes/github');
55
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
6-
const path = require('path/posix');
7-
const { default: theme } = require('./theme');
6+
const lightCodeTheme = require('prism-react-renderer/themes/github');
7+
const packageJson = require('../package.json');
8+
const path = require('path');
9+
// const { default: theme } = require('./theme');
10+
11+
const GITHUB_REPO = 'https://github.com/tracking-exposed/yttrex';
812

913
/** @type {import('@docusaurus/types').Config} */
1014
const config = {
1115
title: '@trex',
12-
tagline: 'Dinosaurs are cool',
16+
tagline:
17+
'We develop tools to uncover how tracking and profiling have an impact on society',
1318
url: 'https://docs.tracking.exposed',
1419
baseUrl: '/',
1520
onBrokenLinks: 'throw',
@@ -19,24 +24,49 @@ const config = {
1924
projectName: 'trex', // Usually your repo name.
2025

2126
plugins: [
22-
// @tktrex open api
27+
// @tktrex
28+
// api
2329
[
2430
'docusaurus-plugin-openapi',
2531
{
2632
id: 'tktrex',
27-
path: '../platforms/tktrex/shared/build/openapi-tktrex.json',
33+
path: '../platforms/tktrex/shared/build/open-api.json',
2834
routeBasePath: 'tktrex/api',
2935
},
3036
],
31-
// @tktrex open api
32-
// [
33-
// 'docusaurus-plugin-openapi',
34-
// {
35-
// id: 'ycai-api',
36-
// path: '../sercices/ycai/studio/docs/openapi-validated.json',
37-
// routeBasePath: 'ycai/api',
38-
// },
39-
// ],
37+
// docs
38+
[
39+
'@docusaurus/plugin-content-docs',
40+
{
41+
id: 'tk-docs',
42+
path: path.resolve(__dirname, '../platforms/tktrex/docs/docs'),
43+
routeBasePath: 'tktrex/docs',
44+
sidebarPath: require.resolve('./sidebars.js'),
45+
},
46+
],
47+
// @yttrex
48+
// API
49+
[
50+
'docusaurus-plugin-openapi',
51+
{
52+
id: 'yttrex-api',
53+
path: '../platforms/yttrex/backend/build/open-api.json',
54+
routeBasePath: 'yttrex/api',
55+
},
56+
],
57+
// docs
58+
[
59+
'@docusaurus/plugin-content-docs',
60+
{
61+
id: 'yttrex-docs',
62+
path: path.resolve(__dirname, '../platforms/yttrex/docs/docs'),
63+
routeBasePath: 'yttrex/docs',
64+
sidebarPath: require.resolve('./sidebars.js'),
65+
},
66+
],
67+
68+
// tools
69+
// guardoni
4070
[
4171
'@docusaurus/plugin-content-docs',
4272
{
@@ -46,15 +76,6 @@ const config = {
4676
sidebarPath: require.resolve('./sidebars.js'),
4777
},
4878
],
49-
// [
50-
// '@docusaurus/plugin-content-docs',
51-
// {
52-
// id: 'ycai-docs',
53-
// path: path.resolve(__dirname, '../YCAI/docs'),
54-
// routeBasePath: 'ycai/docs',
55-
// sidebarPath: require.resolve('../YCAI/sidebars.js'),
56-
// },
57-
// ],
5879
],
5980
presets: [
6081
[
@@ -79,39 +100,40 @@ const config = {
79100
/** @type {import('docusaurus-theme-openapi').ThemeConfig} */
80101
({
81102
navbar: {
82-
title: '@trex',
103+
title: `@tktrex v${packageJson.version}`,
83104
logo: {
84105
alt: '@trex Logo',
85106
src: 'img/yttrex128.png',
86107
},
87108
items: [
88109
{
89-
type: 'dropdown',
90-
label: 'Services',
91-
items: [
92-
{
93-
type: 'doc',
94-
docId: 'intro',
95-
docsPluginId: 'guardoni-docs',
96-
label: 'Guardoni',
97-
},
98-
{
99-
type: 'doc',
100-
docId: 'intro',
101-
docsPluginId: 'ycai-docs',
102-
label: 'YCAI',
103-
},
104-
],
110+
type: 'doc',
111+
label: 'Guardoni',
112+
docId: 'guardoni-intro',
113+
docsPluginId: 'guardoni-docs'
114+
},
115+
{
116+
type: 'doc',
117+
docId: 'intro',
118+
docsPluginId: 'tk-docs',
119+
label: 'TikTok Scraper',
120+
},
121+
{
122+
type: 'doc',
123+
docId: 'yttrex-intro',
124+
docsPluginId: 'yttrex-docs',
125+
label: 'Youtube Scraper',
105126
},
106127
{
107128
type: 'dropdown',
108129
label: 'API',
109130
items: [
110131
{ to: '/tktrex/api', label: '@tktrex' },
132+
{ to: '/yttrex/api', label: '@yttrex' },
111133
{ to: '/ycai/api', label: '@ycai' },
112134
],
113135
},
114-
{ to: '/blog', label: 'Blog', position: 'left' },
136+
// { to: '/blog', label: 'Blog', position: 'left' },
115137
{
116138
href: 'https://github.com/facebook/docusaurus',
117139
label: 'GitHub',
@@ -125,7 +147,7 @@ const config = {
125147
title: 'Docs',
126148
items: [
127149
{
128-
label: 'Tutorial',
150+
label: 'Getting started',
129151
to: '/docs/intro',
130152
},
131153
],
@@ -134,37 +156,58 @@ const config = {
134156
title: 'Community',
135157
items: [
136158
{
137-
label: 'Stack Overflow',
138-
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
139-
},
140-
{
141-
label: 'Discord',
142-
href: 'https://discordapp.com/invite/docusaurus',
159+
label: 'Slack',
160+
href: 'https://trackingexposed.slack.com/invite/trex-tk',
143161
},
144162
{
145163
label: 'Twitter',
146-
href: 'https://twitter.com/docusaurus',
164+
href: 'https://twitter.com/trackingexposed',
147165
},
148166
],
149167
},
150168
{
151169
title: 'More',
152170
items: [
153171
{
154-
label: 'Blog',
155-
to: '/blog',
172+
label: 'Youchoose',
173+
to: 'https://youchoose.ai',
174+
},
175+
{
176+
label: '@trex/facebook',
177+
to: 'https://facebook.tracking.exposed',
178+
},
179+
{
180+
label: '@trex/youtube',
181+
to: 'https://youtube.tracking.exposed',
156182
},
157183
{
158-
label: 'GitHub',
159-
href: 'https://github.com/facebook/docusaurus',
184+
label: '@trex/pornhub',
185+
to: 'https://pornhub.tracking.exposed',
186+
},
187+
{
188+
label: '@trex/amazon',
189+
to: 'https://amazon.tracking.exposed',
190+
},
191+
// no blog at the moment
192+
// {
193+
// label: 'Blog',
194+
// to: '/blog',
195+
// },
196+
],
197+
},
198+
{
199+
title: 'Dev',
200+
items: [
201+
{
202+
html: `<a class="header-github-link" href="${GITHUB_REPO}" target="_blank" rel="noreferrer"></a>`,
160203
},
161204
],
162205
},
163206
],
164207
copyright: `Copyright © ${new Date().getFullYear()} Tracking Exposed Team. Built with Docusaurus.`,
165208
},
166209
prism: {
167-
theme: theme,
210+
theme: lightCodeTheme,
168211
darkTheme: darkCodeTheme,
169212
},
170213
}),

docs/sidebars.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,12 @@
1616
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
1717
const sidebars = {
1818
// By default, Docusaurus generates a sidebar from the docs folder structure
19-
tutorialSidebar: [
20-
{ type: 'autogenerated', dirName: '.' },
21-
// {
22-
// type: 'link',
23-
// label: '@ycai',
24-
// href: '/ycai/intro',
25-
// },
26-
],
19+
tutorialSidebar: [{ type: 'autogenerated', dirName: '.' }],
20+
// {
21+
// type: 'link',
22+
// label: '@ycai',
23+
// href: '/ycai/intro',
24+
// },
2725

2826
// But you can create a sidebar manually
2927
/*

0 commit comments

Comments
 (0)