You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2021/07/02 09:13:01 UTC
[sling-site] branch master updated: Add module descriptions in
repolist + fix wrong NO GROUP SET selection
This is an automated email from the ASF dual-hosted git repository.
bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-site.git
The following commit(s) were added to refs/heads/master by this push:
new 8b1ff4c Add module descriptions in repolist + fix wrong NO GROUP SET selection
8b1ff4c is described below
commit 8b1ff4c01dd6a366d1016f9948251d9c49454e5f
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Fri Jul 2 11:12:37 2021 +0200
Add module descriptions in repolist + fix wrong NO GROUP SET selection
---
src/main/jbake/content/repolist.md | 10 +++++-----
src/main/jbake/templates/repolist.tpl | 23 ++++++++++++++++-------
2 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/src/main/jbake/content/repolist.md b/src/main/jbake/content/repolist.md
index 4220d95..5dbc070 100644
--- a/src/main/jbake/content/repolist.md
+++ b/src/main/jbake/content/repolist.md
@@ -1,17 +1,17 @@
title=Sling Git Repositories
type=repolist
status=published
-tags=sourcecode,development
+tags=sourcecode,development,git
tableOfContents=false
instructions=To sync this with new repositories, rebuild the default.xml file at https://github.com/apache/sling-aggregator and rebuild the website
~~~~~~
This is the list of all Sling source code repositories, generated by a script found in
-the [sling-aggregator](https://github.com/apache/sling-aggregator) project.
+the [sling-aggregator](https://github.com/apache/sling-aggregator) project, where
+you can also find instructions on how to checkout all repositories using the
+`repo` tool.
-They should be classified in categories like 'core', 'contrib' etc. as we did
-in our svn repository. This is still a work in progress, if you're unsure about
-the status of one of these repositories please ask on our dev list.
+If you're unsure about the status of one of these repositories please ask on our dev list.
We also have specific documentation about some of these modules on the
[Bundles](documentation/bundles.html) page.
\ No newline at end of file
diff --git a/src/main/jbake/templates/repolist.tpl b/src/main/jbake/templates/repolist.tpl
index cfbf970..96a1fcc 100644
--- a/src/main/jbake/templates/repolist.tpl
+++ b/src/main/jbake/templates/repolist.tpl
@@ -18,10 +18,6 @@ layout 'layout/main.tpl', true,
include template : 'lastmodified-brick.tpl'
},
bodyContents: contents {
- section(class:"wrap"){
- yieldUnescaped U.processBody(content, config)
- }
-
def filename = "${config.repolist_path}"
def file = new File(filename)
def repos = new XmlSlurper().parse(file)
@@ -29,10 +25,12 @@ layout 'layout/main.tpl', true,
Set groups = []
// Get the groups
+ def reposCount = 0;
repos.'**'.findAll {
node ->
node.name() == 'project' }*.each() {
p ->
+ reposCount++
def group = p.attributes().groups
if(group) {
groups.add(group)
@@ -43,6 +41,14 @@ layout 'layout/main.tpl', true,
groups=groups.toSorted()
groups.add(NOGROUP)
+ // Mardown + computed summary
+ section(class:"wrap"){
+ yieldUnescaped U.processBody(content, config)
+ p() {
+ yield("A total of ${reposCount} repositories are listed below, in ${groups.size()} groups.")
+ }
+ }
+
// List projects by group
groups.each() {
group ->
@@ -51,16 +57,19 @@ layout 'layout/main.tpl', true,
}
newLine()
- ul() {
+ ul(class:"repolist") {
repos.'**'.findAll {
node ->
- node.name() == 'project' && (node.attributes().groups == group || group == NOGROUP && !node.attributes().hasProperty('groups'))
+ node.name() == 'project' && (group == NOGROUP ? !node.attributes().groups : node.attributes().groups == group)
}*.each() {
p ->
- li() {
+ li(class:"module") {
a(href:"${config.sling_github_baseURL}${p.attributes().name}") {
yield("${p.attributes().path}")
}
+ span(class:"description") {
+ yield(" - ${p.attributes().description}")
+ }
}
newLine()
}