Skip to content

Create a page

Details:

How to create a new page and add the routing.

Steps:

  • Setup folder structure
  • if you are adding an existing page for patient care or Engineering add to corresponding folder
  • below is how the routing works based on the folder structure
index.md                                -->  /index.html (accessible as /)
pages/engineering/index.md              -->  /pages/engineering/index.html (accessible as /guide/)
pages/patient-care/getting-started.md   -->  /pages/patient-care/index.html

Route

.
├─ docs              # project root
│  ├─ .vitepress     # config dir
│  ├─ assets         # images
│  └─ index.md       # Loading screen
└─ ...

Structure

.
├─ pages
│  ├─ engineering
│  │      ├─ index.md
│  │      └─ page.md
│  │      └─ ...
│  └─ patient-care
│         ├─ index.md
│         └─ page.md
│         └─ ...

Tools

md
```js{4}
export default {
  data () {
    return {
      msg: 'Highlighted!'
    }
  }
}
```

Output

js
export default {
  data () {
    return {
      msg: 'Highlighted!'
    }
  }
}

Custom Containers

Input

md
::: info
This is an info box.
:::

::: tip
This is a tip.
:::

::: warning
This is a warning.
:::

::: danger
This is a dangerous warning.
:::

::: details
This is a details block.
:::

Output

INFO

This is an info box.

TIP

This is a tip.

WARNING

This is a warning.

DANGER

This is a dangerous warning.

Details

This is a details block.