Wiki¶
Each project has its own wiki, found at /{project}/wiki. Pages are versioned,
so you can see every change and view older revisions.
Enabling the wiki¶
The wiki is switched on per project with Enable wiki in Project Settings (or when the project is created in the AdminCP). This controls whether the Wiki link appears in the project's navigation. It doesn't block access to wiki addresses, so use permissions to restrict what people can do.
Pages¶
Every page has a title, a slug and content.
- The slug is the page's address: a page with the slug
installationlives at/{project}/wiki/installation. - Slugs can contain letters, numbers,
-,_and/(soguides/getting-startedis valid). Spaces are converted to underscores when the page is saved. - Slugs must be unique within the project.
- The wiki's front page is the page with the slug
main, shown at/{project}/wiki. - Slugs can't be used for the built-in page addresses, which all begin with an underscore:
_new,_pages,_edit,_deleteand_revisions.
Creating a page¶
Go to /{project}/wiki/_new, or open the address of a page that doesn't exist
yet. If you can create pages you are shown the new page form with that slug
filled in, otherwise you get a "not found" page. This makes it easy to create
a page straight from a link.
Listing pages¶
/{project}/wiki/_pages lists every page in the project.
Formatting¶
Page content goes through the same formatting as tickets and comments:
- Markdown, when the Markdown plugin is enabled. HTML in the text is escaped, not rendered.
- Wiki links:
[[page]]links to a wiki page in the current project. Use[[page|link text]]to choose the text that is shown. - Ticket links:
#123links to ticket 123 in the current project, andproject#123links to a ticket in another project.
Note
Wiki link page names can only contain letters, numbers, - and _, so
[[...]] can't link to a page whose slug contains a /. Use a normal
Markdown link for those.
Revisions¶
Saving a page whose content has changed creates a new revision, numbered from 1. Saving without changing the content doesn't create one. Each revision records who made it and when.
/{project}/wiki/{slug}/_revisionslists a page's revisions./{project}/wiki/{slug}/_revisions/{number}shows a single revision.
Creating and editing pages is recorded on the project's timeline.
Deleting a page¶
Deleting a page removes the page, all of its revisions and its timeline entries. This can't be undone.
Permissions¶
| Action | Permission |
|---|---|
| View pages, revisions and the page list | Anyone who can view the project |
| Create a page | create_wiki_page |
| Edit a page | edit_wiki_page |
| Delete a page | delete_wiki_page |
Out of the box only project Managers can create, edit and delete pages. See Permissions, Groups & Roles to change that, for example by giving a "Docs" role the edit permissions.
API¶
The wiki can be read as JSON by adding .json to the address, sending
Accept: application/json, or using an API key:
curl -H "X-API-Key: KEY" https://traq.example.com/traq/wiki/_pages.json
See the API reference for the endpoints and response shapes.