part of the GtC documentation
Links
Try out all these techniques below in the playground.
Using the toolbar
There are a pair of icons on the toolbar:
The one on the left is for internal links – that is, links to other pages in this wiki – and the one on the right for external links.
Internal links to other pages in this wiki
We recommend this as the way to link to existing pages, because of the help that is provided when you click on the internal link icon. A 'Link Wizard' pops up, initially showing the relevant pages in the part of the wiki you are currently in.1). If you want to broaden your search for the right page to link to, delete the namespace, i.e. the abbreviation up to and including the colon :. That way you will get a list of all the pages across the wiki, in any namespace, and the namespace will show as an abbreviation and a colon, before the page title.
External links
Clicking on the external link icon creates the template for a link: [[http://example.com|External Link]]. Replace with the URL and the link text that you want, just like the DokuWiki syntax below.
DokuWiki syntax
Internal links
To create an internal link, you put the namespace and the page name you want to link to in double square brackets. For example, if you want to link to the page on Alpacas, writing [[alps:Alpacas]] will do the job: it shows as Alpacas. Note that internal links and page names are not case sensitive.
Some page names vary slightly from what is displayed in the page title. So, for instance, the page with the title “Low-impact clothes” is just called “clothes”. If you want to link to this page, you would need to write [[licl:clothes|Low-impact clothes]] — which does the job like this: Low-impact clothes.
The way this works, needing to include the namespace, can be a bit tricky, and is why we recommend using the Wizard as above.
External links
- An example of the general case is
[[https://wiki.p2pfoundation.net|P2P Foundation wiki]]giving P2P Foundation wiki. Note the|character separating the URL from the link text. - For a few particular cases, there is a nice short cut.
- For Wikipedia,
[[wp>Commons]]gives Commons. - We try not to support Big Tech, but if you really want a Google search, it can be done as
[[google>Growing the Commons]], giving this: Growing the Commons - You can refer to DokuWiki's own site using e.g.
[[doku>dokuwiki]]giving dokuwiki.
Markdown syntax
Markdown syntax can also be used for most links, and many people find it a more elegant approach.
Internal links
You can use the same idea as in DokuWiki, but with Markdown syntax, like this:
[Low-impact clothes](licl:clothes)gives Low-impact clothes[](alps:Alpacas)gives Alpacas.
External links
Using the above example here is is [P2P Foundation wiki](https://wiki.p2pfoundation.net) giving P2P Foundation wiki.
DokuWiki short cuts, to Wikipedia, Google, etc., are also available in Markdown, with a few more characters.
[Commons on Wikipedia](wp>Commons) gives Commons on Wikipedia.
General points about links
For all links, you have the option of specifying the link text that is displayed as the link.
- In DokuWiki, put
|link textdirectly after the URL and before the]]. - In Markdown, put the link text between the
[and the].
Internal links
Internal links to pages that exist are currently shown in green, with no extra decoration. Internal links to pages that don't exist are currently shown in red like this (there isn't a page called 'red like this', please don't create one!).
When you create an internal link, the backlinks on the page you link to will include the page you are on at present. You can see this if you go to the examples on this page. When you click on the Backlinks icon on those pages, the list includes doc:links.
There's more about backlinks in navigating the site.
External links
In general, external links are shown in green, with a globe icon in front of them, unlike internal links that have no extra icon. There is no obvious indication whether the URL linked to has a page or not. You just have to try it and see: if it's not there, you might get a '404' page not found message.
When you create an external link, there is no mechanism for creating a backlink, so it's practically impossible to see from the other page that you have linked to it.
MediaWiki
See MediaWiki and DokuWiki … internal links are very similar, just that you need to remember to include the namespace. External links are done slightly differently.