Repository navigation
docs: restructure the guide into six parts - #112
Merged
Merged
Conversation
Deploying dang with
|
| Latest commit: |
7e6fca0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://dfae0651.dang-3kk.pages.dev |
| Branch Preview URL: | https://docs-content-restructure.dang-3kk.pages.dev |
The guide was 26 flat top-level chapters mixing three altitudes — mental-model pages, topic pages, and pure reference — which made a small language look sprawling. Nest the chapters under six parts that teach the shape of the language by themselves: Start, The language, Types, GraphQL, Data, and Reference. Each part is a stub page with a framing sentence and a contents block; lit/ directories mirror the parts. The part slugs take #types and #graphql, so those chapters are renamed to #nullability and #interop (refs updated). The landing TOC already renders two levels, which now means parts and chapters; the sidebar gains part group headers that link to the stub pages. Signed-off-by: Alex Suraci <[email protected]>
Backtick template behavior was documented twice — once as lexer-mode notes in Syntax, once as a literal kind in Literals — and the two pages were each too small to stand alone. Fold the literal kinds into Syntax as a "Literals" section (keeping the #literals anchor), with the three string flavors presented side by side and the backtick details stated once. Signed-off-by: Alex Suraci <[email protected]>
Flow-sensitive narrowing is the second half of the nullability story: the type system tracks null in the types, and narrowing is how code discharges it without casts. Fold the flow-typing chapter into Types and nullability as a "Flow-sensitive narrowing" section, placed right after null propagation so the null story reads start to finish. The #flow-typing anchor moves to the section, so existing references keep resolving. Signed-off-by: Alex Suraci <[email protected]>
The two chapters were already entangled: a zero-arity function is a field with a body, the declaration-by-shape rule defines both, and each page deferred to the other for half its story. Merge them into "Fields and functions" — the field concept and shape rule first, then the function-specific material (zero-arity, arguments and defaults, &fn references). The #fields and #functions anchors move to sections, so existing references keep resolving. Docstrings and forward references, which applied to both, are now stated once. Signed-off-by: Alex Suraci <[email protected]>
Inline fragments had two substantial near-duplicate treatments, one in Interfaces and unions and one in GraphQL interop. They are selection syntax, so GraphQL interop now owns the full coverage — the unique details from the interfaces chapter (unselected-field compile error, type conditions resolving against the schema, nesting, the lazy-form specifics) move there — and Interfaces and unions keeps a one-example pointer. Signed-off-by: Alex Suraci <[email protected]>
The full break/continue semantics were specified twice, in Blocks and in Control flow. Control flow already owned the canonical version (targets, yielded values, .map/.each behavior, typecheck errors), so trim the Blocks "control-flow handoff" section to the block-specific wrinkles — return unwinding the enclosing function, nested functions not inheriting the target, and expired-block errors — with a pointer for the rest. Signed-off-by: Alex Suraci <[email protected]>
The playground page sat at the top level even though it exists to demo GraphQL interop. Move it under the GraphQL part as its own chapter, retitled from "GraphQL + Dang playground" to "GitHub playground" now that the part name carries the GraphQL context, and mention the live playground in the part's framing. Signed-off-by: Alex Suraci <[email protected]>
vito
force-pushed
the
docs-content-restructure
branch
from
June 11, 2026 17:19
11e9df5 to
887b140
Compare
A two-chapter part was structural overhead: Getting started is the front door and reads better as the first top-level entry, and the mental-model overview is a natural opener for The language rather than a chapter of its own. Getting started moves back to the top level; the overview content becomes the body of The language part page (as bold lead-ins, since headings on a split-sections page would split into their own pages). The sidebar now renders non-split top-level entries as a bare header link, and the [#overview] ref in Getting started points at [#language]. Signed-off-by: Alex Suraci <[email protected]>
The overview content sat on The language part page as bold lead-ins — an awkward middle ground between prose and structure. Promote it to two proper leading chapters: "Design philosophy" (which also absorbs the deliberate omissions — what the language refuses to have is philosophy too) and "What's distinctive" (which gains the built-in assert bullet and the runtime-model Meta). The "how a program is shaped" bullets near-duplicated Syntax's file-layout section, so they fold in there. The sections are include files rather than body headings because an include-section call after a markdown heading nests under that heading. Signed-off-by: Alex Suraci <[email protected]>
"What's distinctive" was weird as a standalone chapter — the distinctives are downstream of the philosophy, not a separate topic. Fold it into Design philosophy so the page reads as one arc: principles, then "Deliberately missing" (what they rule out), then "The philosophy, applied" (what they produce — the distinctives list, each bullet linking to the chapter that owns it). Signed-off-by: Alex Suraci <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restructures the docs from 26 flat top-level chapters into Getting started + 5 parts / 23 chapters, per the discussion about the landing page betraying the "small, easy-to-learn language" pitch. Since we're in early draft phase, URLs were freely broken in favor of the best end-state names. Rebased on main (theme-rotation work).
Structure
Each part is a stub page with a framing intro and its own contents block; the
lit/tree mirrors the parts. The part slugs took#typesand#graphql, so those chapters were renamed to#nullabilityand#interop(all refs updated). The GitHub playground lives under the GraphQL part, retitled "GitHub playground". The former "Language overview" chapter dissolved into The language part: a single "Design philosophy" chapter (principles → "Deliberately missing" → "The philosophy, applied", carrying the distinctives) leads the part, and the "how a program is shaped" bullets folded into Syntax's file-layout section, which they near-duplicated.Mergers (the artificial seams)
#flow-typinganchor is preserved as a section.#fields/#functionsanchors preserved as sections; docstrings and forward references stated once.Mutation, Blocks, and Errors deliberately stay as their own pages — each is one mental-model lesson with a linkable URL.
Duplication ownership fixes
Rendering
🤖 Generated with Claude Code