Create a Wiki

2024-03-28

This topic can be completed using a free 30-day trial version of LabKey Server.

Wikis provide an easy way to create web pages and arrange content for users. Pages rendered with different syntax, such as Markdown, HTML, and Wiki syntax can be used in combination.

In this topic we will create a simple wiki containing three pages.

Wiki Tutorial

To use this topic as a tutorial, you can use any folder where you have administrator access and it is suitable to do testing. For example:

  • Log in to your server and navigate to your "Tutorials" project, "Collaboration Tutorial" subfolder. Create them if necessary, accepting default types and settings.
    • If you don't already have a server to work on where you can create projects and folders, start here.
    • If you don't know how to create projects and folders, review this topic.

Example Page

The following example wiki page is shown as an administrator would see it.

  • The page includes a title in large font.
  • Links are shown for editing the page, creating a new one, viewing the history of changes, etc. These buttons are shown only to users with appropriate permissions.
  • Links and images can be included in the body of the page.

The following steps will take you through the mechanics of creating and updating wiki pages.

Create a Markdown Page

The default wiki page format is HTML, which is powerful, but not needed for simple text wiki pages. We'll begin with a short text-only wiki using the Markdown rendering option.

  • Navigate to the folder where you want to create the page.
  • In the Wiki web part, click Create a new wiki page.
    • If this link is not present, i.e. another wiki already exists in the folder, use the menu for the wiki web part and select New.
    • If you don't see the web part, you can add it.
  • In the New Page form, make the following changes:
    • In the Name field, enter "projectx".
    • In the Title field, enter "Project X".
    • Click the Convert To... button on the right, select Markdown, then click Convert.
    • In the Body panel, enter the following text: "Project X data collection proceeds apace, we expect to have finished the first round of collection and quality control by...".
    • Notice a brief guide to additional Markdown formatting options appears at the bottom of the editing pane. For more information, see Markdown Syntax.
  • Click Save & Close.
  • The web part shows your new content. Notice that the Pages web part (the table of contents) in the right hand column shows a link to your new page.

Create a Wiki Syntax Page

Wiki syntax is another format simpler to read and write than HTML. Wiki pages are especially useful for basic text and simple headers and layouts.

  • In the upper corner of the Project X wiki web part, select New from the (triangle) menu.
  • Click Convert To....
  • In the Change Format pop up dialog, select Wiki Page (if it is not selected by default), and click Convert.
  • In the New Page form, make the following changes:
    • In the Name field, enter "projecty".
    • In the Title field, enter "Project Y".
    • Copy the following and paste into the Body field:
**Project Y Synopsis**

Project Y consists of 3 main phases
- **Phase 1: Goals and Resources.**
-- Goals: We will determine the final ends for the project.
-- Resources: What resources are already in place? What needs to be created from scratch?
- **Phase 2: Detailed Planning and Scoping.**
- **Phase 3: Implementation.**

We anticipate that Phase 1 will be complete by the end of 2014, with Phase 2 \\
completed by June 2015. Implementation in Phase 3 must meet the end of funding \\
in Dec 2016.

The **, -, and \\ symbols are formatting markup in wiki syntax. A brief guide to Wiki formatting options appears at the bottom of the editing pane. For more information, see Wiki Syntax.

  • Click Save & Close
  • After saving the second wiki, you will be viewing it on a page of it's own. Unlike the first page you created, this one was not automatically added to a web part on the home page of the folder.
  • Notice that you now have a link near the top of the page Collaboration Tutorial. You can click it to return to the main folder page.
  • You may notice that you see a Pages panel (the wiki table of contents) appears both on the folder home page and on the display page for an individual wiki page.

Create an HTML Page

HTML formatting provides additional control over the layout and rendering of any wiki page. For our final page we will include additional features, including a link and image.

  • In the Pages panel, either on the main page or while viewing an individual page, click the , and select New.
  • In the New Page form, make the following changes:
    • In the Name field, enter "projectz".
    • In the Title field, enter "Project Z".
  • Click Convert To....
  • In the Change Format pop up dialog, select HTML (if it is not selected by default), and click Convert.
  • Notice the Body section now has two tabs: Visual and Source. Stay on the Source tab for this example.
  • Paste the following into the body panel:
    <h3 class="heading-1">Results</h3>
    <p>See the section <a href="projectx">detailed results</a> for a full explanation of the graph below.</p>
    <h3 class="heading-1-1">Figure 1</h3>
    <p><img src="demoImage.png" alt="" /></p>
    <p><strong class="bold">Figure 1</strong> shows the mean count values for both cohorts at initial subject evaluation. The correlation coefficient between Lymphocyte and CD4 cell counts was significant (0.7). There were 33 subjects in one cohort and 78 subjects in the other cohort.</p>
  • Scroll down and click Attach a file. Click Choose File (or Browse) and select the demoImage.png file you downloaded.
  • Uncheck the box for "Show Attached Files". When this box is checked, you will see a listing of all attached file names at the bottom of your page, which can be useful for attachments a user should download, but is unnecessary and potentially confusing when the attached files are images displayed within the text.
  • Click Save & Close.
  • You have now recreated the example wiki shown at the top of this tutorial page. The link in this case only goes to the "Project Y" wiki you created; in practice you could direct this link to any other location where your detailed results were located.

Organize Wiki Pages

Now that the menu on the far right (Pages) contains three links to the new pages, we can show how you might organize and manage multiple pages.

When you are viewing a page, the title is bolded on the Pages list. As you add pages, links are added to the menu creating a table of contents. You can rearrange their order, and can also arrange your table of contents hierarchically, making some pages "parents", with "children" pages underneath.

  • In the Pages web part, click Project X.
  • Click Manage in the wiki header.
  • All sibling pages can be reordered with the Move Up/Move Down buttons, not just the page you selected. Move "Project X" down (these changes will not be reflected in the Pages web part until you save.)
  • Using the Parent dropdown, select "Project Z (projectz)". This makes Project Z the parent topic for Project X. Notice the "Project X" topic no longer shows any siblings (as "Project Z" has no other child pages).
  • Click Save.
  • Notice the Pages web part: any parent page now has a or for expanding and collapsing the table of contents.

For a more elaborate example, browse the LabKey documentation table of contents on the right of the page you are reading now.

Learn more about managing wiki pages in this topic: Manage Wiki Pages

View Version History

All changes to wiki pages are tracked and versioned, so you can see how a document has developed and have a record of who made changes. To see these features, first make an edit to one of your pages, in order to build an editing history for the page.

  • In the Pages menu, click Project X.
  • Click Edit. (If you do not see the edit link, you may need to log in again.)
  • Make some changes. For example, you might add some statement about "details" from Project Z being here (to support the link from the Project Z wiki we included).
  • Click Save & Close.
  • Click History to see the list of edits.
  • Click Version 1. You'll see the original page.
  • Click Compare With... and then select Latest Version (your_username) to see the changes made between the two revisions. Green highlighting shows added content; anything removed would be highlighted in pink.

Related Topics