Skip to content

Commit 57c0bbf

Browse files
committed
No baseurl
1 parent 33b31dd commit 57c0bbf

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ email: [email protected]
44
description: > # this means to ignore newlines until "baseurl:"
55
A site for tracking software development work in the Penn-CHOP Microbiome
66
Program. Mostly for internal use, but feel free to look around.
7-
baseurl: "/dev" # the subpath of your site, e.g. /blog/
7+
baseurl: "" # the subpath of your site, e.g. /blog/
88
url: "http://pennchopmicrobiomeprogram.github.io" # the base hostname & protocol for your site
99
github_username: PennChopMicrobiomeProgram
1010

index.html

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,23 @@ <h1 class="page-heading">Software</h1>
3535
const repos = await PCMPresponse.json();
3636
const SLresponse = await fetch(`https://api.github.com/orgs/sunbeam-labs/repos`);
3737
repos.push(...(await SLresponse.json()));
38+
console.log(repos);
3839

39-
// Fetch the latest commit date for each repository
40-
const reposWithCommits = await Promise.all(repos.map(async repo => {
41-
const commitsResponse = await fetch(repo.commits_url.replace('{/sha}', ''));
42-
const commits = await commitsResponse.json();
43-
repo.latestCommitDate = commits[0]?.commit?.committer?.date || '';
44-
return repo;
45-
}));
46-
47-
// Sort repositories by the latest commit date
48-
reposWithCommits.sort((a, b) => new Date(b.latestCommitDate) - new Date(a.latestCommitDate));
40+
// Sort repos by 'updated_at'
41+
repos.sort((a, b) => new Date(b.updated_at) - new Date(a.updated_at));
4942

5043
const ul = document.querySelector('.post-list');
51-
reposWithCommits.forEach(repo => {
44+
repos.forEach(repo => {
5245
const li = document.createElement('li');
5346
const a = document.createElement('a');
5447
a.href = repo.html_url;
5548
a.textContent = repo.name;
5649
li.appendChild(a);
50+
51+
const issues = document.createElement('p');
52+
issues.textContent = `Open issues: ${repo.open_issues}`;
53+
li.appendChild(issues);
54+
5755
ul.appendChild(li);
5856
});
5957
}

0 commit comments

Comments
 (0)