Skip to content

Commit

Permalink
docs v1
Browse files Browse the repository at this point in the history
  • Loading branch information
marvin-j97 committed Jan 25, 2024
1 parent 74ec17b commit 59185fb
Show file tree
Hide file tree
Showing 30 changed files with 6,006 additions and 5 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy page

on:
push:
branches:
- main

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
node-version:
- 20
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Install dependencies
run: pnpm i
working-directory: docs
- name: Generate page
run: pnpm build
working-directory: docs
- name: Deploy page
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/dist
23 changes: 23 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# build output
dist/
# generated types
.astro/

# 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

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

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

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

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/basics)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgitpro.ttaallkk.top%2Fwithastro%2Fstarlight%2Ftree%2Fmain%2Fexamples%2Fbasics&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
└── 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).
42 changes: 42 additions & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';

// https://astro.build/config
export default defineConfig({
integrations: [
starlight({
title: 'Smoltable',
social: {
github: 'https://github.com/marvin-j97/smoltable',
},
sidebar: [
{
label: 'Guides',
items: [
{ label: 'What is Smoltable?', link: '/guides/intro/' },
{ label: 'Installation', link: '/guides/installation/' },
{ label: 'Wide-column data design', link: '/guides/wide-column-intro/' },
{ label: 'Column keys', link: '/guides/column-keys' },
{ label: 'Locality groups', link: '/guides/locality-groups' },
],
},
{
label: 'Reference',
autogenerate: { directory: 'reference' },
items: [
{
label: "JSON API",
items: [
{ label: 'Create a table', link: '/reference/json-api/create-table' },
{ label: 'Create column families', link: '/reference/json-api/create-column-families' },
{ label: 'Ingest data', link: '/reference/json-api/ingest-data' },
{ label: 'Retrieve rows', link: '/reference/json-api/retrieve-rows' },
{ label: 'Scan rows', link: '/reference/json-api/scan-rows' },
]
}
],
},
],
}),
],
});
19 changes: 19 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"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/check": "^0.4.1",
"@astrojs/starlight": "^0.16.0",
"astro": "^4.2.1",
"sharp": "^0.32.5",
"typescript": "^5.3.3"
}
}
Loading

0 comments on commit 59185fb

Please sign in to comment.