Skip to content

Commit 3c2cda7

Browse files
Metadata front matter for apps (#2372)
* Initialize Software catalog * Serve catalog.json Plenty of refactoring/reorganization * Add software catalog appendix * Allow for getting site_url from environment Default to production url * Remove extra whitespace * Refactoring * Software catalog, phase 1 * Ignore file for revision-date plugin * Ignore commit for revision date plugin * Remove leftover scripts * Temporary amendment to FAQ * Fixes for catalog-hook * Refactor type hints for older Python version --------- Co-authored-by: Rasmus Kronberg <43936697+rkronberg@users.noreply.github.com>
1 parent 8856ee1 commit 3c2cda7

File tree

185 files changed

+2386
-500
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+2386
-500
lines changed

.git-revision-date-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Add metadata front matter
2+
d3b1642782b24ba19b6957d6e49ef67899ac132a
3+
d7aa3afdab66ff2e74dae96d5181676cb9aa93cb

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@ site/
66
.DS_Store
77
.idea/
88
__pycache__/
9+
10+
# These are generated by catalog-hook and only
11+
# written to the filesystem when MKDOCS_ENV=test:
12+
docs/apps/index.md
13+
docs/apps/by_discipline.md
14+
docs/apps/by_system.md

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ before_install:
99
env:
1010
global:
1111
- ENABLED_GIT_REVISION_DATE=false
12+
- MKDOCS_ENV=test
1213
script:
1314

1415
# Checks all files for commonly misspelled English words with client9's misspell

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ RUN if [ ! -d ".git" ]; then \
3232
git init && \
3333
git switch --force $repo_branch; \
3434
fi && \
35-
bash scripts/generate_alpha.sh && \
36-
bash scripts/generate_by_system.sh && \
3735
bash scripts/generate_new.sh && \
3836
bash scripts/generate_glossary.sh && \
3937
mkdocs build -d /usr/share/nginx/html

FAQ.md

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -355,13 +355,17 @@ Documentation for _Material for MkDocs_ has a [search feature](https://squidfunk
355355

356356
## How do I add a license tag to an application page?
357357

358-
The license tag is added inside a YAML front matter. The first lines in the Markdown file should be
359-
the front matter. Please note the enclosing dashes. A template for the front matter is
358+
The license tag is added inside the YAML front matter. Temporarily, the license type should be placed as a
359+
list item under `tags:` _and_ as a string in `license_type:`:
360360

361361
```yaml
362362
---
363363
tags:
364364
- <license>
365+
catalog:
366+
# ...
367+
license_type: <license>
368+
# ...
365369
---
366370
```
367371

@@ -372,36 +376,22 @@ The application will then be included on the Applications by license page automa
372376

373377
## How do I tag an application as available under a web interface?
374378

375-
As with [adding a license tag](#how-do-I-add-a-license-tag-to-an-application-page), an application
376-
can be tagged as available in a particular web interface. The application will then be listed under
377-
that web interface on the _Applications by availability_ page. The tags for web interfaces that an
378-
application is available on are added under the `system` key in the front matter.
379+
In the YAML front matter. The following would, for example, tag the application as available on
380+
Puhti, Mahti _and_ Puhti web interface.
379381

380382
```yaml
381383
---
382-
system:
383-
- www-<system1>
384-
- www-<system2>
384+
catalog:
385+
# ...
386+
available_on:
387+
- Puhti
388+
- Mahti
389+
- web_interfaces:
390+
- Puhti
391+
# ...
385392
---
386393
```
387394

388-
where `<system1>` or `<system2>` is one of the systems where a web interface is available, for
389-
example (prefixed with `www-`) `mahti` or `puhti`.
390-
391-
As a temporary workaround, to prevent an application getting listed under a system for merely
392-
mentioning the system, edit the [skip_system.txt](scripts/skip_system.txt) file.
393-
394-
```text
395-
Workaround:
396-
397-
...
398-
399-
SKIP_<system1> application.md
400-
SKIP_<system2> application.md
401-
```
402-
403-
where `<system1>` and `<system2>` are as above.
404-
405395
## How do I add footnotes?
406396

407397
Usage of the footnotes feature is described
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
.md-typeset .app-heading-row {
2+
display: flex;
3+
justify-content: start;
4+
align-content: center;
5+
margin: 0 0 1.25em;
6+
}
7+
8+
.md-typeset .app-heading {
9+
margin: unset;
10+
}
11+
12+
.md-typeset .app-description {
13+
font-weight: 300;
14+
text-align: center;
15+
color: var(--c-tertiary-800);
16+
margin-left: .5ch;
17+
}
18+
19+
.md-typeset .app-heading-row .app-description {
20+
font-size: 1.50em;
21+
}
22+
23+
.md-typeset .app-link {
24+
margin-right: 1em;
25+
}
26+
27+
.md-typeset nav .app-tags {
28+
margin: 0 0 .75em;
29+
}
30+
31+
.md-typeset c-accordion-item {
32+
margin-bottom: 1em;
33+
}
34+
35+
.md-typeset .alpha-toc {
36+
max-width: 80%;
37+
}
38+
39+
.md-typeset .alpha-toc ul {
40+
display: flex;
41+
justify-content: start;
42+
flex-wrap: wrap;
43+
margin-left: 0;
44+
}
45+
46+
.md-typeset .alpha-toc ul li {
47+
list-style-type: none;
48+
margin: 0 .25em;
49+
text-align: center;
50+
}
51+
52+
.md-typeset .alpha-toc a {
53+
padding: .125em .5em;
54+
border-radius: 25%;
55+
font-size: large;
56+
font-weight: var(--csc-font-weight--bold);
57+
}

csc-overrides/assets/stylesheets/extra.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@
1515
@import url(./tags.css);
1616
@import url(./title.css);
1717
@import url(./video.css);
18+
@import url(./catalog.css);
1819

1920
@import url(./sensitive-data.css);
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
.md-tag {
1+
.md-typeset .md-tag {
22
border: 1px solid var(--md-primary-fg-color);
3-
color: var(--md-primary-fg-color) !important;
4-
background-color: transparent !important;
3+
color: var(--md-primary-fg-color);
4+
background-color: transparent;
55
border-radius: 15px;
6-
font-weight: 400 !important;
7-
text-decoration: none !important;
6+
font-weight: 400;
7+
text-decoration: none;
88
}
99

10-
:target>.md-tag {
11-
color: var(--md-primary-bg-color) !important;
12-
background-color: var(--md-primary-fg-color) !important;
10+
.md-typeset :target>.md-tag {
11+
color: var(--md-primary-bg-color);
12+
background-color: var(--md-primary-fg-color);
1313
}
1414

15-
a.md-tag:is(:active, :hover) {
16-
background-color: var(--md-accent-bg-color) !important;
15+
.md-typeset .md-tag:is(:active, :hover) {
16+
background-color: var(--md-accent-bg-color);
1717
}

csc-overrides/assets/stylesheets/variables.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Museo Sans font */
22
@import url("https://use.typekit.net/csv4mjm.css");
33
/* CSC Design System custom properties */
4-
@import url(https://cdn.jsdelivr.net/npm/@cscfi/csc-ui@2.1.11/dist/styles/css/theme.css);
4+
@import url(https://cdn.jsdelivr.net/npm/@cscfi/csc-ui@2.3.0/dist/styles/css/theme.css);
55

66
:root {
77
--md-text-font: "museo-sans";

development/packages.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ mkdocs-git-revision-date-localized-plugin
55
mkdocs-redirects
66
mkdocs-section-index
77
feedparser
8+
pyhumps

0 commit comments

Comments
 (0)