Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6877a85
(*) init commit
erinxocon May 19, 2026
036156f
(*) add proper relative link support for markdown files in collections
erinxocon May 21, 2026
a4bb9b6
(*) don't run under root and update remote user id so i don't have pe…
erinxocon May 21, 2026
9dd1aae
(*) if image format is not specified, use avif for MAXIMUM POWER
erinxocon May 21, 2026
22b01a3
(*) add remark for marsing mdd into AST tree so we can dynamically cr…
erinxocon May 27, 2026
351435d
(-) don't need default file
erinxocon May 27, 2026
84b1bcf
(*) to avoid changing the workflow too much I've written this utility…
erinxocon May 27, 2026
1d0164e
(+) pass in the location of the summary file
erinxocon May 27, 2026
03d5379
(+) add a script to convert all existing documents to mdx files with …
erinxocon May 27, 2026
b734384
(*) move files to new location for astro content dir
erinxocon May 27, 2026
8304a43
(*) simpler migration script
erinxocon May 29, 2026
9147492
(*) migrate first heading to frontmatter title
erinxocon May 29, 2026
64d5f9b
(*) remove, squash later
erinxocon May 29, 2026
39e6a1f
(*) move archive and readme to content folder, rename readme as index…
erinxocon May 29, 2026
ca852a5
(*) remove remark frontmatter
erinxocon May 29, 2026
78d65eb
(+) add logo assets to site
erinxocon Jun 2, 2026
30e8d23
(*) move scripts
erinxocon Jun 2, 2026
7dc9690
(+) create plugin that wraps any img content with a link to the unpro…
erinxocon Jun 2, 2026
e20b573
(*) package update
erinxocon Jun 2, 2026
1b21067
(*) update astro config
erinxocon Jun 2, 2026
8b49917
(*) we no longer need this file
erinxocon Jun 3, 2026
c3c2d22
(*) move favicon to proper place
erinxocon Jun 3, 2026
ddea6f8
(*) add unified for plugin type defitions
erinxocon Jun 3, 2026
7a4a49d
(*) migrate plugin to a typescript file with proper signature for rem…
erinxocon Jun 3, 2026
3669f56
(*) if create a grouped sidebar item, change the name of readme entr…
erinxocon Jun 3, 2026
d142d17
(*) introduce base url since site is hosted at /tech-docs
erinxocon Jun 3, 2026
8bc993d
(*) these articles have a period somehwere in their slug path, slugge…
erinxocon Jun 3, 2026
fefcb83
(*) do not process svg's under sharp pipeline or wrap them in links s…
erinxocon Jun 3, 2026
d70de61
(*) update stating jobs for new astro pipeline
erinxocon Jun 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
10 changes: 10 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM node:24-slim
RUN apt update && apt install -y --no-install-recommends ca-certificates git git-lfs sudo \
&& echo "node ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/node \
&& chmod 0440 /etc/sudoers.d/node
RUN corepack enable
WORKDIR /app

USER node

CMD ["/bin/bash"]
40 changes: 40 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "Existing Dockerfile",
"build": {
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerfile": "./Dockerfile"
},

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

"postCreateCommand": "",

"mounts": [
"source=devcontainer-bash-history,target=/history,type=volume"
],

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"astro-build.astro-vscode",
"unifiedjs.vscode-mdx",
"Vue.volar"
]
}
},

"remoteUser": "node",
"updateRemoteUserUID": true

// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "devcontainer"
}
35 changes: 29 additions & 6 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,39 @@ jobs:
with:
lfs: true

- name: Install mdBook
env:
MDBOOK_VERSION: 0.5.2
run: curl -sSL https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=/usr/local/bin
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 11.5.1

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm

- name: Restore Astro cache
uses: actions/cache/restore@v4
with:
path: node_modules/.astro
key: ${{ runner.os }}-astro-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-astro-

- name: Install
run: pnpm install

- name: Build
run: mdbook build
run: pnpm build

- name: Save Astro cache
uses: actions/cache/save@v4
with:
path: node_modules/.astro
key: ${{ runner.os }}-astro-${{ github.run_id }}

- name: Deploy
run: aws s3 sync ./book s3://${{ secrets.STAGING_AWS_S3_BUCKET }}/tech-docs --delete
run: aws s3 sync ./dist s3://${{ secrets.STAGING_AWS_S3_BUCKET }}/tech-docs --delete
env:
AWS_ACCESS_KEY_ID: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }}
Expand Down
191 changes: 188 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,188 @@
/book
/build
*.swp
# File created using '.gitignore Generator' for Visual Studio Code: https://bit.ly/vscode-gig
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,linux,astro,node
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,linux,astro,node

### Astro ###
# Gitignore template for Astro projects
# Ignore content collection generated files
.astro

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-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

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

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

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# 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

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

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

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

### Node Patch ###
# Serverless Webpack directories
.webpack/

# Optional stylelint cache

# SvelteKit build / generate output
.svelte-kit

### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,linux,astro,node

# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)

.pnpm-store/
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
65 changes: 65 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// @ts-check
import { defineConfig } from 'astro/config';
import { unified } from '@astrojs/markdown-remark';
import starlight from '@astrojs/starlight';

import rehypeAstroRelativeMarkdownLinks from 'astro-rehype-relative-markdown-links';
import { viteStaticCopy } from 'vite-plugin-static-copy';

import remarkWrapImagesWithOriginals from './src/plugins/remark-wrap-images-with-originals.ts';
import { generateSidebar } from './src/plugins/summary-to-sidebar.ts';

const base = "tech-docs";

// https://astro.build/config
export default defineConfig({
integrations: [
starlight({
title: 'System76 Technical Documentation',
logo: {
light: './src/assets/system76_logo-light.svg',
dark: './src/assets/system76_logo-dark.svg',
replacesTitle: true
},
lastUpdated: true,
social: [
{ icon: 'x.com', label: 'Twitter', href: 'https://x.com/system76' },
{ icon: 'linkedin', label: 'LinkedIn', href: 'https://www.linkedin.com/company/system76' },
{ icon: 'reddit', label: 'reddit', href: 'https://www.reddit.com/r/System76/' },
{ icon: 'github', label: 'GitHub', href: 'https://github.com/system76' },
],
sidebar: generateSidebar(new URL('./src/SUMMARY.md', import.meta.url).pathname),
favicon: '/favicon.png'
}),
],
base,
site: `http://localhost:4321/${base}`,
image: {
service: {
entrypoint: './src/avifImageService.mjs',
},
layout: "constrained",
responsiveStyles: true
},
markdown: {
processor: unified({
remarkPlugins: [[remarkWrapImagesWithOriginals, { base }]],
rehypePlugins: [
[rehypeAstroRelativeMarkdownLinks, { base, collectionBase: false }],
],
}),
},
vite: {
plugins: [
viteStaticCopy({
targets: [
{
src: 'src/content/docs/**/*.{jpg,jpeg,png,gif,webp,tiff,avif}',
dest: 'originals',
rename: { stripBase: 3}
},
],
}),
],
},
});
22 changes: 0 additions & 22 deletions book.toml

This file was deleted.

Loading
Loading