Skip to content

Commit

Permalink
Docs website (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
iwoplaza authored Aug 12, 2024
1 parent b5937a4 commit 0001a4f
Show file tree
Hide file tree
Showing 27 changed files with 4,487 additions and 147 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ jobs:
- name: Install dependencies
run: pnpm install --recursive --frozen-lockfile

- run: pnpm check && pnpm test && pnpm build
- run: pnpm check
37 changes: 37 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy documentation 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: [master]
# 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@v2
with:
path: apps/typed-binary-docs # The root location of your Astro project inside the repository.

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
24 changes: 24 additions & 0 deletions apps/typed-binary-docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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

# autogenerated by typedocs
src/content/docs/api
42 changes: 42 additions & 0 deletions apps/typed-binary-docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import starlight from '@astrojs/starlight';
import { defineConfig } from 'astro/config';

// https://astro.build/config
export default defineConfig({
site: 'https://iwoplaza.github.io/typed-binary',
integrations: [
starlight({
title: 'Typed Binary',
logo: {
light: '/public/logo-light-alt.svg',
dark: '/public/logo-dark.svg',
replacesTitle: true,
},
social: {
github: 'https://github.com/iwoplaza/typed-binary',
},
sidebar: [
{ label: 'Why Typed Binary?', slug: 'guides/why-typed-binary' },
{
label: 'Learn the Basics',
items: [
{ label: 'Getting Started', slug: 'guides/getting-started' },
{
label: 'Serialization and Deserialization',
slug: 'guides/serialization-and-deserialization',
},
{ label: 'Primitive Values', slug: 'guides/primitive-values' },
{ label: 'Objects', slug: 'guides/objects' },
{ label: 'Arrays and Tuples', slug: 'guides/arrays-and-tuples' },
{ label: 'Optionals', slug: 'guides/optionals' },
{ label: 'Recursive Types', slug: 'guides/recursive-types' },
{
label: 'Custom Schema Types',
slug: 'guides/custom-schema-types',
},
],
},
],
}),
],
});
19 changes: 19 additions & 0 deletions apps/typed-binary-docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "typed-binary-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.8.2",
"@astrojs/starlight": "^0.25.1",
"astro": "^4.10.2",
"sharp": "^0.32.5",
"typescript": "^5.5.3"
}
}
41 changes: 41 additions & 0 deletions apps/typed-binary-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.
Loading

0 comments on commit 0001a4f

Please sign in to comment.