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
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Working on the site

Read the superproject's `AGENTS.md` first. This file holds only what is
specific to this repository.
Read the superproject's `CODING-GUIDELINES.md` and its `AGENTS.md` first.
This file holds only what is specific to this repository.

- Pages are written in OpenUI Lang, under `pages/`.
- Components are React, each with its props validated by a zod schema: the
Expand Down
9 changes: 5 additions & 4 deletions pages/community.oui
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
// accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)

root = Page("Community: bring your C++ library to the web", "How to take part in webcpp: the rules for contributing, the rulebook every library keeps, and how to bring a C++ library to the web, a port or your own.", [intro, contributing, rulebook, bring])
root = Page("Community: bring your C++ library to the web", "How to take part in webcpp: the rules for contributing, the guidelines every library keeps, and how to bring a C++ library to the web, a port or your own.", [intro, contributing, rulebook, bring])

intro = Text("webcpp is open to C++, JavaScript, crypto and AI developers who build decentralized applications for the web. The same rules apply whatever agent system you use.")

contributing = Section("Contributing", [contributingText, contributingLink])
contributingText = Text("CONTRIBUTING.md gives the rules for contributors: what webcpp is, the rules every library keeps, how a change is made and reviewed, and how commits are written.")
contributingLink = Link("CONTRIBUTING.md", "https://github.com/webcpporg/webcpp/blob/main/CONTRIBUTING.md")

rulebook = Section("The rulebook", [rulebookText, rulebookLink])
rulebookText = Text("AGENTS.md is the rulebook for porting a library to webcpp, which coding agents and people follow alike: what a library builds on, how it is tested on every target, and how it is documented.")
rulebookLink = Link("AGENTS.md", "https://github.com/webcpporg/webcpp/blob/main/AGENTS.md")
rulebook = Section("The rulebook", [rulebookText, guidelinesLink, agentsLink])
rulebookText = Text("CODING-GUIDELINES.md holds the rules for porting a library to webcpp and every decision of its design, which coding agents and people follow alike: what a library builds on, how it is tested on every target, and how it is documented. AGENTS.md says how to work in the tree: the build, the lanes, the documentation and the releases.")
guidelinesLink = Link("CODING-GUIDELINES.md", "https://github.com/webcpporg/webcpp/blob/main/CODING-GUIDELINES.md")
agentsLink = Link("AGENTS.md", "https://github.com/webcpporg/webcpp/blob/main/AGENTS.md")

bring = Section("Bringing a library", [bringText, bringLink, issues])
bringText = Text("A library joins webcpp through an issue that proposes it: what it ports, or what it does, and why it belongs on the web.")
Expand Down
7 changes: 7 additions & 0 deletions test/pages_test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ test("the search page is a Google search restricted to the site", () => {
assert.match(form, /<input[^>]* type="search"[^>]* name="q"/)
})

test('the community page links the coding guidelines as the rules, beside CONTRIBUTING.md and AGENTS.md', () => {
const main = pageAt(out, 'community/').match(/<main>[\s\S]*<\/main>/)[0]
for (const file of ['CONTRIBUTING.md', 'CODING-GUIDELINES.md', 'AGENTS.md']) {
assert.ok(main.includes(`href="https://github.com/webcpporg/webcpp/blob/main/${file}"`), file)
}
})

test("every page carries its OpenUI Lang, and its body holds nothing but the shell and OpenUI's tree", () => {
for (const {file, path} of pages) {
const html = pageAt(out, path)
Expand Down