Skip to content

Repositories

DanLanglois edited this page Feb 14, 2019 · 35 revisions

It is very easy to add your own README files/templates to your Gogs instance without touching a single bit of Git history. You can replace/override core templates by creating a custom version.

Create a plain text file then move to directory custom/conf/readme/README and restart Gogs.

You can put multiple versions in there, not just one README template, but as many as you like, just put them in there, a README2 or whathaveyou. They will appear as choices in the dropdown menu.

Also note that the README template supports four basic placeholders. Currently, you can use following placeholders, for corresponding values of the repository:

  • {Name}: Repository name
  • {Description}: Repository description
  • {CloneURL.SSH}: Repository SSH clone address
  • {CloneURL.HTTPS}: Repository HTTP/HTTPS clone address

It works like so:

repo name is: {Name}

{Description}

You can get the development version of this repo via git clone {CloneURL.SSH} or git clone {CloneURL.HTTPS}

Clone this wiki locally