Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Wikidot normalizes page names in its URLs to fit a specific form. Internally it calls these “UNIX names”, SCUTTLE and other projects have called these names “slugs”. (See glossary)

The https://github.com/scpwiki/wikidot-normalize codebase is presently the most complete normalization utility outside of Wikidot itself, and this page will document its findings.

...

Below is a table listing some basic transformations:

Original

Result

SCP-001

scp-001

User Curated Lists

user-curated-lists

Kate McTiriss's Proposal

kate-mctiriss-s-proposal

However, Wikidot URLs can be more complicated. For instance, they may specify any number of categories that the page is in, in a specific order:

Original

Result

FRAGMENT:some page (1)

fragment:some-page-1

deleted:Spc 1059

deleted:spc-1059

:fragment::page:

fragment:page

Multiple colons are merged into one, and any trailing or leading colons are stripped.

This also applies to dashes, multiple will be merged into one, and any leading or trailing dashes will be stripped. Because spaces and extraneous characters are converted to dashes, this essentially removes them entirely. This also occurs at category boundaries:

Original

Result

some--page

some-page

-spaghetti

spaghetti

(TOP SECRET) Special File!

top-secret-special-file

fragment: !Page

fragment:page

-category-:-page-

category:page

Underscores

It is notable that, unlike dashes, underscores are treated specially. Effectively they are treated as any other non-normal character, and converted into dashes. However, a single underscore is permitted at the start of any given section of a name. This allows for special pages like _template or _404 to exist, even in categories.

...

And the following are not. Their conversions are also shown:

Original

Intermediate

Result

__template

_-template

_template

apple_

apple-

apple

fragment_:page

fragment-:page

fragment:page

category__:_fragment_:page_

category--:_fragment-:page-

category:_fragment:page

Character Transformations

...