Skip to content
Snippets Groups Projects

Vehicular systems, PhD courses

View the site live at https://vehsys.gitlab-pages.liu.se/phd_courses/

Course pages under /courses/{course-name} will appear in the list on https://vehsys.gitlab-pages.liu.se/phd_courses/courses/. These pages will replace our old pages at https://www.fs.isy.liu.se that should not be updated anymore.

How to edit

You can edit the page directly in the web editor. Just navigate in the file manager to your course (/courses/{course-name}), choose index.md, and click on Open in Web IDE. There is also a quick link to the editor from the live pages, a small pen in the lower right corner. After you save, commit, and push your changes, the site is automatically updated (it will take a few minutes). To avoid waiting for the pages to update, see the note about local server below.

The web pages are written in the lightweight markup language Markdown but full HTML is possible if you prefer.

Commonly used markups are:

# Heading level 1
## Heading level 2
### Heading level 3
*italic*
**bold**

and a hyperlink

[LiU](https://www.liu.se)

and an image (with a width specification)

![alternative text](https://upload.wikimedia.org/wikipedia/commons/8/8c/Catinsidemouth.jpg){: width="90%"}

add an image and center

![alternative text](https://upload.wikimedia.org/wikipedia/commons/8/8c/Catinsidemouth.jpg){: width="50%" style="display: block; margin: 0 auto"}

and a bullet list

- first item
- second item
- third item

and an enumeration list

1. first item
2. second item
3. third item

and a simple table (the last line for a prettier style in this template)

|---
| Head 1 | Head 2 | Head 3
|---
| x | y | z
| x | y | z
| x | y | z
{:.table-bordered .table-hover .table-striped}

The markdown dialect is Kramdown which should contain most things you need, it is possible to use straight HTML otherwise.

The course page

Preamble

At the top of the page there is a preamble where title and style can be specified. An empty front matter, the file starts with two lines with three dashes each, gains the default layout. It is highly recommended to set a title for the page.

---
title: Course TSFSxx -- Interesting topic
---

The front matter can contain other styles. At the time of writing the lisam layout will put a banner on top that points to lisam, example:

---
layout: lisam
title: Course TSFSxx -- Interesting topic
---

Course page menu

A LiU.se-style menu can be generated by using a bullet list, adding the anchor-links class to it like so:

* Item 1
* Item 2
* Item 3
{: .anchor-links}

Internationalization

There is built-in i18n support. The style expects the Swedish page-tree under the project root, and the English page-tree under en/. Pages only present in one of the trees will automatically be mirrored to the other. Select language (sv or en) in the front matter, example:

---
lang: sv
title: En svensk sida
---

If there is only one language version, the same page will be shown in Swedish and English mode with an information banner in the "other" language.

Local server

If you don't want to wait several minutes to see if your page looks like you want, then you can start a web server on your local machine and directly see your changes. Then you can push all your changes when you are satisfied. This requires a functioning Ruby installation.

First time, run from a command prompt

% bundle install

to install all required ruby packages.

Then you can start a local web server with the command

% bundle exec jekyll serve -l

which will also tell you the server address to see the page.

Ruby installation instructions

See https://www.ruby-lang.org/en/downloads/ for details on installing for Windows/Linux/Mac.

  • On a Linux/Ubuntu machine, you only need to
    % sudo apt install ruby ruby-dev
    and you should be good to go.
  • For Mac, http://rvm.io is a good choice.
  • For Windows, https://rubyinstaller.org/ is recommended.

Advanced use

Both the i18n support and the breadcrumb generation can be tweaked, for details see https://gitlab.liu.se/staff/liu-jekyll.