Skip to content

Commit a6590a9

Browse files
committed
add search
1 parent 1656d3e commit a6590a9

15 files changed

+5342
-1761
lines changed

blog/2019-05-28-first-blog-post.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

blog/2019-05-29-long-blog-post.md

Lines changed: 0 additions & 44 deletions
This file was deleted.

blog/2021-08-01-mdx-blog-post.mdx

Lines changed: 0 additions & 20 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

docs/intro.md renamed to docs/intro.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ After first loading the page, Tango can work offline. You can disconnect from th
1717

1818
## Quick Start
1919

20-
1. [Enable Developer options and USB debugging](./prepare.md) on the device you want to control.
20+
1. [Enable Developer options and USB debugging](./prepare.mdx) on the device you want to control.
2121
2. Connect the device to your computer using a USB cable. For running Tango on Android, use a C-to-C or OTG cable, Tango can't control the device from itself.
2222
3. Open [Tango](https://tangoapp.dev) in a supported browser on your computer.
2323
4. Follow on-screen instructions to pair the device. If the device is not detected, make sure you have enabled USB debugging and connected the device to your computer.
2424
5. The first time you connect to a device, you will be asked to authorize the connection on the device. Follow the instructions on the device.
2525

26-
Having issues while connecting? See [Troubleshooting](./troubleshooting.md).
26+
Having issues while connecting? See [Troubleshooting](./troubleshooting.mdx).
2727

2828
## Features
2929

30-
* [**Device Overview**](./overview.md): Display basic information of the device like IP address, battery level, storage and memory usages.
31-
* [**File Browser**](./file-browser.md): Browse, download and upload files on device.
32-
* [**App Manager**](./app-manager.md): List, install and uninstall apps on device.
33-
* [**Screen Mirror**](./screen-mirror.md): Mirror device screen and control the device using mouse and keyboard.
30+
* [**Device Overview**](./overview.mdx): Display basic information of the device like IP address, battery level, storage and memory usages.
31+
* [**File Browser**](./file-browser.mdx): Browse, download and upload files on device.
32+
* [**App Manager**](./app-manager.mdx): List, install and uninstall apps on device.
33+
* [**Screen Mirror**](./screen-mirror.mdx): Mirror device screen and control the device using mouse and keyboard.
3434
* Logcat and bugreport tools for debugging the device or apps on it.
3535
* More features are coming soon.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docusaurus.config.js

Lines changed: 189 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,170 @@
11
// @ts-check
22
// Note: type annotations allow type checking and IDEs autocompletion
33

4-
const lightCodeTheme = require('prism-react-renderer/themes/github');
5-
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
4+
import { themes } from "prism-react-renderer";
5+
6+
const lightTheme = {
7+
...themes.github,
8+
styles: [
9+
...themes.github.styles,
10+
{
11+
types: ["title"],
12+
style: {
13+
color: "#0550AE",
14+
fontWeight: "bold",
15+
},
16+
},
17+
{
18+
types: ["parameter"],
19+
style: {
20+
color: "#953800",
21+
},
22+
},
23+
{
24+
types: ["boolean", "rule", "color", "number", "constant", "property"],
25+
style: {
26+
color: "#005CC5",
27+
},
28+
},
29+
{
30+
types: ["atrule", "tag"],
31+
style: {
32+
color: "#22863A",
33+
},
34+
},
35+
{
36+
types: ["script"],
37+
style: {
38+
color: "#24292E",
39+
},
40+
},
41+
{
42+
types: ["operator", "unit", "rule"],
43+
style: {
44+
color: "#D73A49",
45+
},
46+
},
47+
{
48+
types: ["font-matter", "string", "attr-value"],
49+
style: {
50+
color: "#C6105F",
51+
},
52+
},
53+
{
54+
types: ["class-name"],
55+
style: {
56+
color: "#116329",
57+
},
58+
},
59+
{
60+
types: ["attr-name"],
61+
style: {
62+
color: "#0550AE",
63+
},
64+
},
65+
{
66+
types: ["keyword"],
67+
style: {
68+
color: "#CF222E",
69+
},
70+
},
71+
{
72+
types: ["function"],
73+
style: {
74+
color: "#8250DF",
75+
},
76+
},
77+
{
78+
types: ["selector"],
79+
style: {
80+
color: "#6F42C1",
81+
},
82+
},
83+
{
84+
types: ["variable"],
85+
style: {
86+
color: "#E36209",
87+
},
88+
},
89+
{
90+
types: ["comment"],
91+
style: {
92+
color: "#6B6B6B",
93+
},
94+
},
95+
],
96+
};
97+
98+
const darkTheme = {
99+
plain: {
100+
color: "#D4D4D4",
101+
backgroundColor: "#212121",
102+
},
103+
styles: [
104+
...themes.vsDark.styles,
105+
{
106+
types: ["title"],
107+
style: {
108+
color: "#569CD6",
109+
fontWeight: "bold",
110+
},
111+
},
112+
{
113+
types: ["property", "parameter"],
114+
style: {
115+
color: "#9CDCFE",
116+
},
117+
},
118+
{
119+
types: ["script"],
120+
style: {
121+
color: "#D4D4D4",
122+
},
123+
},
124+
{
125+
types: ["boolean", "arrow", "atrule", "tag"],
126+
style: {
127+
color: "#569CD6",
128+
},
129+
},
130+
{
131+
types: ["number", "color", "unit"],
132+
style: {
133+
color: "#B5CEA8",
134+
},
135+
},
136+
{
137+
types: ["font-matter"],
138+
style: {
139+
color: "#CE9178",
140+
},
141+
},
142+
{
143+
types: ["keyword", "rule"],
144+
style: {
145+
color: "#C586C0",
146+
},
147+
},
148+
{
149+
types: ["regex"],
150+
style: {
151+
color: "#D16969",
152+
},
153+
},
154+
{
155+
types: ["maybe-class-name"],
156+
style: {
157+
color: "#4EC9B0",
158+
},
159+
},
160+
{
161+
types: ["constant"],
162+
style: {
163+
color: "#4FC1FF",
164+
},
165+
},
166+
],
167+
};
6168

7169
/** @type {import('@docusaurus/types').Config} */
8170
const config = {
@@ -32,6 +194,28 @@ const config = {
32194
locales: ['en'],
33195
},
34196

197+
markdown: {
198+
mdx1Compat: {
199+
admonitions: false,
200+
comments: false,
201+
headingIds: false,
202+
},
203+
mermaid: true,
204+
},
205+
206+
themes: [
207+
"@docusaurus/theme-mermaid",
208+
[
209+
require.resolve("@easyops-cn/docusaurus-search-local"),
210+
/** @type {Record<string, unknown>} */ (
211+
/** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */ ({
212+
docsRouteBasePath: "/",
213+
highlightSearchTermsOnTargetPage: true,
214+
})
215+
),
216+
],
217+
],
218+
35219
presets: [
36220
[
37221
'classic',
@@ -81,7 +265,7 @@ const config = {
81265
// { to: '/blog', label: 'Blog', position: 'left' },
82266
{
83267
href: 'https://github.com/tango-adb/help-center',
84-
label: 'GitHub',
268+
label: 'Source code',
85269
position: 'right',
86270
},
87271
],
@@ -123,8 +307,8 @@ const config = {
123307
copyright: `Copyright © 2021-${new Date().getFullYear()} Tango ADB. Built with Docusaurus.`,
124308
},
125309
prism: {
126-
theme: lightCodeTheme,
127-
darkTheme: darkCodeTheme,
310+
theme: lightTheme,
311+
darkTheme: darkTheme,
128312
},
129313
}),
130314
};

package.json

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,23 @@
1515
"typecheck": "tsc"
1616
},
1717
"dependencies": {
18-
"@docusaurus/core": "2.4.3",
19-
"@docusaurus/preset-classic": "2.4.3",
20-
"@mdx-js/react": "^1.6.22",
21-
"clsx": "^1.2.1",
22-
"prism-react-renderer": "^1.3.5",
23-
"react": "^17.0.2",
24-
"react-dom": "^17.0.2"
18+
"@docusaurus/core": "3.1.1",
19+
"@docusaurus/preset-classic": "3.1.1",
20+
"@docusaurus/theme-classic": "^3.1.1",
21+
"@docusaurus/theme-mermaid": "^3.1.1",
22+
"@docusaurus/types": "^3.1.1",
23+
"@easyops-cn/docusaurus-search-local": "^0.40.1",
24+
"@mdx-js/react": "^3.0.1",
25+
"@types/node": "^20.11.20",
26+
"clsx": "^2.1.0",
27+
"prism-react-renderer": "^2.3.1",
28+
"react": "^18.2.0",
29+
"react-dom": "^18.2.0"
2530
},
2631
"devDependencies": {
27-
"@docusaurus/module-type-aliases": "2.4.3",
28-
"@tsconfig/docusaurus": "^1.0.5",
29-
"typescript": "^4.7.4"
32+
"@docusaurus/module-type-aliases": "3.1.1",
33+
"@tsconfig/docusaurus": "^2.0.2",
34+
"typescript": "^5.3.3"
3035
},
3136
"browserslist": {
3237
"production": [

0 commit comments

Comments
 (0)