From 53906ebef5d674d00c84ed02680e09d02f61555b Mon Sep 17 00:00:00 2001 From: Hasko Date: Fri, 26 Jun 2026 00:17:22 +0200 Subject: [PATCH] =?UTF-8?q?fix(docs):=20=F0=9F=90=9B=20separate=20document?= =?UTF-8?q?ation=20sections?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vitepress/config.mts | 68 +++++++++++++++++--------------------- docs/guides/index.md | 17 ++++++++++ docs/index.md | 1 + docs/public/logo.svg | 4 --- docs/reference/index.md | 2 +- 5 files changed, 49 insertions(+), 43 deletions(-) create mode 100644 docs/guides/index.md delete mode 100644 docs/public/logo.svg diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 29b7074..a421397 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -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', @@ -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, }, diff --git a/docs/guides/index.md b/docs/guides/index.md new file mode 100644 index 0000000..4707805 --- /dev/null +++ b/docs/guides/index.md @@ -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) diff --git a/docs/index.md b/docs/index.md index ed6fb54..476ee18 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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 diff --git a/docs/public/logo.svg b/docs/public/logo.svg deleted file mode 100644 index 0e138b8..0000000 --- a/docs/public/logo.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/docs/reference/index.md b/docs/reference/index.md index 1061e26..c82446d 100644 --- a/docs/reference/index.md +++ b/docs/reference/index.md @@ -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