From c6bfe6f31a01ee25ddcfe1cdbd93e7a974886bf1 Mon Sep 17 00:00:00 2001 From: sanyuan <494130947@qq.com> Date: Tue, 13 Sep 2022 22:40:29 +0800 Subject: [PATCH] feat: add getting started doc --- docs/guide/getting-started.md | 24 ++++++++----------- package.json | 2 +- .../components/DocFooter/index.tsx | 14 +++++++---- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index 28ea8470..9f1408e0 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -21,33 +21,29 @@ yarn add island-ssg pnpm add island-ssg ``` -Then you can create a `index.md` file in the root directory of your project: +Then you can create file: -```markdown -# Title - -Hello world +```bash +`mkdir docs && echo '# Hello World' > docs/index.md` ``` -And then you can run the following command to start the development server: +And then you can add the following scripts in `package.json`: ```json // package.json { "scripts": { - "dev": "island dev" + "dev": "island dev docs", + "build": "island build docs", + "preview": "island start docs" } } ``` -Finally, you will see the following output in the console: +Serve the documentation site in the local server. ```bash -$ island dev -vite v2.3.8 dev server running at: - - > Local: http://localhost:3000/ - > Network: +yarn dev ``` -can open `http://localhost:3000` in your browser to see the result. +Island will start a development server at http://localhost:5173. diff --git a/package.json b/package.json index fab040fe..6d9a5635 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "island-ssg", - "version": "0.0.0-alpha.9", + "version": "0.0.0-alpha.11", "description": "Vite & Island architecture SSG framework", "main": "dist/index.js", "type": "module", diff --git a/src/client/theme-default/components/DocFooter/index.tsx b/src/client/theme-default/components/DocFooter/index.tsx index a580f71d..e42e99b9 100644 --- a/src/client/theme-default/components/DocFooter/index.tsx +++ b/src/client/theme-default/components/DocFooter/index.tsx @@ -3,7 +3,7 @@ import { usePageData } from 'island/client'; export function DocFooter() { const { siteData } = usePageData(); - const { editLink } = siteData?.themeConfig; + const { editLink } = siteData?.themeConfig || {}; return (