Skip to content

Commit e754bd6

Browse files
committed
feat: 🎉 first commit!
0 parents  commit e754bd6

11 files changed

Lines changed: 673 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Build website
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
# you need these permissions to publish to GitHub pages
9+
permissions:
10+
contents: write
11+
pages: write
12+
13+
jobs:
14+
build-deploy:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Check out repository
19+
uses: actions/checkout@v4
20+
21+
- name: Install yq
22+
run: sudo snap install yq
23+
24+
- name: Set up Quarto
25+
uses: quarto-dev/quarto-actions/setup@v2
26+
27+
# NOTE: If Publishing to GitHub Pages, set the permissions correctly (see top of this yaml)
28+
- name: Publish to GitHub Pages (and render)
29+
uses: quarto-dev/quarto-actions/publish@v2
30+
with:
31+
target: gh-pages
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.Rproj.user
2+
.Rhistory
3+
.RData
4+
.Ruserdata
5+
.httr-oauth
6+
.DS_Store
7+
_site
8+
/.quarto/

LICENSE.md

Lines changed: 395 additions & 0 deletions
Large diffs are not rendered by default.

_build.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/sh
2+
3+
# Get the details of the repositories, to later use to include in the website.
4+
get_website_repo_details() {
5+
gh repo list steno-aarhus \
6+
--json name,description,homepageUrl \
7+
--visibility public \
8+
--no-archived \
9+
--source \
10+
--topic ${1} |
11+
jq
12+
}
13+
14+
# For larger project websites.
15+
get_website_repo_details website,project > data/projects.json
16+
17+
# For documentation/resource/support websites.
18+
get_website_repo_details resource,website > data/resources.json
19+
20+
# For software projects like R packages.
21+
get_website_repo_details software,website > data/software.json
22+
23+
# For event websites like courses, seminars, conferences.
24+
get_website_repo_details event,website > data/events.json
25+
26+
# For group websites.
27+
get_website_repo_details group,website > data/groups.json
28+
29+
# For individual research projects, without websites.
30+
get_website_repo_details research-project > data/research-projects.json
31+
32+
# Quarto expects the data in YAML format, so we need to convert the JSON files to YAML.
33+
for file in data/*.json;
34+
do
35+
# This seems to give an error...
36+
# yq -oy $file > "data/$(basename "$file" .json).yaml"
37+
38+
# So have to first save it to a variable and then write it to a file.
39+
contents=$(yq -P -o=yaml $file)
40+
echo "$contents" > "data/$(basename "$file" .json).yaml"
41+
done
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
meta:
2+
name:
3+
full: Steno Diabetes Center Aarhus
4+
short: Steno Aarhus
5+
link:
6+
github: https://github.com/steno-aarhus
7+
8+
color:
9+
palette:
10+
rm-red: "#990032"
11+
primary: rm-red
12+
13+
typography:
14+
fonts:
15+
- family: noto sans
16+
source: "bunny"
17+
# 500 and 600 weights are used implicitly. E.g., 500 for bold text, 600 for table headers
18+
weight: [300, 500, 600]
19+
- family: poppins
20+
source: "bunny"
21+
weight: 400
22+
- family: roboto mono
23+
source: "bunny"
24+
base:
25+
family: noto sans
26+
weight: 300
27+
headings:
28+
family: poppins
29+
monospace: roboto mono
30+
31+
defaults:
32+
bootstrap:
33+
rules: |
34+
.profile-picture {
35+
display: inline-block;
36+
border-radius: 50%;
37+
object-fit: cover;
38+
width: 200px;
39+
height: 200px;
40+
text-align: center;
41+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
title: sdca-theme
2+
author: Luke W. Johnston
3+
version: 0.3.0
4+
quarto-required: ">=1.3.0"
5+
contributes:
6+
formats:
7+
html:
8+
toc: true
9+
from: markdown+emoji
10+
11+
project:
12+
project:
13+
type: website
14+
website:
15+
repo-branch: main
16+
repo-actions: [edit, issue, source]
17+
search:
18+
location: navbar
19+
type: textbox
20+
navbar:
21+
pinned: true
22+
tools:
23+
- icon: github
24+
href: "https://github.com/steno-aarhus/"
25+
aria-label: "GitHub icon: Link to SDCA GitHub organization page"
26+
- icon: globe
27+
href: directory.qmd
28+
aria-label: "Globe icon: Link to directory page of other SDCA websites"
29+
page-footer:
30+
center:
31+
- text: "License: CC BY 4.0"
32+
href: https://creativecommons.org/licenses/by/4.0/
33+
- text: "Contributing guidelines"
34+
href: https://steno-aarhus.github.io/research/CONTRIBUTING.html
35+
- text: "Code of Conduct"
36+
href: https://steno-aarhus.github.io/research/CODE_OF_CONDUCT.html
37+
38+
reference-location: margin
39+
brand: _brand.yml
40+
48.7 KB
Loading
860 KB
Loading

_quarto.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
project:
2+
type: sdca-theme
3+
pre-render: sh ./_build.sh
4+
5+
website:
6+
title: "SDCA GitHub Pages"
7+
site-url: "https://steno-aarhus.github.io/"
8+
repo-url: "https://github.com/steno-aarhus/steno-aarhus.github.io"
9+
10+
format: sdca-theme-html
11+
12+
editor:
13+
markdown:
14+
wrap: 72
15+
canonical: true

gallery.ejs.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<% for (const item of items) { %>
2+
<%if (item.homepageUrl) { %>
3+
[<%= item.name %>](<%- item.homepageUrl %>)
4+
<% } else { %>
5+
[<%= item.name %>](https://github.com/steno-aarhus/<%= item.name %>)
6+
<% } %>
7+
8+
: <%= item.description %>
9+
<% } %>

0 commit comments

Comments
 (0)