Skip to content

Commit e4a1c10

Browse files
committed
📝 docs: upgrade deps, add basic opt-in analytics
1 parent 4a949c2 commit e4a1c10

File tree

6 files changed

+620
-330
lines changed

6 files changed

+620
-330
lines changed

docs/docusaurus.config.ts

Lines changed: 114 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -31,107 +31,117 @@ const config: Config = {
3131
},
3232
plugins: [
3333
[
34-
'docusaurus-plugin-typedoc',
35-
typedocOptions
34+
"posthog-docusaurus",
35+
{
36+
apiKey: "phc_9zr5WmTqQuRIxWcCf0IuwzsyeemirNExjQJa4c9ZjFn",
37+
appUrl: "https://posthog.synthetiko.com", // optional, defaults to "https://us.i.posthog.com"
38+
enableInDevelopment: true, // optional
39+
enable_heatmaps: true,
40+
loaded: () => {console.log("POSTHOG LOADED")},
41+
},
3642
],
37-
// '@docusaurus/plugin-debug',
38-
markdownReplacerPlugin,
39-
tailwindPlugin
43+
[
44+
'docusaurus-plugin-typedoc',
45+
typedocOptions
46+
],
47+
// '@docusaurus/plugin-debug',
48+
markdownReplacerPlugin,
49+
tailwindPlugin
4050
],
4151

42-
presets: [
43-
[
44-
'classic',
45-
{
46-
docs: {
47-
sidebarPath: './sidebars.ts',
48-
// Please change this to your repo.
49-
// Remove this to remove the "edit this page" links.
50-
remarkPlugins: [variable],
51-
admonitions: {
52-
keywords: ['note', 'tip', 'info', 'warning', 'danger', 'license'],
53-
extendDefaults: true,
54-
},
55-
editUrl:
56-
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
52+
presets: [
53+
[
54+
'classic',
55+
{
56+
docs: {
57+
sidebarPath: './sidebars.ts',
58+
// Please change this to your repo.
59+
// Remove this to remove the "edit this page" links.
60+
remarkPlugins: [variable],
61+
admonitions: {
62+
keywords: ['note', 'tip', 'info', 'warning', 'danger', 'license'],
63+
extendDefaults: true,
5764
},
58-
blog: {
59-
showReadingTime: true,
60-
// Please change this to your repo.
61-
// Remove this to remove the "edit this page" links.
62-
editUrl:
63-
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
64-
},
65-
theme: {
66-
customCss: './src/css/custom.css',
67-
},
68-
} satisfies Preset.Options,
69-
],
65+
editUrl:
66+
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
67+
},
68+
blog: {
69+
showReadingTime: true,
70+
// Please change this to your repo.
71+
// Remove this to remove the "edit this page" links.
72+
editUrl:
73+
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
74+
},
75+
theme: {
76+
customCss: './src/css/custom.css',
77+
},
78+
} satisfies Preset.Options,
7079
],
80+
],
7181

7282
themeConfig: {
73-
// Replace with your project's social card
74-
image: 'img/docusaurus-social-card.jpg',
83+
// Replace with your project's social card
84+
image: 'img/docusaurus-social-card.jpg',
7585
navbar: {
76-
title: 'open-wa/wa-automate',
86+
title: 'open-wa/wa-automate',
7787
logo: {
78-
alt: 'Open-wa',
88+
alt: 'Open-wa',
7989
src: 'img/logo.png',
8090
},
81-
items: [
91+
items: [
8292

83-
{
84-
type: 'dropdown',
85-
docId: 'intro',
86-
position: 'left',
87-
label: 'Get Started',
88-
items: [
89-
{
90-
label: 'CLI/EASY API',
91-
href: '/docs/get-started/quick-run',
92-
},
93-
{
94-
label: 'NodeJS',
95-
href: '/docs/get-started/installation',
96-
},
97-
{
98-
label: 'Docker',
99-
to: "/docs/get-started/docker/",
100-
}
101-
],
102-
},
103-
// {
104-
// type: 'docSidebar',
105-
// sidebarId: 'tutorialSidebar',
106-
// position: 'left',
107-
// label: 'Tutorial',
108-
// },
109-
{ to: '/blog', label: 'Blog', position: 'left' },
110-
{ to: '/docs/reference/api/Client/classes/Client', label: 'The Client API', position: 'left' },
111-
{
112-
type: 'dropdown',
113-
position: 'right',
114-
label: 'Community',
115-
items: [
116-
{ to: customFields.githubUrl, label: 'Github' },
117-
{ to: customFields.discordInviteUrl, label: 'Discord' },
118-
{ to: customFields.twitterUrl, label: 'Twitter' },
119-
],
120-
},
121-
{
122-
href: customFields.githubUrl,
123-
label: 'GitHub',
124-
position: 'right',
125-
},
126-
{
127-
type: 'html',
128-
position: 'right',
129-
value: '<a class="navbar-lic-button" href="https://gum.co/BTMt?tier=1%20Restricted%20License">Get License</a>',
130-
},
131-
],
93+
{
94+
type: 'dropdown',
95+
docId: 'intro',
96+
position: 'left',
97+
label: 'Get Started',
98+
items: [
99+
{
100+
label: 'CLI/EASY API',
101+
href: '/docs/get-started/quick-run',
102+
},
103+
{
104+
label: 'NodeJS',
105+
href: '/docs/get-started/installation',
106+
},
107+
{
108+
label: 'Docker',
109+
to: "/docs/get-started/docker/",
110+
}
111+
],
112+
},
113+
// {
114+
// type: 'docSidebar',
115+
// sidebarId: 'tutorialSidebar',
116+
// position: 'left',
117+
// label: 'Tutorial',
118+
// },
119+
{ to: '/blog', label: 'Blog', position: 'left' },
120+
{ to: '/docs/reference/api/Client/classes/Client', label: 'The Client API', position: 'left' },
121+
{
122+
type: 'dropdown',
123+
position: 'right',
124+
label: 'Community',
125+
items: [
126+
{ to: customFields.githubUrl, label: 'Github' },
127+
{ to: customFields.discordInviteUrl, label: 'Discord' },
128+
{ to: customFields.twitterUrl, label: 'Twitter' },
129+
],
130+
},
131+
{
132+
href: customFields.githubUrl,
133+
label: 'GitHub',
134+
position: 'right',
135+
},
136+
{
137+
type: 'custom-glnb',
138+
position: 'right',
139+
// value: '<a class="navbar-lic-button" href="https://gum.co/BTMt?tier=1%20Restricted%20License">Get License</a>'
140+
},
141+
],
132142
},
133-
footer: {
134-
style: 'dark',
143+
footer: {
144+
style: 'dark',
135145
links: [
136146
{
137147
title: 'Docs',
@@ -194,37 +204,37 @@ const config: Config = {
194204
],
195205
},
196206
],
197-
copyright: `Copyright © ${new Date().getFullYear()} open-wa. Docs by Docusaurus.`,
207+
copyright: `Copyright © ${new Date().getFullYear()} open-wa. Docs by Docusaurus.`,
198208
},
199209

200-
algolia: {
201-
// The application ID provided by Algolia
202-
appId: '345AS1OFCF',
210+
algolia: {
211+
// The application ID provided by Algolia
212+
appId: '345AS1OFCF',
203213

204214
// Public API key: it is safe to commit it
205215
apiKey: '04ffcb0cee53d965fb8605035ecdc04b',
206216

207-
indexName: 'openwa',
217+
indexName: 'openwa',
208218

209-
// Optional: see doc section below
210-
contextualSearch: false,
219+
// Optional: see doc section below
220+
contextualSearch: false,
211221

212-
// Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them.
213-
// externalUrlRegex: 'external\\.com|domain\\.com',
222+
// Optional: Specify domains where the navigation should occur through window.location instead on history.push. Useful when our Algolia config crawls multiple documentation sites and we want to navigate with window.location.href to them.
223+
// externalUrlRegex: 'external\\.com|domain\\.com',
214224

215-
// Optional: Algolia search parameters
216-
// searchParameters: {},
225+
// Optional: Algolia search parameters
226+
// searchParameters: {},
217227

218-
// Optional: path for search page that enabled by default (`false` to disable it)
219-
searchPagePath: 'search',
228+
// Optional: path for search page that enabled by default (`false` to disable it)
229+
searchPagePath: 'search',
220230

221231
//... other Algolia params
222232
},
223-
prism: {
224-
theme: prismThemes.github,
233+
prism: {
234+
theme: prismThemes.github,
225235
darkTheme: prismThemes.dracula,
226236
},
227-
} satisfies Preset.ThemeConfig,
237+
} satisfies Preset.ThemeConfig,
228238
};
229239

230240
export default config;

0 commit comments

Comments
 (0)