List for cgit developers and users
 help / color / Atom feed
* Nesting repositories under a common folder?
@ 2019-07-24 18:01 reuben.popp
  2019-07-24 18:40 ` list
  2019-07-24 18:43 ` john
  0 siblings, 2 replies; 5+ messages in thread
From: reuben.popp @ 2019-07-24 18:01 UTC (permalink / raw)


Hello all,

Excuse me if this has been answered before, but is there a way to nest
repositories under a common directory visually in cgit?

For example,

root_directory (not a repo)
|- Project A (directory, not a repo)
|       |- Project A component 1 (repo)
|       |- Project A component 2 (repo)
|- Project B (repo)
|- Project C (directory, not a repo)
|       |- Project C subproject AA (repo)
|       |- Project C subproject AB (repo)
|       |- Project C Archive (directory, not a repo)
|              |- Project C archived subproject A (repo)
etc.

Going to the cgit frontend, I would see the directories (or links) for
Project A, B and C...

Hopefully this makes sense.

Thanks in advance!
Reuben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20190724/b4e196f9/attachment.html>


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

* Nesting repositories under a common folder?
  2019-07-24 18:01 Nesting repositories under a common folder? reuben.popp
@ 2019-07-24 18:40 ` list
  2019-07-24 18:43 ` john
  1 sibling, 0 replies; 5+ messages in thread
From: list @ 2019-07-24 18:40 UTC (permalink / raw)


Reuben Popp <reuben.popp at gmail.com> on Wed, 2019/07/24 13:01:
> Hello all,
> 
> Excuse me if this has been answered before, but is there a way to nest
> repositories under a common directory visually in cgit?
> 
> For example,
> 
> root_directory (not a repo)
> |- Project A (directory, not a repo)
> |       |- Project A component 1 (repo)
> |       |- Project A component 2 (repo)
> |- Project B (repo)
> |- Project C (directory, not a repo)
> |       |- Project C subproject AA (repo)
> |       |- Project C subproject AB (repo)
> |       |- Project C Archive (directory, not a repo)
> |              |- Project C archived subproject A (repo)
> etc.
> 
> Going to the cgit frontend, I would see the directories (or links) for
> Project A, B and C...

Are you searching for something like config option section-from-path? That
allows just one level, though.
-- 
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Best regards             my address:    */=0;b=c[a++];)
putchar(b-1/(/*    Chris            cc -ox -xc - && ./x    */b/42*2-3)*42);}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20190724/9a5f96a0/attachment.asc>


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

* Nesting repositories under a common folder?
  2019-07-24 18:01 Nesting repositories under a common folder? reuben.popp
  2019-07-24 18:40 ` list
@ 2019-07-24 18:43 ` john
  2019-07-24 19:05   ` reuben.popp
  1 sibling, 1 reply; 5+ messages in thread
From: john @ 2019-07-24 18:43 UTC (permalink / raw)


On Wed, Jul 24, 2019 at 01:01:27PM -0500, Reuben Popp wrote:
> Excuse me if this has been answered before, but is there a way to nest
> repositories under a common directory visually in cgit?
> 
> For example,
> 
> root_directory (not a repo)
> |- Project A (directory, not a repo)
> |       |- Project A component 1 (repo)
> |       |- Project A component 2 (repo)
> |- Project B (repo)
> |- Project C (directory, not a repo)
> |       |- Project C subproject AA (repo)
> |       |- Project C subproject AB (repo)
> |       |- Project C Archive (directory, not a repo)
> |              |- Project C archived subproject A (repo)
> etc.
> 
> Going to the cgit frontend, I would see the directories (or links) for
> Project A, B and C...

You can't do exactly this, but you can generate sections from the path
to the repository which adds headings to the list of repositories.  See
"section" and "section-from-path" in cgitrc(5).

For hierarchical paths, it's also possible to view a subset of the tree
by going to (for example) /cgit/directory_a/directory_b/ but I don't
think anything generates links to those sublists.

I remember in the past somewhere had added a custom script to collapse
sections by default, but I can't find a reference for that now.  That
should be reasonably simple by matching on the "reposection" class.


Regards,
John


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

* Nesting repositories under a common folder?
  2019-07-24 18:43 ` john
@ 2019-07-24 19:05   ` reuben.popp
  2019-07-24 19:44     ` john
  0 siblings, 1 reply; 5+ messages in thread
From: reuben.popp @ 2019-07-24 19:05 UTC (permalink / raw)


Thanks for the reply John,

Excuse me if I sound a bit daft here... can I add javascript to cgit, or
how else would I collapse reposection classes?

Thanks again
Reuben

On Wed, Jul 24, 2019 at 1:45 PM John Keeping <john at keeping.me.uk> wrote:

> On Wed, Jul 24, 2019 at 01:01:27PM -0500, Reuben Popp wrote:
> > Excuse me if this has been answered before, but is there a way to nest
> > repositories under a common directory visually in cgit?
> >
> > For example,
> >
> > root_directory (not a repo)
> > |- Project A (directory, not a repo)
> > |       |- Project A component 1 (repo)
> > |       |- Project A component 2 (repo)
> > |- Project B (repo)
> > |- Project C (directory, not a repo)
> > |       |- Project C subproject AA (repo)
> > |       |- Project C subproject AB (repo)
> > |       |- Project C Archive (directory, not a repo)
> > |              |- Project C archived subproject A (repo)
> > etc.
> >
> > Going to the cgit frontend, I would see the directories (or links) for
> > Project A, B and C...
>
> You can't do exactly this, but you can generate sections from the path
> to the repository which adds headings to the list of repositories.  See
> "section" and "section-from-path" in cgitrc(5).
>
> For hierarchical paths, it's also possible to view a subset of the tree
> by going to (for example) /cgit/directory_a/directory_b/ but I don't
> think anything generates links to those sublists.
>
> I remember in the past somewhere had added a custom script to collapse
> sections by default, but I can't find a reference for that now.  That
> should be reasonably simple by matching on the "reposection" class.
>
>
> Regards,
> John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20190724/d1a60b07/attachment.html>


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

* Nesting repositories under a common folder?
  2019-07-24 19:05   ` reuben.popp
@ 2019-07-24 19:44     ` john
  0 siblings, 0 replies; 5+ messages in thread
From: john @ 2019-07-24 19:44 UTC (permalink / raw)


On Wed, Jul 24, 2019 at 02:05:38PM -0500, Reuben Popp wrote:
> Excuse me if I sound a bit daft here... can I add javascript to cgit, or
> how else would I collapse reposection classes?

You can use the "head-include" directive in cgitrc to include arbitrary
content in the <head /> element generated by CGit.


Regards,
John


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

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24 18:01 Nesting repositories under a common folder? reuben.popp
2019-07-24 18:40 ` list
2019-07-24 18:43 ` john
2019-07-24 19:05   ` reuben.popp
2019-07-24 19:44     ` john

List for cgit developers and users

Archives are clonable: git clone --mirror http://inbox.vuxu.org/cgit

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.cgit


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git