Sputnik is a wiki in the sense that it is committed to the wiki data model of versioned pages. A page is basic unit of Sputnik. Almost everything is a page. Each page has history and most can be modified by any user who has an account. Internally, each page consists of two parts: metadata and content. The metadata typically includes the following fields:
title: the name of the page as shown to the userauthor: the user who created this versionsummary: the summary of the change from the previous version
Each page also has content. When a page is used as a regular wiki page, the content is assumed to be text formatted with Markdown. However, depending on your configuration, the content of a page can be anything, and having the content be set Lua code would be particularly common.
Each page supports a set of actions. The following actions are built-in and thus apply to all pages (they can be overriden, though):
PAGE_NAME.show- display the page as HTML, with a navigation bar, etc.PAGE_NAME.edit- display the basic edit form for the pagePAGE_NAME.save- save the page (when submitted by the basic form)PAGE_NAME.history- show page historyPAGE_NAME.diff- show a diff from an earlier versionPAGE_NAME.show_inner- display just the content part of HTML.PAGE_NAME.edit_raw- display the form that allows altering the underlying representation of the pagePAGE_NAME.save_raw- save the page (when submitted by the "raw" form)PAGE_NAME.code- show the content of the page "as is", wrapped in the standard HTML (nav bar, etc.)PAGE_NAME.raw- show the content of the page "as is" - in plain text
Some of the actions take additional parameters, which may be optional. E.g., PAGE_NAME.show takes an optional "version" parameter that specifies which version of the page that should be shown. The parameters are encoded as separate CGI parameters, while the page name and it's action are passed as a single CGI parameter "p", separated by a dot. E.g.:
http://.../kepler.cgi/.../sputnik.lua?p=Sputnik.show&version=2007-05-04%2012:53:34
However, the "show" action is assumed by default and thus can be omitted, so instead we can use:
http://.../kepler.cgi/.../sputnik.lua?p=Sputnik&version=2007-05-04%2012:53:34
Or, if we are using URL-rewriting:
http://www.freewisdom.org/projects/sputnik/Sputnik&version=2007-05-04%2012:53:34
Compare this with:
http://www.freewisdom.org/projects/sputnik/Sputnik.edit
Actions can be overridden and new actions can be added to specific pages. E.g., the Special:RSS page has a custom ".rss" action which returns the RSS feed for the wiki.
Special Pages
As I said above, almost everything on Sputnik is represented as a page. E.g.:
- Special:Navigation - stores the navigation bar
- Special:CSS - the stylesheet used by the wiki
- Templates:English - the default set of templates