About/How Indexing Works

Or "Everything you ever wanted to know about indexing but were afraid to ask."

You have seen those blue bars that provide next and previous links regarding a certain concept at the bottom of most articles. You are wondering where they come from, or how you could put a page on that conceptual pathway, or remove stuff that doesn't belong there. Here's a step by step guide on how to get a new paged index:


 * 1) Find a suitable index to add the page to.
 * 2) Add your entry in the alphabetical list (the definite article "the" is ignored for these purposes) onto that page along with a simple description of the page.
 * 3) ????
 * 4) Profit.

Some wiki pages have been marked as being an index. This is done on the Tools menu on the left side of the page. There is a button labeled "Set Page Type." Setting it from index to one of the other selections un-does it. A page will only act as an index if this mark is set, regardless if it has index markup.

When an index page is saved, the system looks though the page and extracts all the line items (all the lines that start with an asterisk). It goes through those lines and extracts the first link to a wiki page on that line. After this process goes through all the line items, we have a list of page titles in the order given on the index page. This is the index. We save it with the title of the index page and build that blue nav-bar from it and display it when the page is viewed.

The markup of an index page looks something like this:

''' index /index
 * FirstPage, some text.
 * PageTwo
 * SomeThirdPage
 * AnotherPage
 * A paragraph describing something, using a link to YetAnotherPage. '''

In the above example, only the pages that are listed between index and /index are included in the index. So, FirstPage, PageTwo, SomeThirdPage and AnotherPage would be included on the index. YetAnotherPage would be excluded because it is mentioned after the index is closed. Pages linked to before the index is open will also be excluded.

That's pretty much how indexing works. You don't need to do anything to the individual pages listed in an index; just add them to the list on the index page properly and the wiki will automagically do the rest. Some trope or work pages may have an index tag like <<|Administrivia|>> at the bottom. This is an artifact of the old indexing system and can safely be removed.

One complication: if the page has a punctuated title ("ptitle": the page name in the URL will be something like "Ptitlexxxxxxxxxxxx"), the index listing must be Pot Holed to the ptitle (for example: to put Chekhov's Gun on an index, you must put the code Chekhov's Gun ). Just listing a redirect (like ChekhovsGun), or potholing to a redirect, will not work.

A given page title can be on any number of index pages. They will all show up when the page is displayed.

Also see Needs an Index for when someone doesn't know what index a page belongs in.

For a full list of existing indices, see Index Index.

Note that if a page is a redlink on an index, adding the page will not automatically add it to the index. You have to edit the index and resave it to get the index to update.

One more note -- if you want to set a page as an index and it has regular examples or other Wiki Words in them as well as the desired index content, it must be correctly formatted to prevent all of the other, extraneous links being listed in the index. You can either 1) collect the links to be indexed in a separate section and wrap only that section in the index ... /index markup shown above (example: Shojo), or 2) first divide the examples into genre pages, as is demonstrated on Something Completely Different. If you want to intersperse commentary with the index list, you can have multiple index ... /index sections in the same page (example: Romance Game).

Note that in bulleted lists, only the first bluelink is indexed; there is no problem having other wikilinks on the line so long as the page to be indexed is the first bluelink on the line. If you have a redlink bullet point, or a second line of description, you can prevent them from being indexed by wrapping them in the index markup, like so:

index This goes on so long we need a new paragraph, then link to /index Exactly What It Says on the Tin index /index
 * People Sit on Chairs: blah blah No Real Life Examples, Please
 * Natter: blah blah blah
 * Did You Just Punch Out Cthulhu?: yah yah, hey hey
 * Trope That Does Not Exist Yet: blah blah /index Did We Just Have Tea with Cthulhu? index is related somehow.

In this example, No Real Life Examples, Please won't be indexed because People Sit on Chairs is a valid bluelink, but Exactly What It Says on the Tin and Did We Just Have Tea with Cthulhu? have to be wrapped in the index markup, the first because it's on a new line, the second because Trope That Does Not Exist Yet is a redlink.