Skip to content

Commit 82c48f1

Browse files
authored
Updated UI and AI in search (#293)
* Merge branch 'heroku-migration-video-blog' of https://github.com/DefangLabs/defang-docs into heroku-migration-video-blog * style: adjust heading sizes and fix breadcrumb icon display in docs theme * spruce up the docs * feat: integrate Algolia search and improve code block styling in docs * feat: update Algolia search config and button hover states * search and ai in docs * upgrade node * rm shadcn content * rm unnecessary tests * update node in test build * rm playwright * rm test result dir * rm all refs to testing and cleanup extra line * fix: update search tracking to use input event and add underline style to doc links
1 parent 5d81aa6 commit 82c48f1

File tree

17 files changed

+13737
-9816
lines changed

17 files changed

+13737
-9816
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- uses: actions/checkout@v3
3636
- uses: actions/setup-node@v3
3737
with:
38-
node-version: 18
38+
node-version: 20
3939
cache: npm
4040

4141
- name: Install dependencies

.github/workflows/test-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@v3
1616
- uses: actions/setup-node@v3
1717
with:
18-
node-version: 18
18+
node-version: 20
1919
cache: npm
2020

2121
- name: Install dependencies

components.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": false,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.js",
8+
"css": "src/css/custom.css",
9+
"baseColor": "zinc",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/components",
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"hooks": "@/hooks"
18+
},
19+
"iconLibrary": "lucide"
20+
}

docs/intro/intro.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ import DocCardList from "@docusaurus/theme-classic/lib/theme/DocCardList";
99
#  
1010

1111
<div style={{textAlign: "center"}}>
12-
<img src="/img/defang-logo.svg" alt="Defang Logo" style={{width: "200px", marginBottom: "2rem"}} />
12+
<img src="/img/defang-logo.svg" alt="Defang Logo" className="w-48 mb-4 mx-auto" />
1313
<h1>Defang Documentation</h1>
1414
<p>
1515
Defang lets you take your app from Docker Compose to a secure and scalable deployment on your favorite cloud in minutes. Build cloud applications in any language and stack, deploy to your account on your favorite cloud with a single command, and iterate quickly with AI-assisted tooling.
1616
</p>
17+
<div className="h-8"/>
1718
<h2>Getting Started</h2>
1819
<DocCardList
1920
items={[

docusaurus.config.js

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// @ts-check
22
// Note: type annotations allow type checking and IDEs autocompletion
33
const { themes } = require('prism-react-renderer');
4+
const path = require('path');
45
const lightCodeTheme = themes.github;
56
const darkCodeTheme = themes.dracula;
67

@@ -105,7 +106,6 @@ const config = {
105106
},
106107
],
107108
],
108-
109109
themeConfig: {
110110
image: '/img/defang-social-card-2.png',
111111
navbar: {
@@ -204,9 +204,40 @@ const config = {
204204
theme: lightCodeTheme,
205205
darkTheme: darkCodeTheme,
206206
},
207+
algolia: {
208+
// The application ID provided by Algolia
209+
appId: 'O3VFCOSSZ6',
210+
211+
// Public API key: it is safe to commit it
212+
apiKey: '43fd4ebb5bb9875aa8764793ff9a09ff',
213+
214+
indexName: 'prod_DOCS',
215+
216+
// Optional: see doc section below
217+
contextualSearch: false,
218+
219+
// Optional: whether the insights feature is enabled or not on Docsearch (`false` by default)
220+
insights: true,
221+
222+
// Optional: whether you want to use the new Ask AI feature (undefined by default)
223+
askAi: 'MUO629LjH0L5',
224+
},
207225
},
208226
plugins: [
209-
require.resolve('docusaurus-lunr-search'),
227+
async function shadcnTailwindPlugin() {
228+
return {
229+
name: 'defang-tailwind-shadcn',
230+
configureWebpack() {
231+
return {
232+
resolve: {
233+
alias: {
234+
'@': path.resolve(__dirname, 'src'),
235+
},
236+
},
237+
};
238+
},
239+
};
240+
},
210241
[
211242
'@docusaurus/plugin-client-redirects',
212243
{

0 commit comments

Comments
 (0)