Skip to content

Commit

Permalink
feat: add documentation website (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcec0de authored Oct 2, 2024
1 parent 13c086c commit 23e5de1
Show file tree
Hide file tree
Showing 66 changed files with 5,280 additions and 41 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/website.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy to GitHub Pages

on:
# Trigger the workflow every time you push to the `main` branch
# Using a different branch name? Replace `main` with your branch’s name
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:

# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v4
- name: Install, build, and upload your site
uses: withastro/action@v3
with:
path: docs
node-version: 20
package-manager: pnpm@latest

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
22 changes: 22 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# build output
dist/
# generated types
.astro/
.vscode/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store
1 change: 0 additions & 1 deletion docs/001_start.md

This file was deleted.

56 changes: 56 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Starlight Starter Kit: Tailwind

[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)

```
npm create astro@latest -- --template starlight/tailwind
```

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/starlight/tree/main/examples/tailwind)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/tailwind)
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/withastro/starlight&create_from_path=examples/tailwind)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fwithastro%2Fstarlight%2Ftree%2Fmain%2Fexamples%2Ftailwind&project-name=my-starlight-docs&repository-name=my-starlight-docs)

> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
## 🚀 Project Structure

Inside of your Astro + Starlight project, you'll see the following folders and files:

```
.
├── public/
├── src/
│ ├── assets/
│ ├── content/
│ │ ├── docs/
│ │ └── config.ts
│ └── env.d.ts
├── astro.config.mjs
├── package.json
├── tailwind.config.mjs
└── tsconfig.json
```

Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.

Images can be added to `src/assets/` and embedded in Markdown with a relative link.

Static assets, like favicons, can be placed in the `public/` directory.

## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |

## 👀 Want to learn more?

Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).
40 changes: 40 additions & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// @ts-check
import starlight from '@astrojs/starlight'
import tailwind from '@astrojs/tailwind'
import { defineConfig } from 'astro/config'

// https://astro.build/config
export default defineConfig({
integrations: [
starlight({
title: 'Kibu Documentation',
logo: {
replacesTitle: true,
dark: './src/assets/logo dark.svg',
light: './src/assets/logo light.svg',
},
social: {
github: 'https://github.com/kibu-sh/kibu',
youtube: 'https://www.youtube.com/@kibu-sh',
twitter: 'https://twitter.com/kibu_sh',
discord: 'https://discord.gg/5sga863FVB',
},
sidebar: [
{
label: 'Guides',
autogenerate: { directory: 'guides' },
// items: [
// // Each item here is one entry in the navigation menu.
// // { label: 'Example Guide', slug: 'guides/example' },
// ],
},
{
label: 'Reference',
autogenerate: { directory: 'reference' },
},
],
customCss: ['./src/tailwind.css'],
}),
tailwind({ applyBaseStyles: false }),
],
})
Empty file removed docs/client-gen.md
Empty file.
Empty file removed docs/database.md
Empty file.
Empty file removed docs/encoding.md
Empty file.
Empty file removed docs/errors.md
Empty file.
Empty file removed docs/filewatching.md
Empty file.
Empty file removed docs/graphql.md
Empty file.
Empty file removed docs/grpc.md
Empty file.
Empty file removed docs/middleware.md
Empty file.
Empty file removed docs/migrations.md
Empty file.
22 changes: 22 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "docs",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/starlight": "^0.28.2",
"@astrojs/starlight-tailwind": "^2.0.3",
"@astrojs/tailwind": "^5.1.0",
"astro": "^4.15.3",
"sharp": "^0.32.5",
"tailwindcss": "^3.4.4",
"@astrojs/check": "^0.9.3",
"typescript": "^5.6.2"
}
}
Empty file removed docs/pub-sub.md
Empty file.
1 change: 1 addition & 0 deletions docs/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file removed docs/real-time-postgres.md
Empty file.
2 changes: 0 additions & 2 deletions docs/rendering.md

This file was deleted.

Empty file removed docs/row-level-security.md
Empty file.
Binary file added docs/src/assets/houston.webp
Binary file not shown.
11 changes: 11 additions & 0 deletions docs/src/assets/logo dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions docs/src/assets/logo light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions docs/src/content/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { defineCollection } from 'astro:content';
import { docsSchema } from '@astrojs/starlight/schema';

export const collections = {
docs: defineCollection({ schema: docsSchema() }),
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
---
title: Getting Started
description: Quickly get started with Kibu
---

# Getting Started

## Install
Install the cli and library by running the following commands in your terminal.
Install the cli and library by running the following commands in your terminal.
```bash
go get github.com/kibu-sh/kibu
go install github.com/kibu-sh/kibu/cmd/kibu@main
Expand Down Expand Up @@ -34,4 +39,10 @@ touch src/backend/systems/health/health.go
touch src/backend/systems/health/healthspec/health_dto.go
```

Once the wire.go and wire_set.go files have been created cd into the server directory and run wire once.
Once the wire.go and wire_set.go files have been created cd into the server directory and run wire once.

## Further reading

- Read [about how-to guides](https://diataxis.fr/how-to-guides/) in the Diátaxis framework

https://spiral.dev/ (as inspiration)
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Managing Secrets & Configurations
description: TODO
---

# Managing Secrets & Configurations

## Introduction
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Authorization
description: TODO
---

provide interface allow many implementations
defaults to postgres RLS and table based permissions
maybe some other implementation from another library
4 changes: 4 additions & 0 deletions docs/src/content/docs/guides/client-gen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: TODO
description: TODO
---
4 changes: 4 additions & 0 deletions docs/src/content/docs/guides/database.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Database
description: TODO
---
4 changes: 4 additions & 0 deletions docs/src/content/docs/guides/encoding.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Encoding
description: TODO
---
4 changes: 4 additions & 0 deletions docs/src/content/docs/guides/errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: TODO
description: TODO
---
5 changes: 5 additions & 0 deletions docs/faq.md → docs/src/content/docs/guides/faq.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: FAQ
description: Frequently asked questions
---

Should I ignore generated files?

We recommend ignoring the `*.gen.go` files and `kibugen`.
Expand Down
4 changes: 4 additions & 0 deletions docs/src/content/docs/guides/filewatching.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: File Watching
description: TODO
---
5 changes: 5 additions & 0 deletions docs/go-gen.md → docs/src/content/docs/guides/go-gen.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Code Generation
description: TODO
---

Write about code generation
Cover topics like how to write a new generator
What the data structures look like
4 changes: 4 additions & 0 deletions docs/src/content/docs/guides/graphql.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: GraphQL
description: TODO
---
4 changes: 4 additions & 0 deletions docs/src/content/docs/guides/grpc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: gRPC
description: TODO
---
4 changes: 4 additions & 0 deletions docs/src/content/docs/guides/middleware.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Middleware
description: TODO
---
4 changes: 4 additions & 0 deletions docs/src/content/docs/guides/migrations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Migrations
description: TODO
---
4 changes: 4 additions & 0 deletions docs/src/content/docs/guides/pub-sub.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Pub Sub
description: TODO
---
5 changes: 5 additions & 0 deletions docs/queries.md → docs/src/content/docs/guides/queries.md
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
---
title: Queries
description: TODO
---

organizing migrations and queries into submodules
4 changes: 4 additions & 0 deletions docs/src/content/docs/guides/real-time-postgres.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Real Time Postgres
description: Postgres Change Data Capture can trigger temporal workflows
---
7 changes: 7 additions & 0 deletions docs/src/content/docs/guides/rendering.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Rendering
description: TODO
---

HTMX
TEMPL
4 changes: 4 additions & 0 deletions docs/src/content/docs/guides/row-level-security.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Row Level Security
description: TODO
---
5 changes: 5 additions & 0 deletions docs/sqlc.md → docs/src/content/docs/guides/sqlc.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
---
title: SQLC
description: TODO
---

consider the sqlc plugin for ORM features
https://github.com/volatiletech/sqlboiler
4 changes: 4 additions & 0 deletions docs/src/content/docs/guides/testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: Testing
description: TODO
---
Loading

0 comments on commit 23e5de1

Please sign in to comment.