translated by Google

Machine-translated page for increased accessibility for English questioners.

GitLab FI

GitLab Pages

GitLab Pages is a service that allows users to generate static pages directly from the repository. It is an ideal solution for

  • project or subject website,
  • application documentation,
  • simple user pages.

Only static pages can be run on this service. It does not allow you to run scripts or programs on the server side in any standard way. Therefore, it is not suitable for applications that require dynamic content generation, form processing, or asynchronous querying.

For these purposes, we recommend running the website at user pages on the Aisa server or in Stratus.FI virtual environment .

How to do it

Setting up a simple website requires setting up a repository in GitLab and configuring the CI to generate that website.

  • Select the appropriate namespace and project name

    The project name is deterministically mapped to the page name where the project appears. In general, a project in GitLab with a path namespace/ [subns/…/]project.git
    will be available at the URL
    https:// [subns/…/]project

    The user project namespace has namespace identical to the faculty login, and subns/…/ is empty because the user namespace does not have subgroups. Therefore, for sites related to the subject or research group project, we recommend using the group namespace.

    A special case is pages at the root of a domain. If, as a user (or in a group), you create a project with the same name as the subdomain, ie the shape namespace/
    then the generated site will be placed at the root of the subdomain

    Tip: I want to request the creation of a group

  • Adjust visibility

    Faculty GitLab has a feature enabled for Pages Access Control which allows users to set up access to the website.

    In the SettingsGeneralVisibility,…Pages section, you can select one of the following options to restrict access to these users, depending on the visibility of the project:

    Private Internal Public
    Only project members project members project members project members
    Everyone with access cannot be selected user login in GitLab FI anyone without logging in
    Everyone anyone without logging in anyone without logging in cannot be selected
  • Web content

    The structure of the pages, the language used, etc. depends on the selected generator, ie the program that creates the resulting static website. Most support it Markdown or AsciiDoc , however, you can also find specific generators, eg for generating documentation from source code. You can also write your own generator.

    Be inspired by the samples

    look at official demonstrations repositories. Most of them can be used as a framework for your own project.

    Pay attention to configuration files, it is often necessary to modify more than one configuration in templates. If the template has or similar help, read it carefully.

    Tests the configuration
    We recommend starting with a very small number of pages first to see if the generator works at all.
    Custom generator
    You can also use your own generator to generate content. Generation takes place like any other task for GitLab CI. For task setup requirements and where the result is expected, see official documentation .
  • CI / CD settings

    You can use it to generate a site faculty instance of GitLab Runner or custom instance.

    Don't forget to use the faculty instance

    • set tag for tasks shared-fi in .gitlab-ci.yml ,
    • verify that the container image for your chosen generator is available for the faculty GitLab CI, e.g. application of faculty administration .

More information

The website will be automatically accessible via the protocol https with a certificate signed by the authority Let's Encrypt .

The site URL can only be changed by moving the project. Otherwise, the path cannot be modified, not even administratively.

Site content from your own domain

For research groups or major projects, we can set up a proxy from the form domain for providing content from GitLab Pages. We can also provide content from our own registered domain. All the registrar needs to do is set one of the following options for the domain:

  1. domain IN CNAME
  2. domain IN A
              AAAA 2001:718:801:23a::50

Please note that CVT does not register domains outside FI.

For exact conditions, first contact the administrator at .

Sample instance

Source repository in GitLab FI, which is a slightly modified template for Jekyll from official source .
Generated sample from the same repository.

If you do not know how to deal with your own site:

Check the settings for GitLab CI
Project → Settings → CI / CD.
look at .gitlab-ci.yml in a sample solution
This file contains task definitions for generating a site in a faculty environment.
Check the output of the failing task
Main page of the project in GitLab → CI / CD.