Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| doc:namespace [2026/03/31 11:11] – [Why is it called a namespace, not just a folder?] Simon Grant | doc:namespace [2026/04/02 08:44] (current) – [Why is it called a namespace, not just a folder?] Simon Grant | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| Fear not: this can look very unfamiliar at first sight, but it's not really hard. | Fear not: this can look very unfamiliar at first sight, but it's not really hard. | ||
| - | A namespace in DokuWiki is basically a way of pointing to different parts of the wiki, just like a folder (or directory) structure on your file system (on your hard drive or wherever) allows you to sort your files into sensible groups, or the way in which many web sites structure | + | A namespace in DokuWiki is basically a way of pointing to different parts of the wiki. It' |
| Here on this wiki, there is one page at the ' | Here on this wiki, there is one page at the ' | ||
| Line 12: | Line 12: | ||
| '' | '' | ||
| - | Look at some more examples. Our topic groups are in the namespace (and folder) called '' | + | Look at some more examples. Our topic groups are in the namespace (and folder) called '' |
| If you go to any of these, such as [[gt: | If you go to any of these, such as [[gt: | ||
| `https:// | `https:// | ||
| The topic group " | The topic group " | ||
| `https:// | `https:// | ||
| - | The namespaces allow us to have different pages with the same name, in different namespaces.\\ | + | The namespaces allow us to have different pages with the same name, as long as they are in different namespaces.\\ |
| For each of our topics, we have arbitrarily chosen a four-letter namespace hinting at the topic name. | For each of our topics, we have arbitrarily chosen a four-letter namespace hinting at the topic name. | ||
| So, there is an actual topic, [[bush: | So, there is an actual topic, [[bush: | ||
| Line 23: | Line 23: | ||
| This is just the same as the fact that you can have two files with the same name in your computer system, provided they sit in different folders. Not just pages, but also images and other files sit in one or another namespace (i.e., folder). | This is just the same as the fact that you can have two files with the same name in your computer system, provided they sit in different folders. Not just pages, but also images and other files sit in one or another namespace (i.e., folder). | ||
| + | |||
| + | ===== Why are namespaces so useful? ===== | ||
| + | In normal file systems, a folder or directory structure allows its owner to treat files in different folders differently. Similarly, in DokuWiki, the namespace structure allows us to give different permissions to different people, for the various different namespaces. Curators belong to user groups, and the people in each user group have permission to edit pages in the corresponding namespace. This is designed to greatly reduce worries about accidentally editing the wrong pages. | ||
| ==== Why is it called a namespace, not just a folder? ==== | ==== Why is it called a namespace, not just a folder? ==== | ||
| - | A folder or directory structure conventionally uses the slash, `/`, as a delimiter. | + | A folder or directory structure conventionally uses slashes, `/`, as delimiters. |
| - | Namespaces conventionally use colons | + | Namespaces conventionally use a colon `:` as a delimiter. |
| There is a lot of history behind this, which is not needed for understanding namespaces in DokuWiki. | There is a lot of history behind this, which is not needed for understanding namespaces in DokuWiki. | ||
| - | It may be enough to say that in DokuWiki, they are essentially the same, except the slash `/` is used in URLs, while the colon `:` is the normal usage for internal locations. | + | Probably |
| So, this document' | So, this document' | ||
| - | Actually, | + | We have configured our system so that `[[doc/ |
| For the URL, the link is `https:// | For the URL, the link is `https:// | ||
| Just writing that URL by itself gives what looks like an external link, even though it is in our wiki:\\ | Just writing that URL by itself gives what looks like an external link, even though it is in our wiki:\\ | ||
| Line 41: | Line 44: | ||
| This actually works just the same here in Markdown syntax. `[this](doc: | This actually works just the same here in Markdown syntax. `[this](doc: | ||
| and `[this](doc/ | and `[this](doc/ | ||
| - | ===== Why are namespaces so useful? ===== | ||
| - | In normal file systems, a folder or directory structure allows its owner to treat files in different folders differently. Similarly, in DokuWiki, the namespace structure allows us to give different permissions to different people, for the various different namespaces. Curators belong to user groups, and the people in each user group have permission to edit pages in the corresponding namespace. This is designed to greatly reduce worries about accidentally editing the wrong pages. | ||
| ===== See also ===== | ===== See also ===== | ||
| * DokuWiki has extensive documentation around namespaces, including [[doku> | * DokuWiki has extensive documentation around namespaces, including [[doku> | ||
| - | * Wikipedia has a very detailed explanation of [[wp> | + | * Wikipedia has a very detailed explanation of [[wp> |