Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs website #20

Merged
merged 7 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading