Skip to content

Commit 503844b

Browse files
committed
Feat: implement search
1 parent 1c128d9 commit 503844b

17 files changed

+335
-8952
lines changed

.dockerignore

-2
This file was deleted.

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ yarn-error.log*
2929

3030
.yarn
3131
package-lock.json
32+
yarn.lock
3233
.eslintcache
3334

3435
# Coverage and Test

README.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,35 @@
11
# Website
22

3-
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
3+
This website is built using [Docusaurus 3](https://docusaurus.io/), a modern static website generator.
44

55
### Installation
66

77
```
8-
$ yarn
8+
$ npm install
99
```
1010

1111
### Local Development
1212

1313
```
14-
$ yarn start
14+
$ npm run start
1515
```
1616

1717
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
1818

1919
### Build
2020

2121
```
22-
$ yarn build
22+
$ npm run build
2323
```
2424

2525
This command generates static content into the `build` directory and can be served using any static contents hosting service.
2626

2727
### Deployment
2828

2929
```
30+
$ npm run serve
31+
```
32+
3033
$ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
3134
```
3235

babel.config.js

-3
This file was deleted.

docusaurus.config.js

-128
This file was deleted.

docusaurus.config.ts

+151
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
import { themes as prismThemes } from "prism-react-renderer";
2+
import type { Config } from "@docusaurus/types";
3+
import type * as Preset from "@docusaurus/preset-classic";
4+
import localSearch from "@easyops-cn/docusaurus-search-local";
5+
6+
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
7+
8+
const config: Config = {
9+
title: "DreamFactory Docs",
10+
tagline: "Instant API Generation",
11+
favicon: "img/favicon.ico",
12+
13+
// Set the production url of your site here
14+
url: "https://dreamfactory-docs.netlify.app",
15+
// Set the /<baseUrl>/ pathname under which your site is served
16+
// For GitHub pages deployment, it is often '/<projectName>/'
17+
baseUrl: "/",
18+
19+
// GitHub pages deployment config.
20+
// If you aren't using GitHub pages, you don't need these.
21+
organizationName: "dreamfactorysoftware", // Usually your GitHub org/user name.
22+
projectName: "df-docs", // Usually your repo name.
23+
24+
onBrokenLinks: "warn",
25+
onBrokenMarkdownLinks: "warn",
26+
27+
// Even if you don't use internationalization, you can use this field to set
28+
// useful metadata like html lang. For example, if your site is Chinese, you
29+
// may want to replace "en" with "zh-Hans".
30+
i18n: {
31+
defaultLocale: "en",
32+
locales: ["en"],
33+
},
34+
35+
presets: [
36+
[
37+
"classic",
38+
{
39+
docs: {
40+
routeBasePath: "/",
41+
sidebarPath: "./sidebars.ts",
42+
// Please change this to your repo.
43+
// Remove this to remove the "edit this page" links.
44+
editUrl:
45+
"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
46+
},
47+
theme: {
48+
customCss: "./src/css/custom.css",
49+
},
50+
} satisfies Preset.Options,
51+
],
52+
],
53+
54+
themeConfig: {
55+
// Replace with your project's social card
56+
image: "img/docusaurus-social-card.jpg",
57+
navbar: {
58+
title: "DreamFactory",
59+
logo: {
60+
alt: "DreamFactory Logo",
61+
src: "img/logo.png",
62+
},
63+
items: [
64+
{
65+
type: "docSidebar",
66+
sidebarId: "tutorialSidebar",
67+
position: "left",
68+
label: "Documentation",
69+
},
70+
{
71+
href: "https://github.com/facebook/docusaurus",
72+
label: "GitHub",
73+
position: "right",
74+
},
75+
],
76+
},
77+
footer: {
78+
style: "dark",
79+
links: [
80+
{
81+
title: "Documentation",
82+
items: [
83+
{
84+
label: "Documentation",
85+
to: "/docs/intro",
86+
},
87+
],
88+
},
89+
{
90+
title: "Community",
91+
items: [
92+
{
93+
label: "Github",
94+
href: "https://github.com/dreamfactorysoftware/dreamfactory",
95+
},
96+
{
97+
label: "Twitter",
98+
href: "https://twitter.com/dreamfactory",
99+
},
100+
{
101+
label: "Facebook",
102+
href: "https://www.facebook.com/dreamfactorysoftware",
103+
},
104+
{
105+
label: "LinkedIn",
106+
href: "https://www.linkedin.com/company/dreamfactory-software-inc",
107+
},
108+
{
109+
label: "YouTube",
110+
href: "https://www.youtube.com/@DreamfactorySoftware",
111+
},
112+
],
113+
},
114+
{
115+
title: "More",
116+
items: [
117+
{
118+
label: "Legacy Blog",
119+
to: "https://blog.dreamfactory.com",
120+
},
121+
{
122+
label: "Legacy Wiki",
123+
to: "https://wiki.dreamfactory.com",
124+
},
125+
{
126+
label: "Legacy Docs",
127+
to: "https://guide.dreamfactory.com/docs",
128+
},
129+
],
130+
},
131+
],
132+
copyright: `Copyright © ${new Date().getFullYear()} DreamFactory Software, Inc. Built with Docusaurus.`,
133+
},
134+
prism: {
135+
theme: prismThemes.github,
136+
darkTheme: prismThemes.dracula,
137+
},
138+
} satisfies Preset.ThemeConfig,
139+
plugins: [
140+
[
141+
localSearch,
142+
/** @type {import("@easyops-cn/docusaurus-search-local").PluginOptions} */
143+
{
144+
hashed: true,
145+
indexPages: true,
146+
},
147+
],
148+
],
149+
};
150+
151+
export default config;

package.json

+18-7
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,38 @@
1111
"clear": "docusaurus clear",
1212
"serve": "docusaurus serve",
1313
"write-translations": "docusaurus write-translations",
14-
"write-heading-ids": "docusaurus write-heading-ids"
14+
"write-heading-ids": "docusaurus write-heading-ids",
15+
"typecheck": "tsc"
1516
},
1617
"dependencies": {
17-
"@docusaurus/core": "3.5.2",
18-
"@docusaurus/preset-classic": "3.5.2",
18+
"@docusaurus/core": "3.6.0",
19+
"@docusaurus/preset-classic": "3.6.0",
20+
"@easyops-cn/docusaurus-search-local": "^0.45.0",
1921
"@mdx-js/react": "^3.0.0",
2022
"clsx": "^2.0.0",
2123
"prism-react-renderer": "^2.3.0",
2224
"react": "^18.0.0",
2325
"react-dom": "^18.0.0"
2426
},
27+
"devDependencies": {
28+
"@docusaurus/module-type-aliases": "3.6.0",
29+
"@docusaurus/tsconfig": "3.6.0",
30+
"@docusaurus/types": "3.6.0",
31+
"typescript": "~5.6.2"
32+
},
2533
"browserslist": {
2634
"production": [
2735
">0.5%",
2836
"not dead",
2937
"not op_mini all"
3038
],
3139
"development": [
32-
"last 1 chrome version",
33-
"last 1 firefox version",
34-
"last 1 safari version"
40+
"last 3 chrome version",
41+
"last 3 firefox version",
42+
"last 5 safari version"
3543
]
44+
},
45+
"engines": {
46+
"node": ">=18.0"
3647
}
37-
}
48+
}

0 commit comments

Comments
 (0)