Skip to content

Commit

Permalink
add first structure
Browse files Browse the repository at this point in the history
  • Loading branch information
CordlessWool committed Mar 28, 2024
1 parent ebc3580 commit ed7c888
Show file tree
Hide file tree
Showing 8 changed files with 800 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,5 @@ dist
tests/integration/test-tmp/

test-tmp/

documentation/.vitepress/cache/
37 changes: 37 additions & 0 deletions documentation/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "loom-io",
description: "loom your file handling",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'Home', link: '/' },
{ text: 'Documentation', link: '/introduction' }
],

sidebar: [
{
text: 'Getting Started',
items: [
{ text: 'Introduction', link: '/intro' },
{ text: 'Install', link: '/install' },
{ text: 'First steps', link: '/getting-started' }
]
},
{
text: 'Source Adapter',
items: [
{ text: 'In-Memory', link: '/adapter/in-memory-adapter' },
{ text: 'Filesystem (node)', link: '/adapter/node-fs-adapter' },
{ text: 'S3', link: '/adapter/minio-s3-adapter' }
]
}
],

socialLinks: [
{ icon: 'github', link: 'https://github.com/cotton-coding/loom-io' }
]
}
})
49 changes: 49 additions & 0 deletions documentation/api-examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
outline: deep
---

# Runtime API Examples

This page demonstrates usage of some of the runtime APIs provided by VitePress.

The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:

```md
<script setup>
import { useData } from 'vitepress'

const { theme, page, frontmatter } = useData()
</script>

## Results

### Theme Data
<pre>{{ theme }}</pre>

### Page Data
<pre>{{ page }}</pre>

### Page Frontmatter
<pre>{{ frontmatter }}</pre>
```

<script setup>
import { useData } from 'vitepress'

const { site, theme, page, frontmatter } = useData()
</script>

## Results

### Theme Data
<pre>{{ theme }}</pre>

### Page Data
<pre>{{ page }}</pre>

### Page Frontmatter
<pre>{{ frontmatter }}</pre>

## More

Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).
22 changes: 22 additions & 0 deletions documentation/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# https://vitepress.dev/reference/default-theme-home-page
layout: home

hero:
name: "loom-io"
text: handle your files
tagline: loom your file handling
actions:
- theme: brand
text: Introduction
link: /markdown-examples
- theme: alt
text: Get started
link: /api-examples

features:
- title: Sources
details: Handle different sources like s3, filesystem or in-memory the same way. Write you own source adapter and plug it
- title: Converter
details: Read yml or other file types directly as json, build your own converter to handle your own file structure
---
85 changes: 85 additions & 0 deletions documentation/markdown-examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Markdown Extension Examples

This page demonstrates some of the built-in markdown extensions provided by VitePress.

## Syntax Highlighting

VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features like line-highlighting:

**Input**

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

**Output**

```js{4}
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.
:::

## More

Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown).
18 changes: 18 additions & 0 deletions documentation/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "documentation",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"docs:dev": "vitepress dev",
"docs:build": "vitepress build",
"docs:preview": "vitepress preview"
},
"keywords": [],
"author": "",
"license": "Apache-2.0",
"devDependencies": {
"vitepress": "^1.0.1"
}
}
Loading

0 comments on commit ed7c888

Please sign in to comment.