On Mon, 27 Nov 2023 at 20:27, Roy Lenferink <rlenfer...@apache.org> wrote:
>
> Op ma 27 nov 2023 om 20:26 schreef sebb <seb...@gmail.com>
>
> > On Mon, 27 Nov 2023 at 14:20, Bertrand Delacretaz
> > <bdelacre...@apache.org> wrote:
> > >
> > > Hi,
> > >
> > > I'd like to add an "edit in GitHub" link to the pages of
> > > https://community.apache.org/ , like we have in Sling [1].
> >
> > Personally, I would rather the link was to the page source in the comdev
> > repo.
> > Otherwise one is forced to clone the repo before one can see how easy
> > the change is likely to be.
>
>
> You mean something like the following?
>
> https://celix.apache.org/contributing/releasing.html

No, because that forces one to clone the site up-front.

Providing a link to the source page does mean an extra click to edit
the file, but it means one can still provide a patch if one does not
wish to subscribe to GH.

> The source for how Celix handles that can be found here:
>
> https://github.com/apache/celix-site/blob/master/layouts/_default/baseof.html#L50
>
>
>
> >
> > > But I don't know how to do it with Hugo - before I dig too deep, does
> > > someone have an example?
> >
> > Looks like the following can be used in the baseof.html template file
> > as the URL target of a link:
> >
> > https://github.com/apache/comdev-site/blob/main/source/{{ .Page.File }}
> >
> > This can be nested in the conditional:
> >
> > {{ if .IsPage }}   {{ end }}
> >
> > > For some pages like [2] which are generated instead of being backed by
> > > a Markdown file, we'd need to either link to the repository home, or
> > > add no link.
> > >
> > > -Bertrand
> > >
> > > [1] https://sling.apache.org/documentation/development.html (at the
> > > bottom, "this page can be edited...")
> > > [2] https://community.apache.org/tags.html
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscr...@community.apache.org
> > > For additional commands, e-mail: dev-h...@community.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscr...@community.apache.org
> > For additional commands, e-mail: dev-h...@community.apache.org
> >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@community.apache.org
For additional commands, e-mail: dev-h...@community.apache.org

Reply via email to