Skip to content
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
68 changes: 30 additions & 38 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
import { defineConfig } from 'vitepress';

const gettingStartedSidebar = [
{
text: 'Getting Started',
items: [
{ text: 'Introduction', link: '/getting-started/introduction' },
{ text: 'Installation', link: '/getting-started/installation' },
{ text: 'Basic usage', link: '/getting-started/basic-usage' },
],
},
];

const guideSidebar = [
{
text: 'Guide',
items: [
{ text: 'Overview', link: '/guides/' },
{ text: 'Custom value objects', link: '/guides/custom-value-objects' },
{ text: 'Error handling', link: '/guides/error-handling' },
{ text: 'Serialization', link: '/guides/serialization' },
{ text: 'Null object', link: '/guides/null-object' },
{ text: 'Release flow', link: '/guides/release-flow' },
{ text: 'Agent skill', link: '/guides/agent-skill' },
],
},
];

const referenceSidebar = [
{
text: 'Overview',
Expand Down Expand Up @@ -122,52 +148,18 @@ export default defineConfig({
],

themeConfig: {
logo: { src: '/logo.svg', alt: 'Value Objects' },
siteTitle: 'Value Objects',

nav: [
{ text: 'Guide', link: '/getting-started/introduction' },
{ text: 'Getting Started', link: '/getting-started/introduction' },
{ text: 'Guide', link: '/guides/' },
{ text: 'Reference', link: '/reference/' },
{ text: 'Agent skill', link: '/guides/agent-skill' },
{ text: 'npm', link: 'https://www.npmjs.com/package/@haskou/value-objects' },
],

sidebar: {
'/getting-started/': [
{
text: 'Getting started',
items: [
{ text: 'Introduction', link: '/getting-started/introduction' },
{ text: 'Installation', link: '/getting-started/installation' },
{ text: 'Basic usage', link: '/getting-started/basic-usage' },
],
},
{
text: 'Guides',
items: [
{ text: 'Custom value objects', link: '/guides/custom-value-objects' },
{ text: 'Error handling', link: '/guides/error-handling' },
{ text: 'Serialization', link: '/guides/serialization' },
{ text: 'Null object', link: '/guides/null-object' },
{ text: 'Release flow', link: '/guides/release-flow' },
{ text: 'Agent skill', link: '/guides/agent-skill' },
],
},
],
'/guides/': [
{
text: 'Guides',
items: [
{ text: 'Custom value objects', link: '/guides/custom-value-objects' },
{ text: 'Error handling', link: '/guides/error-handling' },
{ text: 'Serialization', link: '/guides/serialization' },
{ text: 'Null object', link: '/guides/null-object' },
{ text: 'Release flow', link: '/guides/release-flow' },
{ text: 'Agent skill', link: '/guides/agent-skill' },
],
},
...referenceSidebar,
],
'/getting-started/': gettingStartedSidebar,
'/guides/': guideSidebar,
'/reference/': referenceSidebar,
},

Expand Down
17 changes: 17 additions & 0 deletions docs/guides/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Guide
description: Practical guides for using @haskou/value-objects
---

# Guide

Use these guides when you need to adapt value objects to application code, handle invalid input, serialize values, or understand the package release flow.

## Topics

- [Custom value objects](/guides/custom-value-objects)
- [Error handling](/guides/error-handling)
- [Serialization](/guides/serialization)
- [Null object](/guides/null-object)
- [Release flow](/guides/release-flow)
- [Agent skill](/guides/agent-skill)
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Use it as the source of truth for installation, examples, errors, serialization
- [Introduction](/getting-started/introduction)
- [Installation](/getting-started/installation)
- [Basic usage](/getting-started/basic-usage)
- [Guide](/guides/)
- [API reference](/reference/)

## Package
Expand Down
4 changes: 0 additions & 4 deletions docs/public/logo.svg

This file was deleted.

2 changes: 1 addition & 1 deletion docs/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: API reference for @haskou/value-objects

# Reference

Each exported class has its own page. Tiny miracle: now changing one class doc no longer means spelunking through a mega Markdown crypt.
Each exported class has its own page.

## Base

Expand Down
Loading