Skip to content

Commit

Permalink
docs(docs-app, engine-website-app): ✏️ fixed doc url path
Browse files Browse the repository at this point in the history
affects: docs-app, engine-website-app
  • Loading branch information
hlerenow committed Aug 16, 2024
1 parent 7a1abc2 commit 181aa3f
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 8 deletions.
3 changes: 2 additions & 1 deletion packages/docs-app/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import starlight from '@astrojs/starlight';

import react from '@astrojs/react';
const isProd = process.env.NODE_ENV === 'production';
console.log('🚀 ~ isProd:', isProd);

// https://astro.build/config
export default defineConfig({
Expand All @@ -11,7 +12,7 @@ export default defineConfig({
starlight({
title: 'Chameleon Docs',
social: {
github: 'https://github.dev/hlerenow/chameleon',
github: 'https://github.com/hlerenow/chameleon',
},
sidebar: [
{
Expand Down
5 changes: 5 additions & 0 deletions packages/docs-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@
"astro": "astro"
},
"dependencies": {
"@ant-design/icons": "^5.4.0",
"@astrojs/check": "^0.9.2",
"@astrojs/react": "^3.6.2",
"@astrojs/starlight": "^0.25.5",
"@chamn/demo-page": "workspace:^",
"@chamn/engine": "workspace:^",
"@chamn/model": "workspace:^",
"@chamn/render": "workspace:^",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"antd": "^5.20.1",
"astro": "^4.10.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
6 changes: 6 additions & 0 deletions packages/docs-app/src/components/Link.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';

export const Link = (props: { children: any; url: string }) => {
const baseUrl = import.meta.env.BASE_URL;
return <a href={`${baseUrl}${props.url}`}>{props.children}</a>;
};
9 changes: 5 additions & 4 deletions packages/docs-app/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,21 @@ hero:
---

import { Card, CardGrid } from '@astrojs/starlight/components';
import { Link } from '../../components/Link.tsx';

## Next steps

<CardGrid stagger>
<Card title="Material Develop" icon="pencil">
Learn more in [Docs](/reference/material/introduction/).
How to develop a component that can be used in the editor? <Link url="reference/material/introduction/">Doc</Link>
</Card>
<Card title="Schema Defined" icon="add-document">
Learn more in [Docs](/reference/pageschema/page/).
Definition of page protocol <Link url="reference/pageschema/page/">Doc</Link>
</Card>
<Card title="Plugins" icon="setting">
Learn more in [Docs](/reference/pageschema/page/).
How to develop editor plugins? <Link url="reference/plugin/plugin-develop">Doc</Link>
</Card>
<Card title="API" icon="open-book">
Learn more in [Docs](/guides/).
API Description, Learn more in <Link url="guides">Doc</Link>
</Card>
</CardGrid>
3 changes: 2 additions & 1 deletion packages/docs-app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"extends": "astro/tsconfigs/strict",
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "react"
"jsxImportSource": "react",
"types": ["vite/client"]
},
"exclude": ["src/codeSnippets/**"]
}
4 changes: 2 additions & 2 deletions packages/engine-website-app/src/page/Editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export const App = () => {
globalName: 'lodash',
resources: [
{
src: 'https://cdn.bootcdn.net/ajax/libs/lodash.js/4.17.21/lodash.js',
src: 'https://cdn.jsdelivr.net/npm/lodash@4.17.21/lodash.min.js',
},
],
},
Expand All @@ -288,7 +288,7 @@ export const App = () => {
globalName: 'dayjs',
resources: [
{
src: 'https://cdn.bootcdn.net/ajax/libs/dayjs/1.11.9/dayjs.min.js',
src: 'https://cdn.jsdelivr.net/npm/dayjs@1.11.12/dayjs.min.js',
},
],
},
Expand Down
15 changes: 15 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 181aa3f

Please sign in to comment.