Skip to content

Commit 1ee76d3

Browse files
committed
Display docs.
1 parent ae394d8 commit 1ee76d3

18 files changed

Lines changed: 295 additions & 257 deletions

package-lock.json

Lines changed: 47 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"astro": "astro"
1111
},
1212
"dependencies": {
13+
"@astrojs/rss": "^4.0.14",
1314
"@astrojs/solid-js": "^5.1.2",
1415
"@shoelace-style/shoelace": "^2.20.1",
1516
"astro": "^5.6.1",

src/components/DocList.astro

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
import { getCollection } from "astro:content";
3+
4+
const articles = await getCollection("articles");
5+
const tutorials = await getCollection("tutorials");
6+
const howtos = await getCollection("howtos");
7+
const reference = await getCollection("reference");
8+
---
9+
10+
<aside class="hidden sm:block">
11+
<h1 class="mb-2 px-2 text-xs font-semibold uppercase tracking-wide">
12+
Documentation
13+
</h1>
14+
15+
<section>
16+
<h2 class="mb-2 px-2 text-xs font-semibold uppercase tracking-wide">
17+
Articles
18+
</h2>
19+
<ul class="mb-2 px-2 text-xs tracking-wide">
20+
{articles.map((d) => (
21+
<li><a href={`/docs/articles/${d.id}/`}>{d.data.title}</a></li>
22+
))}
23+
</ul>
24+
</section>
25+
26+
<section>
27+
<h2 class="mb-2 px-2 text-xs font-semibold uppercase tracking-wide">
28+
Tutorials
29+
</h2>
30+
<ul>
31+
{tutorials.map((d) => (
32+
<li><a href={`/docs/${d.slug}/`}>{d.data.title}</a></li>
33+
))}
34+
</ul>
35+
</section>
36+
37+
<section>
38+
<h2 class="mb-2 px-2 text-xs font-semibold uppercase tracking-wide">
39+
How-to guides
40+
</h2>
41+
<ul>
42+
{howtos.map((d) => (
43+
<li><a href={`/docs/${d.slug}/`}>{d.data.title}</a></li>
44+
))}
45+
</ul>
46+
</section>
47+
48+
<section>
49+
<h2 class="mb-2 px-2 text-xs font-semibold uppercase tracking-wide opacity-70">
50+
Reference
51+
</h2>
52+
<ul>
53+
{reference.map((d) => (
54+
<li><a href={`/docs/${d.slug}/`}>{d.data.title}</a></li>
55+
))}
56+
</ul>
57+
</section>
58+
</aside>

src/components/SocialIcons.astro

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
---
2-
import { siBluesky, siGithub, siDiscord, siYoutube } from "simple-icons";
2+
import { siBluesky, siGithub, siDiscord, siRss, siYoutube } from "simple-icons";
33
44
const icons = [
55
{ icon: siBluesky, url: "https://bsky.app/profile/rubinius.com" },
66
{ icon: siDiscord, url: "https://discord.gg/25GuZR4fBN" },
77
// { icon: siYoutube, url: "" },
88
{ icon: siGithub, url: "https://github.com/rubinius/" },
9+
{ icon: siRss, url: "/rss.xml" },
910
];
1011
---
1112

1213
<div class="flex gap-2 items-end">
1314
{icons.map(({ icon, color, dark, url }) => (
14-
<a class="text-fg/60 rounded-sm hover:text-fg/100 hover:ring-1 hover:p-1 hover:ring-accent/60" href={url}>
15-
<svg fill="currentColor" viewBox="0 0 24 24" aria-label={icon.title} width="24" height="24">
15+
<a class="rounded-full ring-1 p-1.5
16+
bg-bg text-fg/60
17+
transition-colors
18+
hover:bg-fg hover:text-bg
19+
hover:ring-accent/60"
20+
href={url}>
21+
<svg fill="currentColor" viewBox="0 0 24 24" aria-label={icon.title} width="20" height="20">
1622
<path d={icon.path} />
1723
</svg>
1824
</a>

src/content/config.ts

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
import { defineCollection, z } from 'astro:content';
2+
import { glob } from "astro/loaders";
23

3-
const docs = defineCollection({
4-
type: "content",
5-
schema: z.object({
6-
title: z.string(),
7-
tags: z.array(z.string()).optional(),
8-
order: z.number().optional(),
9-
}),
4+
const docsSchema = z.object({
5+
title: z.string(),
6+
tags: z.array(z.string()).optional(),
7+
order: z.number().optional(),
108
});
119

1210
const blog = defineCollection({
13-
type: "content",
11+
loader: glob({ pattern: "**/*.mdoc", base: "./src/content/blog" }),
1412
schema: z.object({
1513
title: z.string(),
1614
subtitle: z.string().optional(),
@@ -22,7 +20,30 @@ const blog = defineCollection({
2220
}),
2321
});
2422

23+
const articles = defineCollection({
24+
loader: glob({ pattern: "**/*.mdoc", base: "./src/content/docs/articles" }),
25+
schema: docsSchema,
26+
});
27+
28+
const tutorials = defineCollection({
29+
loader: glob({ pattern: "**/*.mdoc", base: "./src/content/docs/tutorials" }),
30+
schema: docsSchema,
31+
});
32+
33+
const howtos = defineCollection({
34+
loader: glob({ pattern: "**/*.mdoc", base: "./src/content/docs/howtos" }),
35+
schema: docsSchema,
36+
});
37+
38+
const reference = defineCollection({
39+
loader: glob({ pattern: "**/*.mdoc", base: "./src/content/docs/reference" }),
40+
schema: docsSchema,
41+
});
42+
2543
export const collections = {
26-
blog: blog,
27-
docs: docs,
44+
blog,
45+
articles,
46+
tutorials,
47+
howtos,
48+
reference,
2849
};

src/content/docs/articles/the-rubinius-build-system.mdoc

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: The Rubinius Build System
2+
title: The Build System
33
---
44

55
## A Little History
@@ -43,6 +43,24 @@ system just must do it its own way, it can remix easily and safely.
4343
The rest of this article explains in detail how the Rubinius build system
4444
works.
4545

46+
Scale:
47+
48+
1. Large galaxy: Linux;
49+
1. Small galaxy: LLVM;
50+
1. Solar system: Rubinius;
51+
1. Jupiter-sized planet: rbx compiler;
52+
1. Earth-sized planet: Ruby core library;
53+
1. Large mountain on earth: A library like OpenFHE;
54+
1. Big hill: A library like libasio;
55+
1. A large rock: Python PEG parser;
56+
1. A smaller rock: CLI11 command line libray.
57+
58+
Anything the size of a rock should be a separately-buildable package, and anything larger than a rock should only be a composition of such packages.
59+
60+
Every biological system is a collection of well-bounded components, most of them microscopic. Only humans, in their infinite "wisdom" conjure something like Bazel.
61+
62+
Why would anyone want to install Java to build a C/C++ library?
63+
4664
## Setting Boundaries
4765

4866
Some reasons to put a component in its own repository:
@@ -54,3 +72,23 @@ Some reasons to put a component in its own repository:
5472
* It has particular testing or security concerns;
5573

5674
**( This document is a draft work-in-progress. )**
75+
76+
```
77+
make help
78+
Usage:
79+
make <target>
80+
81+
Dependencies
82+
setup Clone all components
83+
config Configure
84+
85+
Development
86+
build Build all components
87+
88+
Testing
89+
test Run the tests
90+
91+
Maintenance
92+
clean Remove all build artifacts
93+
help Display this help
94+
```
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: The Roadmap
3+
---
4+
5+
These are the current milestones organized by GitHub repository:
6+
7+
* **[rubinius/compiler-ng](https://github.com/rubinius/compiler-ng)**
8+
* [1a: LLVM end-to-end compiler](https://github.com/rubinius/compiler-ng/milestone/1)
9+
* [1b: Language interface to the compiler](https://github.com/rubinius/compiler-ng/milestone/2)
10+
* [3a: Tier-1 JIT](https://github.com/rubinius/compiler-ng/milestone/3)
11+
* [3b: Language interface to the JIT](https://github.com/rubinius/compiler-ng/milestone/4)
12+
* [4: Language updates](https://github.com/rubinius/compiler-ng/milestone/5)
13+
* [10: Tier-N JIT](https://github.com/rubinius/compiler-ng/milestone/6)
14+
15+
* **[rubinius/rubinius](https://github.com/rubinius/rubinius)**
16+
* [2: Rubinius build system & GitHub Actions](https://github.com/rubinius/rubinius/milestone/6)
17+
* [5: Rubygems+Bundler running](https://github.com/rubinius/rubinius/milestone/7)
18+
* [6: Ruby core library passing specs](https://github.com/rubinius/rubinius/milestone/8)
19+
* [7: Ruby standard library passing specs](https://github.com/rubinius/rubinius/milestone/9)
20+
* [8: Metasploit passing specs](https://github.com/rubinius/rubinius/milestone/10)
21+
* [9: Rails and Hanami passing specs](https://github.com/rubinius/rubinius/milestone/11)

src/content/docs/index.mdx

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/lib/blog.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export async function getBlogList(): Promise<Array<{ title: string; path: string
3030
posts.sort(cmpBlog);
3131
return posts.map((p) => ({
3232
title: p.data.title,
33-
path: `/blog/${p.slug}/`,
33+
path: `/blog/${p.id}/`,
3434
}));
3535
}
3636

0 commit comments

Comments
 (0)