On Thu, 2019-03-07 at 10:33 +0100, Bertrand Delacretaz wrote:
> Hi
> 
> On Wed, Mar 6, 2019 at 7:56 PM Daniel Klco <dk...@apache.org> wrote:
> > ...I wonder if a low effort option
> > would be to add a metadata field for the project(s) to link
> > documentation
> > pages in github, something like:..
> ...
> > tags=tag1,tag2
> > repos=auth-form,scripting-jsp-taglib
> ...
> 
> Great idea!
> 
> If we use tags for this we get the reverse linking for free...I just
> tried that with this commit:
> 
> https://github.com/apache/sling-site/commit/9e50d9c5c25823b6ff7daa8ceae7c16ba146a326
> (reverted later as those long tags cause somewhat of a mess on the
> pages)
> 
> which then activates
> https://sling.apache.org/tags/repo:sling-org-apache-sling-repoinit-parser.html
> to list all pages that refer to that repository, allowing the reverse
> link to be automated.
> 
> If we use that method we should adapt the html templates to ignore
> those repo: tags when listing tags at the top of the page, and maybe
> list them separately in the tags pages like
> https://sling.apache.org/tags/authentication.html
> 
> ...so maybe it's not simpler to implement than what you suggest
> (thinking outloud here). I like both options!

Cool ideas! I've added a problem statement as PRB-GHDOC in the wiki
page.

I've also been thinking about this a bit and I think the tags/repos
idea is worthwile.

One idea, as Dan mentioned, is to add the repos think and generate tags
at the end of the page. The reverse would be to also have a pom.xml
property (or .sling-module.json entry?) that lists the short name of
the page under https://sling.apache.org/documentation/bundles/ , e.g.
for the jcr.conteloader this would be 'content-loading-jcr-
contentloader.html'.

I think that, additionally, we should consider importing the markdown
pages from GitHub to the sling site, something along the lines of:

- generate a page type 'github readme'
- the page will have no content, but only metadata ( repo name? )
- when building the page rendering will consist of pulling the github
readme into place and then applying the markdown transformations

There are complications, but I think that at least for small modules
this could be great win as we have a large number of modules that are
not present on the sling site.

Robert


[1]: 
https://github.com/apache/sling-site/blob/9e50d9c5c25823b6ff7daa8ceae7c16ba146a326/src/main/jbake/content/documentation/bundles/repository-initialization.md

Reply via email to