Skip to content
Open

V2 #40

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
22 changes: 20 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
*~
_build
# 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
20 changes: 0 additions & 20 deletions Makefile

This file was deleted.

47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Capabilities for coders

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

This is the repository for Capabilities for coders;

This project is build with [starlight](https://starlight.astro.build/), which is an extension for [astro](https://astro.build/).

---

# Building and deploying

### Prerequisites:

To build this site you will need:

1. an installation of nodejs (version 18, 20 or later). I recommend using [NVM](https://github.com/nvm-sh/nvm) to set this up.
2. a JS package manager. This project has been written with [pnpm](https://pnpm.io/installation).

To deploy it, you will need to configure a web server such as apache or nginx to serve the static build files. By default, these will all be generated in `./build/`

### Installing capabilities for coders

Astro is a static site generator; It generates static files which can be served with any regular web server. To build this project:

1. clone the repo
2. install the dependencies
3. build the site

```sh
git clone https://github.com/jeremysinger/capabilitiesforcoders.git
cd capabilities-for-coders-v2
pnpm install
pnpm build
```

---

## Project Structure

Broadly, this site covers CHERI, Morello, and CHERI-BSD. We also have a separate category for common compilers warnings or errors. A folder for each of these can be found in `src/content/docs`; each markdown file will automatically be converted into a corresponding webpage.

In order to get the page to appear on the sidebar for site navigation, you also need to modify the sidebar configuration in `astro.config.mjs`. This should be fairly self explanatory, but check the starlight docs if you need clarification.

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.
7 changes: 0 additions & 7 deletions README.txt

This file was deleted.

Binary file removed _static/gfx/logo.png
Binary file not shown.
5 changes: 0 additions & 5 deletions _templates/layout.html

This file was deleted.

17 changes: 0 additions & 17 deletions about.rst

This file was deleted.

91 changes: 91 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
import starlightLinksValidator from "starlight-links-validator";
import rehypeMermaid from "rehype-mermaid";

// https://astro.build/config
export default defineConfig({
markdown: {
rehypePlugins: [[rehypeMermaid, { strategy: "pre-mermaid", dark: true }]],
},
site: "https://capabilitiesforcoders.com",
integrations: [
starlight({
head: [
{
tag: "script",
attrs: { type: "module" },
content:
"import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs'; mermaid.initialize({ startOnLoad: true });",
},
],
title: "Capabilities for Coders",
logo: { src: "./src/assets/cherry_bakewell.png" },
favicon: "/favicon-32x32.png",
social: {
github: "https://github.com/JakeTrevor/capabilities-for-coders-v2",
},
editLink: {
baseUrl:
"https://github.com/JakeTrevor/capabilities-for-coders-v2/edit/main",
},
plugins: [starlightLinksValidator()],
sidebar: [
{
label: "Cheri",
items: [
"cheri/what-is-cheri",
"cheri/capabilities",
{
collapsed: true,
label: "Compiling for CHERI",
items: [
"cheri/compiling/cross-compiling",
"cheri/compiling/purecap",
"cheri/compiling/hybrid",
],
},
"cheri/running",
"cheri/header",
"cheri/purecap-and-hybrid",
"cheri/printf",
"cheri/purposes_of_sealed_capabilities",
"cheri/how_to_seal",
"cheri/setbounds",
"cheri/tagcheck",
],
},
{
label: "Morello",
items: [
"morello/get-a-board",
"morello/how_to_tell_morello",
"morello/teardown",
"morello/python",
"morello/compartmentalisation",
"morello/benchmark_abi",
],
},
{
label: "CheriBSD",
items: [
"cheri-bsd/installing_gdb",
"cheri-bsd/compile_on_freebsd",
"cheri-bsd/configure_networking",
"cheri-bsd/hardware_performance_counters",
"cheri-bsd/ldpreload",
"cheri-bsd/shared_library_path",
],
},
{
label: "Warnings and Errors",
items: [
"warnings-and-errors/capability_misuse",
"warnings-and-errors/implicit_conversion",
"warnings-and-errors/unclear_provenance",
],
},
],
}),
],
});
9 changes: 0 additions & 9 deletions capabilities/index.rst

This file was deleted.

166 changes: 0 additions & 166 deletions capabilities/stack_overflow.rst

This file was deleted.

Loading