Wikipedia:Wikipedia Signpost/Templates/Single talk/doc

From Wikipedia, the free encyclopedia

You just transclude this on the talk page for the single issue. See Wikipedia talk:Wikipedia Signpost/Single/2022-11-28 for an example.

The entire source code for one of these talk pages should just be:

{{Wikipedia:Wikipedia Signpost/Templates/Single talk}}

Technical notes[edit]

Similar to Wikipedia:Wikipedia Signpost/Templates/Issue pageviews (which is itself transcluded at the end busted because graphs don't work).

The core of this is Wikipedia:Wikipedia Signpost/Templates/Article list maker, which uses Module:Signpost to fetch article lists from indices.

These indices are at places like Module:Signpost/index/2022. These indices are (as of December 2022) populated by User:Mr._Stradivarius/gadgets/SignpostTagger.

Another task of the article list maker is to apply custom formatting to the entries it gets, which it does here according to the template at Wikipedia:Wikipedia Signpost/Templates/Article list maker/Comment section.

One thing to note is that this template (Single talk) uses kind of an ugly hack to get the date out of the page name: {{#invoke:string|sub|{{PAGENAME}}|27|36}}. Essentially, it gets "2022-11-28" as a substring of {{PAGENAME}}, like this:

Wikipedia talk:Wikipedia Signpost/Single/2022-11-28
                        111111111122222222223333333
               123456789012345678901234567890123456
                                         ^        ^

This means that it will only work right on pages whose titles follow the exact format of "Wikipedia Signpost/Single/YYYY-MM-DD". This shouldn't be a problem, but it could become one, and I want you to know about this if it starts breaking for no reason.

Update: I fixed it, due to being a genius. Now it uses magic words, namely titleparts, to do this in a smart way: {{#titleparts:{{FULLPAGENAME}}|3|3}}

Wikipedia talk:Wikipedia Signpost/Single/2022-11-28
               1                  2      3
               ^                  ^      ^