Skip to content
Merged
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
7 changes: 7 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,12 @@ module.exports = {
parser: "go-template",
},
},
{
files: [".vscode/*.json"],
options: {
parser: "jsonc",
trailingComma: "all",
},
},
],
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["budparr.language-hugo-vscode"],
}
2 changes: 2 additions & 0 deletions assets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2967,7 +2967,9 @@ body {
.command-icon {
width: 32px;
height: 32px;
appearance: none;
background-color: #ccc;
border: none;
border-radius: 50%;
display: flex;
justify-content: center;
Expand Down
6 changes: 5 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
baseURL = "https://scverse.org/"
languageCode = "en-us"
locale = "en-us"
title = "scverse"
description = "Foundational tools for omics data in the life sciences"

Expand All @@ -12,6 +12,10 @@ enableRobotsTXT = true
images = ["img/scverse-social-card.png"]
description = "Foundational tools for omics data in the life sciences"

# No content uses tags or categories, so turn off Hugo's built-in taxonomies:
# they only generated empty /tags/ and /categories/ pages and a missing-template warning.
[taxonomies]

[outputs]
home = ["html", "rss", "entities"]

Expand Down
2 changes: 1 addition & 1 deletion layouts/blog/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent {{ .Site.Title }} news</description>
{{ with .Site.LanguageCode }}
{{ with .Site.Language.Locale }}
<language>{{.}}</language>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/events/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent {{ .Site.Title }} news</description>
{{ with .Site.LanguageCode }}
{{ with .Site.Language.Locale }}
<language>{{.}}</language>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
Expand Down
12 changes: 6 additions & 6 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
<div class="interactive-card" id="interactive-card">
<div class="demo-header">
<div class="command-input" id="cmd1">
<div
<button
class="command-icon"
id="run-cmd1"
role="button"
type="button"
tabindex="0"
aria-label="Run import scanpy as sc"
>
Expand All @@ -33,16 +33,16 @@
d="M361 215C375.3 223.8 384 239.3 384 256C384 272.7 375.3 288.2 361 296.1L73.03 472.1C58.21 482 39.66 482.4 24.52 473.9C9.377 465.4 0 449.4 0 432V80C0 62.64 9.377 46.63 24.52 38.13C39.66 29.64 58.21 29.99 73.03 39.04L361 215z"
/>
</svg>
</div>
</button>
<div class="command-text">import scanpy as sc</div>
<div class="command-status" id="status-cmd1"></div>
<div class="executing-animation" id="exec-anim-1"></div>
</div>
<div class="command-input" id="cmd2">
<div
<button
class="command-icon"
id="run-cmd2"
role="button"
type="button"
tabindex="0"
aria-label="Run sc.pl.umap(data, color='clusters')"
>
Expand All @@ -51,7 +51,7 @@
d="M361 215C375.3 223.8 384 239.3 384 256C384 272.7 375.3 288.2 361 296.1L73.03 472.1C58.21 482 39.66 482.4 24.52 473.9C9.377 465.4 0 449.4 0 432V80C0 62.64 9.377 46.63 24.52 38.13C39.66 29.64 58.21 29.99 73.03 39.04L361 215z"
/>
</svg>
</div>
</button>
<div class="command-text">sc.pl.umap(data, color='clusters')</div>
<div class="command-status" id="status-cmd2"></div>
<div class="executing-animation" id="exec-anim-2"></div>
Expand Down
22 changes: 6 additions & 16 deletions layouts/packages/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,11 @@ <h1>{{ .Title }}</h1>
<article class="post">
{{ $sections := index .Params.sections 0 }}
<div class="post-content" id="packages-content">
{{ $registryBase := "https://scverse.org/ecosystem-packages/" }}
{{ $data := resources.GetRemote (printf "%spackages.json" $registryBase) }}
{{ $pkgs := transform.Unmarshal $data.Content }}
{{ $registry := partialCached "registry.html" "registry" }}
{{ $registryBase := $registry.base }}
{{ $pkgs := $registry.pkgs }}

{{/* ponytail: registry has no order key, so core packages are alphabetical; re-curate once one exists. */}}
{{ $core := slice }}
{{ range where $pkgs "category" "in" (slice "core-datastructure" "core-framework") }}
{{ $core = $core | append (merge . (dict "sortkey" (lower .name))) }}
{{ end }}
{{ $core = sort $core "sortkey" }}

{{ with $core }}
{{ with $registry.core }}
<h2 id="core-packages">Packages maintained by core team</h2>
{{ $sections.core_packages | markdownify }}
{{ with where . "category" "core-datastructure" }}
Expand Down Expand Up @@ -54,17 +47,15 @@ <h2 id="ecosystem">Ecosystem packages maintained by scverse community</h2>
{{ range $pkgs }}
{{ $tags := .tags | default slice }}
{{ $category := .primary_category | default "" }}
{{/* core-infrastructure is the scverse repos themselves, not packages, so it does not count here. */}}
{{ $core := in (slice "core-framework" "core-datastructure") (.category | default "") }}
{{ $isCore := in $registry.coreCategories (.category | default "") }}
{{ if and $category (not (in $categories $category)) }}
{{ $categories = $categories | append $category }}
{{ end }}
{{/* Registry descriptions are plain text with the odd bit of markdown and hard line breaks. */}}
{{ $desc := trim (.description | markdownify | plainify | htmlUnescape | replaceRE `\s+` " ") " " }}
{{ $search := lower (printf "%s %s %s %s %s" .name $desc (delimit $tags " ") $category .language) }}
{{ $items = $items | append (merge . (dict
"sortkey" (printf "%s %s" (cond $core "0" "1") (lower .name))
"core" $core
"core" $isCore
"normtags" $tags
"category" $category
"language" .language
Expand All @@ -73,7 +64,6 @@ <h2 id="ecosystem">Ecosystem packages maintained by scverse community</h2>
))
}}
{{ end }}
{{ $items = sort $items "sortkey" }}

{{/* Chip row: every category in the schema that is actually in use, biggest first. */}}
{{ $categoryCounts := slice }}
Expand Down
62 changes: 27 additions & 35 deletions layouts/partials/main/packages.html
Original file line number Diff line number Diff line change
@@ -1,43 +1,35 @@
<section id="packages">
<div class="section-heading">Core packages</div>
<div class="section-content">
{{ $registryBase := "https://scverse.org/ecosystem-packages/" }}
{{ $data := resources.GetRemote (printf "%spackages.json" $registryBase) }}
{{ with $data }}
{{/* ponytail: registry has no order key, so core packages are alphabetical; re-curate once one exists. */}}
{{ $core := slice }}
{{ range where (transform.Unmarshal .Content) "category" "in" (slice "core-datastructure" "core-framework") }}
{{ $core = $core | append (merge . (dict "sortkey" (lower .name))) }}
{{ end }}
{{ with sort $core "sortkey" }}
<div class="row" id="packages-list">
{{ range $p := . }}
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-6 py-3">
<div class="card border-0 bh-light px-3" id="{{ .name | urlize }}-tile">
<div class="package-icon my-4">
{{ with .logo }}
<img src="{{ printf "%s%s" $registryBase . }}" alt="Logo for {{ $p.name }}" />
{{ end }}
</div>
<div class="card-body package-text p-2">
<a
href="{{ .documentation_home | default .project_home }}"
class="stretched-link"
target="_blank"
aria-label="Link to the {{ .name }} website"
></a>
<h5 class="card-title mb-1 package-name">
{{ .name }}
</h5>
<p class="card-text package-desc">
{{ .description }}
</p>
</div>
{{ $registry := partialCached "registry.html" "registry" }}
{{ with $registry.core }}
<div class="row" id="packages-list">
{{ range $p := . }}
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-6 py-3">
<div class="card border-0 bh-light px-3" id="{{ .name | urlize }}-tile">
<div class="package-icon my-4">
{{ with .logo }}
<img src="{{ printf "%s%s" $registry.base . }}" alt="Logo for {{ $p.name }}" />
{{ end }}
</div>
<div class="card-body package-text p-2">
<a
href="{{ .documentation_home | default .project_home }}"
class="stretched-link"
target="_blank"
aria-label="Link to the {{ .name }} website"
></a>
<h5 class="card-title mb-1 package-name">
{{ .name }}
</h5>
<p class="card-text package-desc">
{{ .blurb }}
</p>
</div>
</div>
{{ end }}
</div>
{{ end }}
</div>
{{ end }}
</div>
{{ end }}
<a href="/packages">
<div class="more">View all scverse packages</div>
Expand Down
12 changes: 12 additions & 0 deletions layouts/partials/registry.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{/* The ecosystem package registry: base URL (logos are relative to it), all packages, and the core subset. */}}
{{ $base := "https://scverse.org/ecosystem-packages/" }}
{{ $data := resources.GetRemote (printf "%spackages.json" $base) }}
{{ $pkgs := transform.Unmarshal $data.Content }}
{{/* core-infrastructure is the scverse repos themselves, not packages, so it is not a core category here. */}}
{{ $coreCategories := slice "core-datastructure" "core-framework" }}
{{ return dict
"base" $base
"pkgs" $pkgs
"coreCategories" $coreCategories
"core" (where $pkgs "category" "in" $coreCategories)
}}