Skip to content

Project management

git and ssh

I'm familiar with Gitlab and ssh. However, it has been a long time since I had to configure ssh on a new server.
I followed the Gitlab Docs page about ssh, and everything went well.

The only "problem" I had was that warning message when I first try to connect to Gitlab:

C:\Users\Admin>ssh -T git@gitlab.fabcloud.org  
The authenticity of host 'gitlab.fabcloud.org (13.59.248.79)' can't be established.  
ED25519 key fingerprint is SHA256:JCWnquB9CdnH4ctlmBh6JGzw02iMui8j8KckmYNCq/M.  
This key is not known by any other names.  
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes  
Warning: Permanently added 'gitlab.fabcloud.org' (ED25519) to the list of known hosts.  
Connection closed by 13.59.248.79 port 22

It surprised me at first. It was, in fact, documented in the Gitlab Docs page. As they say RTFM.
I should have read ALL of it.

Porting the html example to MkDocs

As I'm not very good at graphical design, I decided to use a template for my website I already heard of MkDocs and Patrik, our local instructor, uses it.
Hence, I decided to use it as well.

I started by following the Getting Started with MkDocs tutorial. (all of it) It guides me to create a MkDocs website, understand its structure and how to start adding content to it.

MkDocs allows you to run a local version fo your website. Thanks to this, you don't have to push every change you make to see the result. It speeds up the debug process.

I already use VS Code as IDE for Python code and text. Hence, I'll also use it for my website.

I first try to reproduce the original html website from gitlab in MkDocs template.

Finally, I add content to my website and my final project idea.

For that purpose, I need a tool to resize images. I decided to use Microsoft PowerToys.
One of these "toys" is Image Resizer that is included in the contextual menu when you right-clic on a image file.

problems encountered

After my first push to gitlab, the pipeline failed to build my website.
I quickly understood that .gitlab-ci.yml has to be updated to change the pipeline to handle MkDocs.
I found this example of a MkDocs website hosted on gitlab.
I use it as a template to configure my gitlab pipeline by copying the .gitlab-ci.yml and the requirements.txt to my repository.

Further work: website improvements

Adding tables

To enable the Markdown table support in mkdocs, these lines need to added to mkdocs.yml

markdown_extensions:
  - tables

More info here

Adding columns

We can add columns support by adding these lines in mkdocs.yml

extra_css:
   - https://cdn.jsdelivr.net/gh/rod2ik/cdn@main/mkdocs/css/massilia-columns.css

It enables this syntax to create columns in mkdocs pages

!!! col _2
    Column 1 of 2
!!! col _2 clear
    Column 2 of 2

The _2 indicates that we want 2 columns ( 6 columns is the max).
The clear ensures that the following text doesn't go in an additional (unwanted) column

The result is

Col

Column 1 of 2

Col

Column 2 of 2

We can see that the text in column is smaller.
I found a workaround by using an HTML tag to make the text look like the third level heading.
Alternatively, the Markdown syntax can be used:

!!! col _2
    <h3>
    Column 1 of 2
    </h3>
!!! col _2 clear
    ### Column 2 of 2

result:

Col

Column 1 of 2

Col

Column 2 of 2

More info here