List for cgit developers and users
 help / color / mirror / Atom feed
From: John Keeping <john@metanate.com>
To: Derek Stevens <nilix@nilfm.cc>
Cc: cgit@lists.zx2c4.com
Subject: Re: [PATCH] add 'go-import' meta tag if in a repo
Date: Sun, 9 Jan 2022 14:23:17 +0000	[thread overview]
Message-ID: <Ydrv1dXE8PsdipO1@donbot> (raw)
In-Reply-To: <20220108235559.23253-1-nilix@nilfm.cc>

Please include some description here about why this change is desirable.

On Sat, Jan 08, 2022 at 04:55:59PM -0700, Derek Stevens wrote:
> Signed-off-by: Derek Stevens <nilix@nilfm.cc>
> ---
>  ui-shared.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/ui-shared.c b/ui-shared.c
> index acd8ab5..0f57af6 100644
> --- a/ui-shared.c
> +++ b/ui-shared.c
> @@ -785,6 +785,9 @@ void cgit_print_docstart(void)
>  	html_txt(ctx.page.title);
>  	html("</title>\n");
>  	htmlf("<meta name='generator' content='cgit %s'/>\n", cgit_version);
> +	if (ctx.repo)
> +	  htmlf("<meta name='go-import' content='%s%s%s git https://%s%s%s'/>\n",
> +	    host, cgit_rooturl(), ctx.repo->url, host, cgit_rooturl(), ctx.repo->url);

The indentation looks wrong here...

>  	if (ctx.cfg.robots && *ctx.cfg.robots)
>  		htmlf("<meta name='robots' content='%s'/>\n", ctx.cfg.robots);
>  	html("<link rel='stylesheet' type='text/css' href='");
> -- 
> 2.34.1
> 

  reply	other threads:[~2022-01-09 14:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-08 23:55 Derek Stevens
2022-01-09 14:23 ` John Keeping [this message]
2022-01-09 17:45 Derek Stevens
     [not found] ` <dc347023-fb80-4c44-b75a-1fd2b05e463c@www.fastmail.com>
2022-05-09 14:57   ` Derek Stevens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Ydrv1dXE8PsdipO1@donbot \
    --to=john@metanate.com \
    --cc=cgit@lists.zx2c4.com \
    --cc=nilix@nilfm.cc \
    --subject='Re: [PATCH] add '\''go-import'\'' meta tag if in a repo' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).