List for cgit developers and users
 help / color / Atom feed
* Viewing Repository "About" Tab
@ 2019-10-17 14:23 spython01
  2019-10-19 12:41 ` daniel
  0 siblings, 1 reply; 5+ messages in thread
From: spython01 @ 2019-10-17 14:23 UTC (permalink / raw)


What is the correct way to have cgit present the "about" tab for a
given repository (for example https://git.zx2c4.com/cgit/about/)?

I am running cgit version 1.2.1 on FreeBSD 12.0-RELEASE.

Below is a slightly modified version of my /usr/local/etc/cgitrc file.
I am able to output an "about" page for the entire site using

root-readme=/usr/home/username/repos/about

but I can't get the "about" tabs to show for individual repositories.
Within the repo itself, I do have a README.md file:
Mode Name Size
-rw-r--r-- .gitignore 93
-rw-r--r-- README.md 60

Thanks
Samir

/usr/local/etc/cgitrc:

css=/cgit.css
#logo=/cgit.png
logo=/favicon.png

# Add a cgit favicon
favicon=/favicon.png

robots=noindex, nofollow

virtual-root=/

root-title=CGIT
root-desc=description goes here

clone-url=git://git.example.com

enable-index-links=1
enable-log-filecount=1
enable-log-linecount=1
enable-commit-graph=1
enable-remote-branches=1

snapshots=tar.gz tar.bz
max-stats=quarter
#root-readme=/usr/local/www/cgit/about.htm
root-readme=/usr/home/username/repos/about

scan-path=/usr/home/username/repos

# Show owner on index page
enable-index-owner=0

##
## Search for these files in the root of the default branch of repositories
## for coming up with the about page:
##
readme=:README.md
readme=:readme.md
readme=:README.mkd
readme=:readme.mkd
readme=:README.rst
readme=:readme.rst
readme=:README.html
readme=:readme.html
readme=:README.htm
readme=:readme.htm
readme=:README.txt
readme=:readme.txt
readme=:README
readme=:readme
readme=:INSTALL.md
readme=:install.md
readme=:INSTALL.mkd
readme=:install.mkd
readme=:INSTALL.rst
readme=:install.rst
readme=:INSTALL.html
readme=:install.html
readme=:INSTALL.htm
readme=:install.htm
readme=:INSTALL.txt
readme=:install.txt
readme=:INSTALL
readme=:install


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

* Viewing Repository "About" Tab
  2019-10-17 14:23 Viewing Repository "About" Tab spython01
@ 2019-10-19 12:41 ` daniel
  2019-10-19 17:08   ` spython01
  0 siblings, 1 reply; 5+ messages in thread
From: daniel @ 2019-10-19 12:41 UTC (permalink / raw)


On Thu, Oct 17, 2019 at 10:23:46AM -0400, Samir Parikh wrote:

> What is the correct way to have cgit present the "about" tab for a
> given repository (for example https://git.zx2c4.com/cgit/about/)?

The repo.readme section of the man page (cgitrc(5)) has a pretty good
write up of how to configure about pages on a per-repo basis. The readme
entry in cgitrc (*not* root-readme) acts as a default list.

I personally just keep all of the entries defined in cgitrc and dispense
with the per-repo configuration. My cgitrc looks like this:

readme=:README.md
readme=:README.rst

That way cgit will globally render README pages written in Markdown or
reStructuredText.

-- 
Daniel Moch
daniel at danielmoch.com
http://djmoch.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20191019/b81c251f/attachment.asc>


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

* Viewing Repository "About" Tab
  2019-10-19 12:41 ` daniel
@ 2019-10-19 17:08   ` spython01
  2019-10-19 18:42     ` daniel
  0 siblings, 1 reply; 5+ messages in thread
From: spython01 @ 2019-10-19 17:08 UTC (permalink / raw)


On Sat, Oct 19, 2019 at 8:41 AM Daniel Moch <daniel at danielmoch.com> wrote:
> I personally just keep all of the entries defined in cgitrc and dispense
> with the per-repo configuration. My cgitrc looks like this:
>
> readme=:README.md
> readme=:README.rst
>
> That way cgit will globally render README pages written in Markdown or
> reStructuredText.

If I read this correctly, I think I'm doing the same thing (my cgitrc
configuration is in the original message).  I don't have any per-repo
configuration in my cgitrc.  I just have a bunch of `readme=:` entries
like you.  Then, I create a README.md file in each repo as you.  But
for some reason, the "About" tab for each repo does not appear.


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

* Viewing Repository "About" Tab
  2019-10-19 17:08   ` spython01
@ 2019-10-19 18:42     ` daniel
  2019-10-21  0:51       ` spython01
  0 siblings, 1 reply; 5+ messages in thread
From: daniel @ 2019-10-19 18:42 UTC (permalink / raw)


On Sat, Oct 19, 2019 at 01:08:01PM -0400, Samir Parikh wrote:

> If I read this correctly, I think I'm doing the same thing

Yes, sorry. I started reading, got to root-readme, and jumped to
conclusions.

The scan-path line needs to be at the end of your cgitrc. Right now
you've got it before all of the readme declarations, which will cause
exactly this behavior.

-- 
Daniel Moch
daniel at danielmoch.com
http://djmoch.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20191019/e95ce810/attachment.asc>


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

* Viewing Repository "About" Tab
  2019-10-19 18:42     ` daniel
@ 2019-10-21  0:51       ` spython01
  0 siblings, 0 replies; 5+ messages in thread
From: spython01 @ 2019-10-21  0:51 UTC (permalink / raw)


On Sat, Oct 19, 2019 at 2:42 PM Daniel Moch <daniel at danielmoch.com> wrote:
> The scan-path line needs to be at the end of your cgitrc. Right now
> you've got it before all of the readme declarations, which will cause
> exactly this behavior.

That solved the issue.  Thanks, Daniel.

Samir


^ 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-10-17 14:23 Viewing Repository "About" Tab spython01
2019-10-19 12:41 ` daniel
2019-10-19 17:08   ` spython01
2019-10-19 18:42     ` daniel
2019-10-21  0:51       ` spython01

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