Skip to content
This repository was archived by the owner on Apr 9, 2025. It is now read-only.

🚀 Vitepress setup and structure #3

Merged
merged 1 commit into from
Dec 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ dist-ssr
*.njsproj
*.sln
*.sw?

# Vitepress
docs/.vitepress/cache
45 changes: 45 additions & 0 deletions docs/.vitepress/config.cts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { defineConfig } from "vitepress"

export default defineConfig({
title: 'Vue form handler',
description: 'Discover the easy way of handling your vue forms',
themeConfig: {
nav: [
{ text: 'Home', link: '/' },
{ text: 'Get started', link: '/getting-started' },
],
sidebar: [
{
text: 'Documentation', items: [
{ text: 'Get started', link: '/getting-started' },
{ text: 'Tutorial', link: '/tutorial' },
{
text: 'Guides', items: [
{ text: 'Validation', link: '/guides/validation' },
{ text: 'Typescript', link: '/guides/typescript' },
{ text: 'Form submission', link: '/guides/form-submission' },
{ text: 'Custom components', link: '/guides/custom-components' },
{ text: 'Native support', link: '/guides/native-support' },
]
},
{
text: 'Examples', items: [
{ text: 'Basic', link: '/examples/basic' },
{ text: 'Async validations', link: '/examples/async-validations' },
{ text: 'Typescript', link: '/examples/typescript' },
{ text: 'Interceptor', link: '/examples/interceptor' },
{ text: 'Dependent fields', link: '/examples/dependent-fields' },
{ text: 'More examples', link: '/examples/more-examples' }
]
},
]
},
{
text: 'API Reference', items: [
{ text: 'useFormHandler()', link: '/api/use-form-handler' },
{ text: `FormHandler`, link: '/api/form-handler' }
]
}
]
}
})
1 change: 1 addition & 0 deletions docs/api/form-handler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# \<FormHandler/>
1 change: 1 addition & 0 deletions docs/api/use-form-handler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# useFormHandler()
1 change: 1 addition & 0 deletions docs/examples/async-validations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Async validations
1 change: 1 addition & 0 deletions docs/examples/basic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Basic Example
1 change: 1 addition & 0 deletions docs/examples/dependent-fields.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Dependent fields
1 change: 1 addition & 0 deletions docs/examples/interceptor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Interceptor
1 change: 1 addition & 0 deletions docs/examples/more-examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# More examples
1 change: 1 addition & 0 deletions docs/examples/typescript.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Typescript
31 changes: 31 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Getting started

## Some section

Some content here


## Another section

More content there


## Basic example

Some code there

``` vue
<template>
<form @submit.prevent="handleSubmit(successFn)">
<input v-bind="register('firstName')" />
<input v-bind="register('lastName')" />
<input v-bind="register('age')" />
<input type="submit"/>
</form>
</template>
<script setup>
import { useFormHandler } from 'vue-form-handler';
const { values, formState, register, handleSubmit } = useFormHandler();
const successFn = (form) => {console.log({form})}
</script>
```
1 change: 1 addition & 0 deletions docs/guides/custom-components.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Custom components
1 change: 1 addition & 0 deletions docs/guides/form-submission.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Form submission
1 change: 1 addition & 0 deletions docs/guides/native-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Native support
1 change: 1 addition & 0 deletions docs/guides/typescript.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Typescript
1 change: 1 addition & 0 deletions docs/guides/validation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Validation
38 changes: 38 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
layout: home

hero:
name: Vue form handler
text: Vue & TS powered form handler.
tagline: The only handler you'll need to easily work with forms in vue
image:
src: /logo.png
alt: Vue form handler
actions:
- theme: brand
text: Get Started
link: /getting-started
- theme: alt
text: View on GitHub
link: https://github.com/dbssman/vue-form-handler

features:
- title: Fully tree shakeable
details: Only take what you want
icon: ⚡
- title: Type Strong
details: Written in TypeScript, with full TS docs
icon: 💪
- title: Flexible
details: You can wrap the handler over native inputs or any other like the ones from material libraries or custom inputs
icon: 🔩
- title: Super light
details: Small package size
icon: 🪶
- title: DX
details: Great development experience
icon: 💻
- title: Interactive demos
details: Documentation of functions also come with interactive demos!
icon: 🎪
---
1 change: 1 addition & 0 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Tutorial
Loading