List for cgit developers and users
 help / color / mirror / Atom feed
* Go - Serving modules
@ 2023-01-06 21:59 Levi Durfee
  2023-01-06 22:13 ` Gianni Ceccarelli
  0 siblings, 1 reply; 5+ messages in thread
From: Levi Durfee @ 2023-01-06 21:59 UTC (permalink / raw)
  To: cgit

I noticed on git.zx2c4.com that there is the "go-import" meta tag. You
can view the source of https://git.zx2c4.com/wireguard-go to see the
meta tag.

I tried replicating this using the "head-include" config option, but I
don't see a way to specify any repository data from a variable.

Is there a way to configure my cgit instance to also have the
"go-import" meta tag? Or will it require a new function in
"ui-shared.c"?

Thanks,
Levi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Go - Serving modules
  2023-01-06 21:59 Go - Serving modules Levi Durfee
@ 2023-01-06 22:13 ` Gianni Ceccarelli
  2023-01-12  1:50   ` Levi Durfee
  0 siblings, 1 reply; 5+ messages in thread
From: Gianni Ceccarelli @ 2023-01-06 22:13 UTC (permalink / raw)
  To: cgit

On 2023-01-06 Levi Durfee <levi.durfee@gmail.com> wrote:
> I noticed on git.zx2c4.com that there is the "go-import" meta tag. You
> can view the source of https://git.zx2c4.com/wireguard-go to see the
> meta tag.
> 
> I tried replicating this using the "head-include" config option, but I
> don't see a way to specify any repository data from a variable.

I guess you could set ``repo.extra-head-content`` for each Go
repository (I'm a bit surprised that the two options are named differently…)

-- 
	Dakkar - <Mobilis in mobile>
	GPG public key fingerprint = A071 E618 DD2C 5901 9574
	                             6FE2 40EA 9883 7519 3F88
	                    key id = 0x75193F88


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Go - Serving modules
  2023-01-06 22:13 ` Gianni Ceccarelli
@ 2023-01-12  1:50   ` Levi Durfee
  2023-01-12  9:19     ` Gianni Ceccarelli
  0 siblings, 1 reply; 5+ messages in thread
From: Levi Durfee @ 2023-01-12  1:50 UTC (permalink / raw)
  To: cgit

I'm using scan-path to find the repositories.

I'll look through the code some more to see if I can find another way.
If not, I'll see if I can create a patch.


On Fri, Jan 6, 2023 at 5:14 PM Gianni Ceccarelli <dakkar@thenautilus.net> wrote:
>
> On 2023-01-06 Levi Durfee <levi.durfee@gmail.com> wrote:
> > I noticed on git.zx2c4.com that there is the "go-import" meta tag. You
> > can view the source of https://git.zx2c4.com/wireguard-go to see the
> > meta tag.
> >
> > I tried replicating this using the "head-include" config option, but I
> > don't see a way to specify any repository data from a variable.
>
> I guess you could set ``repo.extra-head-content`` for each Go
> repository (I'm a bit surprised that the two options are named differently…)
>
> --
>         Dakkar - <Mobilis in mobile>
>         GPG public key fingerprint = A071 E618 DD2C 5901 9574
>                                      6FE2 40EA 9883 7519 3F88
>                             key id = 0x75193F88
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Go - Serving modules
  2023-01-12  1:50   ` Levi Durfee
@ 2023-01-12  9:19     ` Gianni Ceccarelli
  2023-01-12 16:00       ` Levi Durfee
  0 siblings, 1 reply; 5+ messages in thread
From: Gianni Ceccarelli @ 2023-01-12  9:19 UTC (permalink / raw)
  To: cgit

On Wed, 11 Jan 2023 20:50:35 -0500
Levi Durfee <levi.durfee@gmail.com> wrote:

> I'm using scan-path to find the repositories.

Then you can set per-repository options inside each repo ``config``
file (I manage those via ``gitolite``, but you can just edit them).

So for a repo at ``/var/lib/gitrepos/foo-go.git``, you'd edit
``/var/lib/gitrepos/foo-go.git/config`` and add::

  [cgit]
      extra-head-content = <meta name="go-import" content="git.example.com/foo-go git https://git.example.com/foo-go" /></head>

But yes, having a macro-expanded ``head-include`` option would be useful.

-- 
	Dakkar - <Mobilis in mobile>
	GPG public key fingerprint = A071 E618 DD2C 5901 9574
	                             6FE2 40EA 9883 7519 3F88
	                    key id = 0x75193F88


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Go - Serving modules
  2023-01-12  9:19     ` Gianni Ceccarelli
@ 2023-01-12 16:00       ` Levi Durfee
  0 siblings, 0 replies; 5+ messages in thread
From: Levi Durfee @ 2023-01-12 16:00 UTC (permalink / raw)
  To: Gianni Ceccarelli; +Cc: cgit

Thank you! I had to use a ``cgitrc`` file in the repo directory, but I
got it working.

On Thu, Jan 12, 2023 at 4:20 AM Gianni Ceccarelli
<dakkar@thenautilus.net> wrote:
>
> On Wed, 11 Jan 2023 20:50:35 -0500
> Levi Durfee <levi.durfee@gmail.com> wrote:
>
> > I'm using scan-path to find the repositories.
>
> Then you can set per-repository options inside each repo ``config``
> file (I manage those via ``gitolite``, but you can just edit them).
>
> So for a repo at ``/var/lib/gitrepos/foo-go.git``, you'd edit
> ``/var/lib/gitrepos/foo-go.git/config`` and add::
>
>   [cgit]
>       extra-head-content = <meta name="go-import" content="git.example.com/foo-go git https://git.example.com/foo-go" /></head>
>
> But yes, having a macro-expanded ``head-include`` option would be useful.
>
> --
>         Dakkar - <Mobilis in mobile>
>         GPG public key fingerprint = A071 E618 DD2C 5901 9574
>                                      6FE2 40EA 9883 7519 3F88
>                             key id = 0x75193F88
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-01-12 16:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-06 21:59 Go - Serving modules Levi Durfee
2023-01-06 22:13 ` Gianni Ceccarelli
2023-01-12  1:50   ` Levi Durfee
2023-01-12  9:19     ` Gianni Ceccarelli
2023-01-12 16:00       ` Levi Durfee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).