-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from anbraten/docs
- Loading branch information
Showing
11 changed files
with
1,930 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
node_modules | ||
node_modules/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.vitepress/cache/ | ||
.vitepress/dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { defineConfig } from 'vitepress' | ||
|
||
// https://vitepress.dev/reference/site-config | ||
export default defineConfig({ | ||
title: "TSky", | ||
description: "A BlueSky API client for nimble apps and tools", | ||
themeConfig: { | ||
// https://vitepress.dev/reference/default-theme-config | ||
nav: [ | ||
{ text: 'Home', link: '/' }, | ||
{ text: 'Examples', link: '/examples' } | ||
], | ||
|
||
sidebar: [ | ||
{ text: 'Getting Started', link: '/getting-started' }, | ||
{ text: 'API Reference', link: '/api', | ||
items: [ | ||
{ text: 'new Tsky', link: '/api#tsky' }, | ||
{ text: 'tsky.profile', link: '/api#profile' }, | ||
{ text: 'tsky.typeahead', link: '/api#typeahead' } | ||
], | ||
}, | ||
{ | ||
text: 'Examples', | ||
link: '/examples', | ||
} | ||
], | ||
|
||
search: { | ||
provider: 'local' | ||
}, | ||
|
||
socialLinks: [ | ||
{ icon: 'github', link: 'https://github.com/tsky-dev/tsky' } | ||
], | ||
|
||
editLink: { | ||
pattern: 'https://github.com/tsky-dev/tsky/edit/main/docs/:path', | ||
} | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
outline: deep | ||
--- | ||
|
||
# API Reference | ||
|
||
## Tsky | ||
|
||
### `new Tsky(app: AppBskyNS): Tsky` | ||
|
||
Create a new Tsky instance. | ||
|
||
```ts | ||
import { Tsky } from 'tsky' | ||
|
||
const app = new AppBskyNS(); // TODO | ||
const tsky = new Tsky(app); | ||
``` | ||
|
||
### `tsky.profile(did: string): Promise<Profile>` | ||
|
||
Get a profile by DID. | ||
|
||
```ts | ||
const profile = await tsky.profile('did:plc:giohuovwawlijq7jkuysq5dd'); | ||
|
||
console.log(profile.handle); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
outline: deep | ||
--- | ||
|
||
# Examples | ||
|
||
TODO: Add examples here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
outline: deep | ||
--- | ||
|
||
# Getting Started | ||
|
||
## Installation | ||
|
||
::: code-group | ||
|
||
```sh [npm] | ||
$ npm add -D tsky | ||
``` | ||
|
||
```sh [pnpm] | ||
$ pnpm add -D tsky | ||
``` | ||
|
||
```sh [yarn] | ||
$ yarn add -D tsky | ||
``` | ||
|
||
```sh [bun] | ||
$ bun add -D tsky | ||
``` | ||
|
||
::: | ||
|
||
|
||
## Usage | ||
|
||
```ts | ||
import { Tsky } from 'tsky' | ||
|
||
|
||
const app = new AppBskyNS(); // TODO | ||
const tsky = new Tsky(app); | ||
|
||
const profile = await tsky.profile('did:plc:giohuovwawlijq7jkuysq5dd'); | ||
|
||
console.log(profile.handle); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
# https://vitepress.dev/reference/default-theme-home-page | ||
layout: home | ||
|
||
hero: | ||
name: "TSky" | ||
text: "A BlueSky API client for nimble apps and tools" | ||
tagline: A BlueSky API client for nimble apps and tools | ||
actions: | ||
- theme: brand | ||
text: Get Started | ||
link: /getting-started | ||
- theme: alt | ||
text: API reference | ||
link: /api | ||
- theme: alt | ||
text: Examples | ||
link: /examples | ||
|
||
features: | ||
- title: Lightweight | ||
icon: 🌬️ | ||
details: Heavy objects will fall through the sky | ||
- title: Endless possibilities | ||
icon: 🌌 | ||
details: The sky has no limit | ||
- title: Easy to use | ||
icon: ☁️ | ||
details: Like a walk on the clouds | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[build] | ||
publish = "dist" | ||
command = "pnpm build" | ||
base = "/docs/" | ||
|
||
# Allow previewing docs | ||
[[redirects]] | ||
from = "/docs/*" | ||
to = "/:splat" | ||
status = 200 | ||
force = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "tsky-docs", | ||
"version": "1.0.0", | ||
"private": true, | ||
"main": "index.js", | ||
"scripts": { | ||
"dev": "vitepress dev", | ||
"build": "vitepress build", | ||
"preview": "vitepress preview", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"devDependencies": { | ||
"vitepress": "^1.5.0" | ||
} | ||
} |
Oops, something went wrong.