Template talk:Documentation
| This is the talk page for discussing improvements to the Documentation template. |
|
| Archives: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10Auto-archiving period: 3 months |
| Template:Documentation is indefinitely protected from editing as it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
| To help centralize discussions and keep related topics together, all talk pages of subtemplates, and Module talk:Documentation, redirect here |
| This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||
| ||||||||
| Text has been copied to or from this page; see the list below. The source pages now serve to provide attribution for the content in the destination pages and must not be deleted as long as the copies exist. For attribution and to access older versions of the copied text, please see the history links below. |
Show improve documentation if doc doesn't exists?
[edit]Should this template be modified to show {{improve documentation}} by default to templates/modules that doesn't have a documentation? This will auto list the template/modules to Category:Templates with missing or incorrect documentation, which is useful for tracking and fixing. Nvdtn19 (talk) 05:39, 2 December 2025 (UTC)
- I support this. All templates should have documentation, even if it's something basic like "see the parent template for detailed information". What seems obvious to the creator of the template, might not be to others who encounter it and might not be 10 years down the road to no one. Gonnym (talk) 13:56, 2 December 2025 (UTC)
- That said, there are cases where the documentation is in the body of template and not a /doc page, such as navboxes that use {{Navbox documentation}} or WikiProject banners that use the auto generated documentation. Those cases should be tested to make sure they don't fill up the category. Gonnym (talk) 13:59, 2 December 2025 (UTC)
- Of course, {{improve documentation}} will only shows if the namespace is template/module, and if the template which is transcluding {{documentation}}, does not have any documentation. The viwiki version of this template have already implemented this feature, you can see some demo:
- w:vi:Bản mẫu:!w (with no /doc, no
|content=, and no auto-generated doc. Thus it's showing {{improve documentation}}) - w:vi:Bản mẫu:Brackets (with inline
|content=) - w:vi:Bản mẫu:Valve (with {{Navbox documentation}} transcluded)
- w:vi:Bản mẫu:Sơ khai (with auto-generated doc from module).
- w:vi:Bản mẫu:!w (with no /doc, no
- If this change are also considered useful here then I'll suggest some changes, but I'll have to test first. Nvdtn19 (talk) 14:45, 2 December 2025 (UTC)
- Of course, {{improve documentation}} will only shows if the namespace is template/module, and if the template which is transcluding {{documentation}}, does not have any documentation. The viwiki version of this template have already implemented this feature, you can see some demo:
- That said, there are cases where the documentation is in the body of template and not a /doc page, such as navboxes that use {{Navbox documentation}} or WikiProject banners that use the auto generated documentation. Those cases should be tested to make sure they don't fill up the category. Gonnym (talk) 13:59, 2 December 2025 (UTC)
- I'm wondering if it wouldn't be better setting this up as a bot task to allow for a gap between the template creation process and building documentation. I know I've created a number of templates by starting off with a basic functioning and the standard
<noinclude> {{documentation}} </noinclude>ending knowing that I won't be able to build documentation until I'm done working out all the kinks and details in the code, but having that blank documentation section reminds me to come back to instructions once I've finished programming. I would hate to have overzealous gnomes coming in to try to figure out my template while I'm still fixing bugs because it ended up in a tracking category prematurely. At least if a bot were coming in, I'd be able to remove{{improve documentation}}once it got added if things weren't ready for that step yet. VanIsaac, GHTV contrabout 17:32, 2 December 2025 (UTC)- Ideally, if your template still has kinks in it, start it in your userspace or draft space (or /sandbox if it is one). We shouldn't be placing a non-functioning template in the "live" template space. Gonnym (talk) 17:57, 2 December 2025 (UTC)
- I agree with Gonnym. Don't expect unfinished things that is outside the sandbox can't be touched by others. I don't understand why it would be disruptive when {{improve documentation}} is present on templates that lacks documentation, while it clearly reflects the actual situation? So if the project currently has 10,000 templates without documentation, we have to deploy a bot just to add {{improve documentation}} to those 10,000 pages, while a better one-time methods exists? If you don't want your template be flagged, better start it in your sandbox, or not adding {{documentation}} until there is one. Nvdtn19 (talk) 05:35, 3 December 2025 (UTC)
- So, who's gonna implement this in the sandbox? FaviFake (talk) 15:54, 17 December 2025 (UTC)
- Yes, well that's just the thing, isn't it? Almost nothing operates on a platonic ideal. While I am more than willing, and have frequently built templates in userspace, that's not something that everyone would even think to do, let alone a well-known operating procedure that people follow to any extent. While we do have the draft namespace for articles, there's really no policy for anything but new accounts to even build any content in their private userspace as a matter of course. The point is that when dealing with seemingly simple templates, drafting in userspace and moving into the template namespace is usually more hassle than is warranted, but that doesn't prevent the intricacies of template logic from biting us from time to time. So I reiterate that I would think a parameter for empty documentation that is supported by a maintenance bot would be a more robust option for accomplishing the task. VanIsaac, GHTV contrabout 18:23, 17 December 2025 (UTC)
- I agree with Gonnym. Don't expect unfinished things that is outside the sandbox can't be touched by others. I don't understand why it would be disruptive when {{improve documentation}} is present on templates that lacks documentation, while it clearly reflects the actual situation? So if the project currently has 10,000 templates without documentation, we have to deploy a bot just to add {{improve documentation}} to those 10,000 pages, while a better one-time methods exists? If you don't want your template be flagged, better start it in your sandbox, or not adding {{documentation}} until there is one. Nvdtn19 (talk) 05:35, 3 December 2025 (UTC)
- Ideally, if your template still has kinks in it, start it in your userspace or draft space (or /sandbox if it is one). We shouldn't be placing a non-functioning template in the "live" template space. Gonnym (talk) 17:57, 2 December 2025 (UTC)
- I support this. Checking if a page or template parameter is empty is a perfect task for a template/bot. FaviFake (talk) 17:41, 2 December 2025 (UTC)
Documentation template source code
[edit]Can someone provide me with the source code for this template? I'd like to use it on my own wiki. Thanks! ~2025-38484-04 (talk) 16:49, 6 December 2025 (UTC)
- You can click "view source" at the top of the page to see the source code. You also need to copy the source code of Module:Documentation and the other dependencies listed on the top right corner of that page. * Pppery * it has begun... 20:20, 6 December 2025 (UTC)
Edit request 19 April 2026 for Template:Documentation/preload's doc
[edit]This edit request to Template:Documentation/preload has been answered. Set the |answered= parameter to no to reactivate your request. |
Description of suggested change:
A clean up to move the documentation of Template:Documentation/preload to the preexisting Template:Documentation/preload/doc. The proposed change is now at Template:Documentation/preload/sandbox, which was to replace and append {{subst:doc-code}}. Thank you.
Diff:
| − | <noinclude><!--
This code must be kept in sync with that at [[Wikipedia:Template documentation#How to create a documentation subpage]].
--></noinclude>{{Documentation subpage}}
== Usage ==
<include<includeonly></includeonly>only>{{Sandbox other||
<!-- Categories below this line -->
}}</include<includeonly></includeonly>only><noinclude>
| + | <noinclude><!--
This code must be kept in sync with that at [[Wikipedia:Template documentation#How to create a documentation subpage]].
--></noinclude>{{Documentation subpage}}
== Usage ==
<include<includeonly></includeonly>only>{{Sandbox other||
<!-- Categories below this line -->
}}</include<includeonly></includeonly>only><noinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage and add interwikis to Wikidata -->
</noinclude> |
— Peterwhy (talk) 04:48, 19 April 2026 (UTC)
- Support FaviFake (talk) 10:18, 19 April 2026 (UTC)
- I note "preexisting" is a bit misleading. The page was created as a redirect in 2013 (unclear why) but apparently never used (the creation came after Special:Diff/582650318 and Special:Diff/582650843), and you just now un-redirected it to make this edit request. For such a simple page as this, I can't see why anyone would usefully be changing the documentation. 🤷 Anomie⚔ 14:21, 19 April 2026 (UTC)
- Template:Documentation/preload currently mentions
The above documentation is transcluded from Template:Documentation/preload/doc. (edit | history)
at the bottom, which is the misleading part I noticed. - I undid my Special:Diff/1349843522 back to the redirect. Now I wonder why a simple Template:Documentation/preload would have a complicated and long doc Template:Documentation/preload/doc.
- Since Special:Diff/1075652576 which introduced a doc in content, the summary
documentation is centralised
from Special:Diff/582650318 was no longer true. - Template:Documentation/preload even has a comment
This code must be kept in sync with that at Wikipedia:Template documentation#How to create a documentation subpage.
which can be in the documentation visibly. - From the doc Template:Documentation/doc (and even Template:Documentation/preload/doc), a purpose of {{documentation}} is that
Use of this template allows templates to be protected, where necessary, while allowing anyone to edit the documentation and categories.
Here the preload template is protected, but its doc needs not be.
- Template:Documentation/preload currently mentions
- — Peterwhy (talk) 20:08, 19 April 2026 (UTC)
- Apparently
{{Documentation|content=stuff}}still links the subpage if it exists, even if it's not being used. That seems like a bug to me. Anomie⚔ 21:24, 19 April 2026 (UTC) - Is this request still open, now that you have restored the redirect? — Martin (MSGJ · talk) 13:00, 23 April 2026 (UTC)
- Yes, and I would redo the documentation move to Template:Documentation/preload/doc after this request. I undid Special:Diff/1349843522 to avoid misleading anyone. — Peterwhy (talk) 18:27, 23 April 2026 (UTC)
- Apparently
- I agree with Anomie here; this is a lot of effort amounting to a solution in search of a problem. * Pppery * it has begun... 16:48, 24 April 2026 (UTC)
- I don't see "a lot of effort". This is just what we as a matter of course on every single other template ... — Martin (MSGJ · talk) 18:15, 11 May 2026 (UTC)
- The reason we put documentation on a subpage is to allow editors to maintain it without protection. That rationale is no different on this template, so I intend to action this request, unless there is a substantive objection which I haven't yet seen — Martin (MSGJ · talk) 18:14, 11 May 2026 (UTC)
- Yeah i think you can go ahead :) FaviFake (talk) 04:22, 12 May 2026 (UTC)
- I'm having second thoughts. Just realised we are talking about documentation for a subtemplate ... can this not just be included in Template:Documentation/doc? Does very subtemplate really need its own documentation? — Martin (MSGJ · talk) 08:02, 12 May 2026 (UTC)
- I suppose the respective /doc pages should also describe their usages. Template:Documentation/doc is for a template that
should not be substituted.
Template:Documentation/preload mentionsThis is a preloaded template used in Module:Documentation.
and is in Category:Wikipedia preloaded templates. Apart from that, sure Template:Documentation/preload/doc can have a main page link to Template:Documentation/doc, in addition to the< Template:Documentation (| preload)
links at the top. — Peterwhy (talk) 07:48, 13 May 2026 (UTC) - Though my above comment is about the content of the doc of the preload, replying to whether it
really need[s] its own documentation
. The proposed change is about where to place the doc text, in a less-protected /doc page. — Peterwhy (talk) 10:06, 13 May 2026 (UTC)- I suggesting that Template:Documentation/preload/doc be merged into Template:Documentation/doc — Martin (MSGJ · talk) 11:03, 13 May 2026 (UTC)
Done — Martin (MSGJ · talk) 14:00, 15 May 2026 (UTC)
- I suppose the respective /doc pages should also describe their usages. Template:Documentation/doc is for a template that
- I'm having second thoughts. Just realised we are talking about documentation for a subtemplate ... can this not just be included in Template:Documentation/doc? Does very subtemplate really need its own documentation? — Martin (MSGJ · talk) 08:02, 12 May 2026 (UTC)
- Yeah i think you can go ahead :) FaviFake (talk) 04:22, 12 May 2026 (UTC)
Adding Template:No documentation and attempting Lua auto documentation with Template:Lua autodoc if the module has no documentation
[edit]I updated the module sandbox and testcases with two changes, one that adds {{no documentation}} to templates and modules when no documentation is specified in the content field of the template or module, and the other attempts to add Lua auto documentation if the module does not have documentation present.
I did garner feedback at Wikipedia:Village_pump_(technical)/Archive_215#Thoughts_on_Docbunto? about a year and a half ago but it mostly has been abandoned. The autodoc module is still in beta and is wrapped in pcall so even if it gets used here it may only need semi or XCON protection for now.
If there are no objections over the coming days I'll open an edit request. Aasim (話す) 15:20, 3 June 2026 (UTC)