Tweak docs
This commit is contained in:
@@ -1,18 +1,15 @@
|
|||||||
import {defineConfig} from "vitepress"
|
import {defineConfig} from "vitepress"
|
||||||
import typeDocSidebar from "../reference/typedoc-sidebar.json"
|
import typeDocSidebar from "../reference/typedoc-sidebar.json"
|
||||||
|
|
||||||
// https://vitepress.dev/reference/site-config
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
title: "Welshman",
|
title: "Welshman",
|
||||||
description: "The official Welshman documentation",
|
description: "The official Welshman documentation",
|
||||||
ignoreDeadLinks: true,
|
ignoreDeadLinks: true,
|
||||||
themeConfig: {
|
themeConfig: {
|
||||||
// https://vitepress.dev/reference/default-theme-config
|
|
||||||
nav: [
|
nav: [
|
||||||
{text: "Guide", link: "/what-is-welshman"},
|
{text: "Guide", link: "/what-is-welshman"},
|
||||||
{text: "Reference", link: "/reference/"},
|
{text: "Reference", link: "/reference/"},
|
||||||
],
|
],
|
||||||
|
|
||||||
sidebar: {
|
sidebar: {
|
||||||
"/reference/": [...typeDocSidebar],
|
"/reference/": [...typeDocSidebar],
|
||||||
"/": [
|
"/": [
|
||||||
@@ -139,7 +136,6 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
socialLinks: [{icon: "github", link: "https://github.com/vuejs/vitepress"}],
|
socialLinks: [{icon: "github", link: "https://github.com/vuejs/vitepress"}],
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
+9
-14
@@ -7,6 +7,9 @@ Welshman is modular - install only what you need:
|
|||||||
# Core nostr utilities (events, filters, tags)
|
# Core nostr utilities (events, filters, tags)
|
||||||
npm i @welshman/util
|
npm i @welshman/util
|
||||||
|
|
||||||
|
# In-memory event store and relay adapter
|
||||||
|
npm i @welshman/relay
|
||||||
|
|
||||||
# Networking and relay management
|
# Networking and relay management
|
||||||
npm i @welshman/net
|
npm i @welshman/net
|
||||||
|
|
||||||
@@ -18,11 +21,7 @@ npm i @welshman/signer
|
|||||||
|
|
||||||
# Dynamic feed compilation
|
# Dynamic feed compilation
|
||||||
npm i @welshman/feeds
|
npm i @welshman/feeds
|
||||||
```
|
|
||||||
|
|
||||||
For Svelte applications, additional packages provide reactive state management:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Svelte stores and state management
|
# Svelte stores and state management
|
||||||
npm i @welshman/store
|
npm i @welshman/store
|
||||||
|
|
||||||
@@ -35,23 +34,19 @@ npm i @welshman/editor
|
|||||||
|
|
||||||
Choose packages based on your needs:
|
Choose packages based on your needs:
|
||||||
|
|
||||||
- Building a framework-agnostic client? Start with:
|
- Building a conventional client? Use the framework:
|
||||||
```bash
|
```bash
|
||||||
npm i @welshman/util @welshman/net @welshman/signer @welshman/feeds
|
npm i @welshman/app
|
||||||
```
|
```
|
||||||
|
|
||||||
- Building a Svelte client? Add state management:
|
- Prefer to put things together yourself? Start with:
|
||||||
```bash
|
```bash
|
||||||
npm i @welshman/store @welshman/app
|
npm i @welshman/util @welshman/net @welshman/signer
|
||||||
```
|
```
|
||||||
|
|
||||||
- Need content features? Include:
|
- Just parsing and rendering content? Include:
|
||||||
```bash
|
```bash
|
||||||
npm i @welshman/content
|
npm i @welshman/content
|
||||||
```
|
```
|
||||||
|
|
||||||
- Want the full Svelte stack used by Coracle.social and Flotilla?
|
Each package is independent but integrates seamlessly. All packages are framework-agnostic, but work best with Svelte.
|
||||||
```bash
|
|
||||||
npm i @welshman/util @welshman/net @welshman/signer @welshman/feeds @welshman/store @welshman/app @welshman/content @welshman/editor
|
|
||||||
```
|
|
||||||
Each package is independent but integrates seamlessly. The core packages (`util`, `net`, `signer`, `feeds`, `content`) work with any framework, while `store`, `app` and `editor` are built for Svelte applications.
|
|
||||||
|
|||||||
+21
-12
@@ -18,18 +18,9 @@ hero:
|
|||||||
link: https://github.com/coracle-social/welshman
|
link: https://github.com/coracle-social/welshman
|
||||||
|
|
||||||
features:
|
features:
|
||||||
- title: "@welshman/content"
|
- title: "@welshman/app"
|
||||||
details: Parser and renderer for nostr note with customizable formatting options.
|
details: Batteries-included framework for building nostr clients.
|
||||||
link: "/content"
|
link: "/app"
|
||||||
- title: "@welshman/dvm"
|
|
||||||
details: Tools for building and interacting with nostr Data Vending Machines (DVMs)
|
|
||||||
link: "/dvm"
|
|
||||||
- title: "@welshman/editor"
|
|
||||||
details: Rich text editor component with support for mentions and embeds.
|
|
||||||
link: "/editor"
|
|
||||||
- title: "@welshman/feeds"
|
|
||||||
details: Dynamic feed compiler and loader with filtering and composition.
|
|
||||||
link: "/feeds"
|
|
||||||
- title: "@welshman/util"
|
- title: "@welshman/util"
|
||||||
details: Core Nostr utilities for events, filters, and data structures.
|
details: Core Nostr utilities for events, filters, and data structures.
|
||||||
link: "/util"
|
link: "/util"
|
||||||
@@ -39,7 +30,25 @@ features:
|
|||||||
- title: "@welshman/signer"
|
- title: "@welshman/signer"
|
||||||
details: Implementations of various nostr signing methods (NIP-01, NIP-07, NIP-46, NIP-55).
|
details: Implementations of various nostr signing methods (NIP-01, NIP-07, NIP-46, NIP-55).
|
||||||
link: "/signer"
|
link: "/signer"
|
||||||
|
- title: "@welshman/relay"
|
||||||
|
details: In-memory relay and event store.
|
||||||
|
link: "/relay"
|
||||||
|
- title: "@welshman/content"
|
||||||
|
details: Parser and renderer for nostr notes with customizable formatting options.
|
||||||
|
link: "/content"
|
||||||
|
- title: "@welshman/dvm"
|
||||||
|
details: Tools for building and interacting with nostr Data Vending Machines (DVMs)
|
||||||
|
link: "/dvm"
|
||||||
|
- title: "@welshman/editor"
|
||||||
|
details: Rich text editor with support for mentions and embeds.
|
||||||
|
link: "/editor"
|
||||||
|
- title: "@welshman/feeds"
|
||||||
|
details: Dynamic feed compiler and loader with filtering and composition.
|
||||||
|
link: "/feeds"
|
||||||
- title: "@welshman/store"
|
- title: "@welshman/store"
|
||||||
details: Svelte store utilities optimized for nostr state management.
|
details: Svelte store utilities optimized for nostr state management.
|
||||||
link: "/store"
|
link: "/store"
|
||||||
|
- title: "@welshman/lib"
|
||||||
|
details: General-purpose utility functions.
|
||||||
|
link: "/lib"
|
||||||
---
|
---
|
||||||
|
|||||||
+4
-4
@@ -4,11 +4,11 @@ A lightweight TypeScript utility library with zero dependencies, providing essen
|
|||||||
|
|
||||||
## What's Included
|
## What's Included
|
||||||
|
|
||||||
- **Deferred Promises** - Create promises with exposed resolve/reject methods
|
|
||||||
- **LRU Cache** - Efficient caching with automatic eviction policies
|
|
||||||
- **Utility Functions** - Helpers for arrays, objects, strings, and more
|
- **Utility Functions** - Helpers for arrays, objects, strings, and more
|
||||||
- **Worker Queue** - Process tasks asynchronously with batching and throttling
|
- **LRU Cache** - Efficient caching with automatic eviction policies
|
||||||
|
- **Task Queue** - Process tasks asynchronously with batching and throttling
|
||||||
|
- **URL Normalization** - A utility function for normalizing URLs
|
||||||
|
- **Deferred Promises** - Create promises with exposed resolve/reject methods
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@
|
|||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"test": "vitest",
|
"test": "vitest",
|
||||||
"docs:dev": "vitepress dev docs",
|
"docs:dev": "vitepress dev docs",
|
||||||
"docs:build": "npx typedoc && vitepress build docs",
|
"docs:build": "typedoc && vitepress build docs",
|
||||||
"docs:preview": "vitepress preview docs"
|
"docs:preview": "vitepress preview docs"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// Copied from https://github.com/sindresorhus/normalize-url
|
||||||
|
|
||||||
export type Options = {
|
export type Options = {
|
||||||
/**
|
/**
|
||||||
@default 'http'
|
@default 'http'
|
||||||
|
|||||||
Reference in New Issue
Block a user