Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ output/
site/content/resources/mastodon.csv
site/content/members.adoc
site/content/stats.adoc
site/content/podcasts.adoc
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif
@echo 'JBang and JBake installations found.'

build: prerequisites-check
cd resources; jbang site.java ../java-champions.yml ../site/content/
cd resources; jbang site.java .. ../site/content/
cd site; jbake --bake

server: build
Expand Down
13 changes: 12 additions & 1 deletion resources/site.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ static class JavaChampion {
public List<String> status = new ArrayList<>();

String formatted() {
var b = new StringBuilder("|{counter:idx}\n")
var b = new StringBuilder()
.append("|[[")
.append(nameAsAnchor())
.append("]]{counter:idx}\n")
.append("|image:")
.append(avatar)
.append("[]");
Expand Down Expand Up @@ -217,6 +220,14 @@ boolean hasMastodon() {
String asMastodonCsvEntry() {
return social.getMastodonAccount() + ",true,false,";
}

String nameAsAnchor() {
// URL Encoding would have been _cleaner_ but that doesn't create output that works with flexmark
// instead this method will strip whitespace and punctuation
return name
.replaceAll("\\s", "")
.replaceAll("\\p{Punct}", "");
}
}

static class Country {
Expand Down
2 changes: 2 additions & 0 deletions site/assets/css/asciidoctor.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@import url(https://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.2.0/css/font-awesome.css);
/* Fix anchor offset (50px is collapsed navbar height + 10px buffer) */
html { scroll-padding-top: 60px; }
/* ========================================================================== Embedded content ========================================================================== */
/** Remove border when inside `a` element in IE 8/9. */
img { border: 0; }
Expand Down