Template talk:Script doc auto
![]() | To help centralize discussions and keep related topics together, Template talk:Script doc/core redirects here. |
About ((script doc))
For the discussion that lead to the creation of this template see MediaWiki talk:Clearyourcache#Script documentation.
1: I have done some more thinking and I think we can let this template do its detection in all namespaces. Since for the .css and .js pages in MediaWiki space we usually don't have a doc page anyway. And if people start to add doc pages there then it would be convenient to have this template link to them too. (Well, we should not add doc pages in MediaWiki space for performance reasons, but redirects to doc pages are probably okay there.)
2: A possible extension of this template would be to detect if for instance a .js page has an accompanying .css page. Then it could output something like this:
![]() | This script seems to have a documentation page at User:Davidgothberg/clock and an accompanying .css page at User:Davidgothberg/clock.css. |
And when there is no doc page but only an accompanying .css page:
![]() | This script seems to have an accompanying .css page at User:Davidgothberg/clock.css. |
A funny but useful "side effect" would be that MediaWiki:Common.css and MediaWiki:Common.js would then automatically link to each other. If we don't want that then we can of course modify this behaviour in the MediaWiki space.
3: We could show the editnotice of a script, above the script. But if we do that, then we should probably only do it for MediaWiki space. See for instance MediaWiki:Common.css and its editnotice Template:Editnotices/Page/MediaWiki:Common.css. For all other spaces we should probably just link to the documentation for the script. Otherwise people might start to use the editnotice as the documentation page for the script, which would be weird.