Skip to content

Commit

Permalink
feat: add getting started doc
Browse files Browse the repository at this point in the history
  • Loading branch information
sanyuan0704 committed Sep 13, 2022
1 parent ab06546 commit c6bfe6f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
24 changes: 10 additions & 14 deletions docs/guide/getting-started.md
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion 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",
Expand Down
14 changes: 9 additions & 5 deletions src/client/theme-default/components/DocFooter/index.tsx
Expand Up @@ -3,18 +3,22 @@ import { usePageData } from 'island/client';

export function DocFooter() {
const { siteData } = usePageData();
const { editLink } = siteData?.themeConfig;
const { editLink } = siteData?.themeConfig || {};
return (
<footer className={styles.footer}>
<div className={styles.editInfo}>
<div className={styles.editLink}>
<button className={styles.editLinkButton}>Edit Link</button>
</div>
<div className={styles.lastUpdated}>
<p className={styles.lastUpdated}>
{editLink?.text || 'Last Updated: '}
</p>
<span>{editLink?.pattern} || '2022.09.12 12:30'</span>
{editLink ? (
<>
<p className={styles.lastUpdated}>
{editLink?.text || 'Last Updated: '}
</p>
<span>{editLink?.pattern}</span>
</>
) : null}
</div>
</div>

Expand Down

0 comments on commit c6bfe6f

Please sign in to comment.