31. Documentation and guides
They are two different things, on two different screens:
- Documentation (
?tab=docs, Help → Documentation): two entries with the same design, a contents list with search and full-width content. For developers shows the complete reference, this very document; nothing replaces it: neither a guide nor a summary. For users showsdocs/BuilderOS-Usuarios.md, the manual for people who don’t code. - Setup guide (
?tab=setup, Help → Setup guide, chapter 30): opens the 4-step first run; with&view=all, the full guide, with the steps that really check the site and, in each, its “How it’s done”.
Inside the zip the documents go as docs/<nombre>.md.php, so they can’t be opened by URL. They are always read with Builder_OS::doc_contents(), and the specification is downloaded with admin-post.php?action=bos_spec_download. The build fails if a PHP file uses a direct path to docs/*.md, and the release test checks on the real zip that Documentation shows the contents without guides, that the download works and that the guides are in the Setup guide.
The two views. They are chosen with ?tab=docs&vista=desarrolladores or &vista=usuarios (they are links: they can be opened in another tab), developers by default. The server only reads and paints the document of the chosen view. The last one chosen is remembered in a desktop cookie (bos_docs_vista), without depending on it. “Copy prompt for the AI”, “Download specification” and “Update a site” go in the developers view; the users view links to the Setup guide.
Reading. The content card takes all the space to the right of the contents list, at any size, and this screen doesn’t have the 1600 px cap of the rest of the panel. Inside, the text goes in a single centered column of about 760 px (.bos-docs__main, 16 px text and 1.75 line height), with no text columns or anything in parallel: the .bos-doc-flow system was removed because it forced you to read going up and down. Each chapter (h2) opens with a soft 1 px rule and each h3 leaves plenty of air above it. Tables and code are read in the column and, if they don’t fit, scroll horizontally; infographics take the column’s width, below their text. To the right of the column, “On this page” (.bos-docs__rail, fixed on scroll) lists the h3s of the chapter being read, marks the current one and takes you to each on click; a small IntersectionObserver in builder-os-admin.js drives it, it holds up with hundreds of sections, it hides if the card is narrower than 980 px (900 px of content) (the column stays centered) and without JavaScript the page reads just the same. The card is a container: what’s inside responds to its width, not the window’s.
Icons. Builder_OS_Markdown::icon_for() picks the icon for each contents entry, the title and the chapters by title keywords, from the most specific to the most general; a section with no match inherits its chapter’s. A new chapter gets a coherent one without maintaining any list. The strokes are those of Builder_OS_Shell::icon(); the page carries a single copy of each (sprite()) and each entry references it with <use>.
Infographics. The files are docs/img/<nombre>.svg and their stacked mobile version, docs/img/<nombre>-movil.svg, and they are the same source for the plugin and the web. They are referenced from the document with standard Markdown: a paragraph that explains the idea and, below, on its own line, . Only that exact form is accepted: no other paths or external URLs.
- In the plugin they go inline: sanitizing (
wp_kses_post) stays just as strict andBuilder_OS_Markdown::embed()swaps the marks for the SVG after sanitizing, with the name validated. That way they follow the panel’s theme and accent color, because their colors are the--bos-c-*tokens. - Standalone (by their URL or on the web) they use the colors of their own
<style>, light or dark according to the system. On a website, the stacked version is chosen for mobile with<picture>. - Responsive: below 720 px of card width the stacked version shows; above it, the wide one, always at the column’s width and below its paragraph.
- All are real text, with no scripts, links, gradients or images, and every figure comes from this document or from the code.
Checklist (Documentation and guides).
- Documentation shows the two views, each with its full contents list and its content, without guides, on the built zip.
- “Download specification” downloads the entire document.
- The Setup guide shows the three guides and their mockups below the steps, in light and dark.
- Each contents entry carries a matching icon, also aligned on two-line titles.
- The content card reaches the right edge from 1280 to 2560 px, without overflowing; the text goes in a single column of about 760 px with “On this page” to its right (which hides in narrow cards), without
.bos-doc-flow, and on mobile the infographics show stacked and legible. - The top bar really blurs what passes underneath (no bar element carries
view-transition-name), in light and dark. - In Plugins, BuilderOS’s automatic updates show as off (its own switch) and the “Active” switch on the right isn’t confused with them.
- Each infographic looks right in light and dark, opens by its URL and has its alternative text and its neighboring paragraph.