Skip to content
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
60 changes: 60 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install dependencies
run: bun install

- name: Setup Pages
id: setup_pages
uses: actions/configure-pages@v5

- name: Build with Next.js
run: bun run build
env:
PAGES_BASE_PATH: ${{ steps.setup_pages.outputs.base_path }}

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./out

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest

needs: build

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
36 changes: 36 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Continuous Integration

on:
push:
branches:
- main

pull_request:
branches:
- main

workflow_dispatch:

jobs:
ci:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Install Dependencies
run: bun install

- name: Check asset optimisation
run: bun run check:assets

- name: Run Lint
run: bun run lint

- name: Run Build
run: bun run build
29 changes: 0 additions & 29 deletions .github/workflows/lint.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/pages.yml

This file was deleted.

157 changes: 150 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,151 @@
# Environments
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
.env.*
!.env.example

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist
.output

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Sveltekit cache directory
.svelte-kit/

# vitepress build output
**/.vitepress/dist

# vitepress cache directory
**/.vitepress/cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# Firebase cache directory
.firebase/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v3
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Vite files
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.vite/

# generated content
.source

# test & build
/build

# others
.vercel
next-env.d.ts
1 change: 0 additions & 1 deletion .python-version

This file was deleted.

68 changes: 29 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,46 @@
> [!WARNING]
> This repository is deprecated and no longer maintained. Please refer to the [new repository (hardware-website)](https://github.com/absmach/hardware-website) for the latest documentation.
# Hardware Docs

# S0 Documentation
Documentation site for [Abstract Machines Hardware](https://github.com/absmach/s0), built with [Fumadocs](https://fumadocs.dev) and Next.js.

This repo collects the collaborative work on S0 documentation.
Visiting `/` renders the intro page; all doc pages are served at their slug directly (e.g. `/s0-gateway`).

Documentation is auto-generated from Markdown files in this repo.

[MkDocs](https://www.mkdocs.org/) is used to serve the docs locally with different theming.

## Install

Doc repo can be fetched from GitHub:
## Development

```bash
git clone https://github.com/absmach/s0-docs.git
pnpm install
pnpm dev
```

## Prerequisites

[Python](https://www.python.org/downloads/) 3.11 or higher is required to run MkDocs.
Open http://localhost:3000 with your browser to see the result.

1. Create a virtual environment:
## Deployment

```bash
python -m venv venv
```
This site uses:

2. Activate the virtual environment:
- **Next.js static export** — `next build` outputs static files to `out/`
- **GitHub Pages** — serves the `out/` directory via GitHub Actions

```bash
source venv/bin/activate
```
### GitHub Actions (`.github/workflows/cd.yml`)

3. Install [MkDocs](https://www.mkdocs.org/#installation)
Triggers on push to `main`. The workflow:

```bash
pip install mkdocs
```
1. Builds the static site with `pnpm run build`
2. Uploads `out/` as a Pages artifact
3. Deploys to GitHub Pages

4. Additionally, install [Material theme](https://squidfunk.github.io/mkdocs-material/):
## Project structure

```bash
pip install mkdocs-material
```
| Path | Description |
|----------------------------------------|------------------------------------------|
| `src/app/[[...slug]]/page.tsx` | Docs page renderer (all routes) |
| `src/app/api/search/route.ts` | Static search index route handler |
| `src/app/og/[...slug]/route.tsx` | OG image generation for docs pages |
| `src/app/llms-full.txt/route.ts` | LLM-readable full docs text |
| `content/docs` | MDX source files |
| `src/lib/source.ts` | Fumadocs source adapter |
| `src/lib/layout.shared.tsx` | Shared layout options (nav, logo) |

## Usage

Use MkDocs to serve documentation:

```bash
mkdocs serve
```
## Learn More

Then just point the browser to [http://127.0.0.1:8000](http://127.0.0.1:8000).
- [Fumadocs](https://fumadocs.dev)
- [Next.js Documentation](https://nextjs.org/docs)
Loading
Loading