Wiki source code of Choose the Right Location for a Page
Last modified by Eleni Cojocariu on 2026/11/23 12:59
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{warning}} | ||
| 2 | WIP | ||
| 3 | {{/warning}} | ||
| 4 | |||
| 5 | {{box cssClass="floatinginfobox" title="**Contents**"}} | ||
| 6 | {{toc/}} | ||
| 7 | {{/box}} | ||
| 8 | |||
| 9 | Every documentation page has one place in the tree: three steps give you that place, and the rules after them say what it may be. | ||
| 10 | |||
| 11 | All documentation must be located as [[children pages of the ##documentation## page>>xwiki:documentation.WebHome]]. | ||
| 12 | |||
| 13 | {{info}} | ||
| 14 | Adding documentation content directly under [["../Documentation/UserGuide/">>xwiki:Documentation.UserGuide.WebHome]], [["../Documentation/AdminGuide/">>xwiki:Documentation.AdminGuide.WebHome]], [["../Documentation/DevGuide/">>xwiki:Documentation.DevGuide.WebHome]], or in the [[Extensions wiki>>extensions:Main.WebHome]] is not recommended, as it contributes to the documentation that we are in the process of converting and refactoring to the new location. Documentation must be added under [["../documentation/">>xwiki:documentation.WebHome]] by following the documentation guide. | ||
| 15 | {{/info}} | ||
| 16 | |||
| 17 | == The Three Steps == | ||
| 18 | |||
| 19 | === Step 1: The Extension === | ||
| 20 | |||
| 21 | Every documentation page must be associated with an Extension and be located accordingly: | ||
| 22 | |||
| 23 | * **Bundled Extensions**: under ##documentation.xs##, the [[XWiki Standard>>xwiki:documentation.xs.WebHome]] tree. | ||
| 24 | * **Non-bundled Extensions**: under ##documentation.extensions##, the [[Extensions>>xwiki:documentation.extensions.WebHome]] tree, where the topic is the name of the extension. See "Extensions Documentation" below. | ||
| 25 | |||
| 26 | The association is done by [[Link Documentation Page to its extension>>doc:Community.DocGuide.PageStructure.LinkDocumentationPageExtension.WebHome]]. | ||
| 27 | |||
| 28 | === Step 2: The Audience === | ||
| 29 | |||
| 30 | Choose the audience the page is written for: | ||
| 31 | |||
| 32 | * ##user## (e.g., under [[User Documentation>>xwiki:documentation.xs.user.WebHome]]), | ||
| 33 | * ##admin## (e.g., under [[Administrator Documentation>>xwiki:documentation.xs.admin.WebHome]]), | ||
| 34 | * ##dev## (e.g., under [[Developer Documentation>>xwiki:documentation.xs.dev.WebHome]]). | ||
| 35 | |||
| 36 | === Step 3: The Topic === | ||
| 37 | |||
| 38 | Place the page under the topic it belongs to, an existing one whenever it covers the same subject. Create a new topic only if none fits. | ||
| 39 | |||
| 40 | * Every topic is a **functional domain**, not a part of the code. See below. | ||
| 41 | * **Topic pages**, the pages listed directly under User, Administrator or Developer Documentation, are the entry point of a topic. They must be [[explanation type>>doc:Community.DocGuide.Diataxis.ApplyDiataxis.WebHome||anchor="HExplanation"]] pages, with a title of three words at most. | ||
| 42 | * Inside the topic, **nest the page where it makes sense**: a page that describes the options or the consequences of another page, or that follows from it, should be placed as a child of that page. | ||
| 43 | |||
| 44 | == Functional Domains, Not Technical Domains == | ||
| 45 | |||
| 46 | Every topic page, and every subtopic below it, must be a **functional domain**. | ||
| 47 | |||
| 48 | === What a Functional Domain Is === | ||
| 49 | |||
| 50 | A functional domain is a part of XWiki **as the reader experiences it**: something they can name, want to do, or have to manage, without knowing how XWiki is built. It is named after what the reader does or manages, never after what implements it, and it gathers everything about that subject, whichever module, file or editor is involved. | ||
| 51 | |||
| 52 | It is **not** a part of XWiki as the developers built it: a module, an API, a storage mechanism, a configuration file, a step of the rendering pipeline. Those are **technical domains**: real, but not how a reader looks for a page, so not how the tree is organised. | ||
| 53 | |||
| 54 | |=Functional domains|=Technical domains | ||
| 55 | |Rights, Notifications, Attachments, Exports, Imports, Wiki Farms, Page Templates, Authentication, URLs, Keyboard Shortcuts, etc.|Store, Front-End, Async Rendering, Skin Extensions, XAR Module, Rendering Transformations, Component Manager, Configuration | ||
| 56 | |||
| 57 | === How to Tell Them Apart === | ||
| 58 | |||
| 59 | Ask one question: **why are these pages together?** | ||
| 60 | |||
| 61 | * "Because a reader looking for one of them would also look for the other" means a functional domain. Keep them together. | ||
| 62 | * "Because the same module, the same API or the same configuration file handles them" means a technical domain. Split them, and put each page with the feature it is about. | ||
| 63 | |||
| 64 | === Developer Topics === | ||
| 65 | |||
| 66 | For developers, a topic is a developer goal: write a macro, script pages, extend the UI. A topic **may** be named after a technical system when working with that system is the goal itself: //Java Components//, //REST API//, //Content Rendering//. Otherwise the system's pages, API references included, sit under the goal they serve and keep the technical term in their titles, so a search by name still finds them: //Skin Extensions// and //Templates// under //Looks & Feel//, //Async Rendering// under //Performance//. | ||
| 67 | |||
| 68 | === Examples: How the Regrouping Works === | ||
| 69 | |||
| 70 | Each row is a grouping named after how XWiki is built, and the domains its pages belong in instead. | ||
| 71 | |||
| 72 | |=Grouped under a technical name|=Its pages belong in|=Why | ||
| 73 | |Configuration|the feature being configured: URLs, Authentication, Language Configuration, Installation|Nobody wants to configure something in general: they want short URLs, LDAP authentication, or a second language | ||
| 74 | |Store|Performance, Backup and Restore, Installation|The store is how pages are saved. The reader arrives with a goal, a faster wiki or a backup, not with a storage layer | ||
| 75 | |Skin Extensions, Templates, Flamingo Skin|Skins, with the look and feel of the wiki|Three implementation mechanisms serving one reader goal: changing the way the wiki looks | ||
| 76 | |Rendering Transformations|the content and editing domain whose pages they change|The reader never sees the pipeline, only its effect on the page they are writing | ||
| 77 | |||
| 78 | **Is //Configuration// an allowed title?** Not on its own: no page may be titled just //Configuration//, because every feature has configuration, so the title says nothing about the subject. A title that names the feature is allowed, and is what the tree uses for the configuration pages under a feature: //Live Data Configuration//, //Distribution Wizard Configuration//, //Configuration Files//. The same reasoning applies to the other technical names in the table above. | ||
| 79 | |||
| 80 | == Merge Topics Readers Can't Tell Apart == | ||
| 81 | |||
| 82 | If a reader would hesitate between two topics, they are one topic. They **must** be merged, and the old ones made subtopics of the merged one. | ||
| 83 | |||
| 84 | **The test:** put the two names side by side and ask which one a reader with a question would click. If the answer is "either one", merge them. | ||
| 85 | |||
| 86 | The tree still contains such overlaps. They are illustrations of what to avoid, **not** a list of pending moves: | ||
| 87 | |||
| 88 | |=Documentation|=Topics that overlap today|=The one question they all answer|=Proposed example topic | ||
| 89 | |Developer|Skin, Skin Extensions, Flamingo Skin, Templates, Front-End, JavaScript|"how do I change the way the wiki looks"|Looks & Feel | ||
| 90 | |Administrator|Flamingo Themes, Skins, Icons, Panels|"how do I change the way the wiki looks"|Frontend | ||
| 91 | |||
| 92 | == When Two Domains Both Claim a Page == | ||
| 93 | |||
| 94 | Some subjects serve two domains at once. **If one shared page genuinely remains, put it where the thing is produced**, and link to it from the domain that consumes it. //XAR Format Specifications// sits under Exports, because that is where a XAR file comes from, and the import pages link to it. | ||
| 95 | |||
| 96 | == Keep at Most 20 Pages Directly Under a Page == | ||
| 97 | |||
| 98 | A page **should** have at most **20 direct children**. Past that, readers stop reading the tree and start guessing. | ||
| 99 | |||
| 100 | |=Applies to|=Rule | ||
| 101 | |User, Administrator and Developer Documentation|**Exempt.** They list every topic, and there is no limit on how many topics a wiki documents | ||
| 102 | |Any page of the documentation tree|**At most 20 direct children** | ||
| 103 | |A page whose children are one flat list with nothing to group them by|**May go over 20.** Never invent a grouping only to get under the number. Group **only** when the groups mean something to the reader, otherwise leave the list flat | ||
| 104 | |||
| 105 | === What to Do When a Topic Is Full === | ||
| 106 | |||
| 107 | A full topic **must not** push a page somewhere else. Being full means it needs subtopics: group its children into subtopics that are themselves functional domains, move each child under the one it belongs to, then place the new page. Moving a page out of its topic because the topic is full is how unrelated pages end up together. | ||
| 108 | |||
| 109 | == Don't Nest Pages Too Deeply == | ||
| 110 | |||
| 111 | A page **should** be at most 6 levels below User, Administrator or Developer Documentation. Deeper pages are hard to find. This is a **should**, not a must. Before adding a 7th level, check that the levels above the page are not artificial. Most pages that are too deep are deep because a level above them groups a kind of page rather than a subject. | ||
| 112 | |||
| 113 | == Extensions Documentation == | ||
| 114 | |||
| 115 | Under [[Extensions>>xwiki:documentation.extensions.WebHome]], the topic is the **name of the extension** rather than a functional domain, and the same extension appears as a top-level page in each audience it documents: under User, under Administrator and under Developer Documentation. Every other rule on this page applies unchanged. | ||
| 116 | |||
| 117 | == After the Location Is Chosen == | ||
| 118 | |||
| 119 | * Pay attention to the [[page name>>Community.DocGuide.ChooseRightLocation.PageTitlesNames.WebHome||anchor="HPageNames"]] strategy. | ||
| 120 | * See [[Documentation Navigation Panel>>doc:Community.DocGuide.DocumentationNavigationPanel.WebHome]] for how the pages of a level are ordered and pinned. |