Add new section and page

All actions can be done via the Web IDE of Gitlab

Enter Web IDE from Gitlab

From the following URL https://git.tsp.dev/tsp/wiki/-/tree/main, click on button ‘Edit’ and select option ‘Web IDE’

This should open a new tab with the Web IDE ready for editing.

Basic Usage

Please read section Gitlab Web IDE for more details. Some important points:

  • How to navigate.
  • How to search using file name/file content.
  • How to create a folder.
  • How to create a file.
  • How to copy a file.
  • How to rename a file.
  • How to enable/disable preview mode.
  • How to upload a file (mainly used for image upload)

Adding new section to the wiki

Each section of the wiki is equivalent to a folder in the content folder.

In the Web IDE, right click on a folder and select option ‘New Folder’. Edit the folder name.

Customize the section name

By default, the wiki uses the folder name as URL and section name. If you want to give the section a different name from the folder name, following these steps:

  • Copy the file sample_index.md to the newly created folder and rename it to _index.md
  • In the file _index.md, change the value draft: true to draft: false. This tells the Wiki to include the new section in published content.
  • In the file _index.md, edit the field title to your preference

Modify the displayed order of the sections

The wiki does not pick up order of the sections in a folder automatically. You have to specify it yourself.

In the file _index.md above, modify the value of weight. The smaller the weight value is, the closer to the top the section is. So given you have 4 sections:

Section A, weight 1
Section B, weight 2
Section C, weight 3
Section D, weight 4

If you want to add a section E in between B and C, you have to set the value of weight in section E to be 3, and change the values of C and D to 4 and 5 respectively.

Adding new documentation page

This applies to any page under folder /content/docs

It is recommended to use the file /content/sample.md as base instead of creating a new one from scratch.

  • Copy the file /content/sample.md into the folder that you want the page to be in.
  • Rename the file into your preference
  • Now you can start adding new page content to the file.

Modify the content of the file:

  • Change value of “title” to your page’s title.
  • Change the value draft: true to draft: false. This tells the Wiki to include the new page in published content.

Modify the displayed order of the pages

Similar to section orders, the wiki does not pick up order of the pages in a folder automatically. You have to specify it yourself, by modifying the value of parameter “weight”.

Please read section ‘How to use Markdown’ to know how to add text content with format

Add image to the page

  • Follow guide at Quick intro to Gitlab Web IDE to learn how to upload file
  • In the same folder with the page, upload the image you want to include.
  • In the page content, add following syntax
![](image_file_you_want_to_include.png)

Replace the file name with actual image file name.

  • You can also use a 3rd-party image, for example
![](https://www.pinnaclecart.com/blog/wp-content/uploads/2015/08/DSC_8221.jpg)
  • Follow guide at Markdown intro to learn syntax to add links to a page.

Adding new announcement

This applies to any page under folder /content/announcements

It is recommended to use the file /content/sample_announcements.md as base instead of creating a new one from scratch.

  • Copy the file /content/sample_announcements.md into folder /content/announcements.
  • Rename the file into your preference
  • Replace the value of date at line 3 to the correct published date
  • Put the team/author name inside the square bracket at line 5, surrounded by quotation mark. Names are separated by comma Example:
---
title: "Announcement Title"
date: 2023-11-29
draft: false
contributors: [ "Team A", "User X" ]
---
  • Now you can start adding new page content to the file.

Adding new notice

This applies to any page under folder /content/notices

It is recommended to use the file /content/sample_notice.md as base instead of creating a new one from scratch.

  • Copy the file /content/sample_notice.md into folder /content/notices.
  • Rename the file into your preference
  • Replace the value of date at line 3 to the correct published date
  • Put the team/author name inside the square bracket at line 5, surrounded by quotation mark. Names are separated by comma Example:
---
title: "Notice Title"
date: 2023-11-29
draft: false
contributors: [ "Team A", "User X" ]
---
  • Now you can start adding new page content to the file.

Next steps