0

I installed an own gogs-server version 0.14.0+dev on my Debian 11 server. The software works well. I can access my repositories via the webserver. My problem is that the filename I use are usually very long and they get truncated in the web-view like this

https://gogs.localhost/myuser/myrepo

a_very_long_file...

screenshot from shortened filesnames shown

I found out that I could change this with a custom css-file which manipulates the css.

I found a description how to add custom css in https://gogs.io/docs/features/custom_template (I checked german, english and french version which describe all the same doing).

So following the description I created files like this:

root@myserver:/opt/gogs# tree custom/
custom/
|-- conf
|-- public
|   `-- css
|       `-- custom.css
`-- templates
    `-- inject
        `-- head.tmpl

The file /opt/gogs/custom/public/css/custom.css

body {
    background-color: yellow;
}

The file /opt/gogs/custom/templates/inject/head.tmpl

<link rel="stylesheet" href="/css/custom.css">

After creating these directories and files I restarted gogs:

service gogs restart
service gogs-web restart
service gogs-web-1 restart

I reloaded the gogs-page and I expected to find code from opt/gogs/custom/templates/inject/head.tmpl as part of the webpage:

<link rel="stylesheet" href="/css/custom.css">

But there is no code like this. The documentation seems to be wrong.

horshack
  • 103
  • 1
  • 1
  • 6

0 Answers0