Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Quarto GHA Workflow Runner committed Jun 3, 2024
1 parent a626e15 commit 359f357
Show file tree
Hide file tree
Showing 19 changed files with 1,294 additions and 447 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
15c66c27
fc15bd82
94 changes: 78 additions & 16 deletions about.html

Large diffs are not rendered by default.

94 changes: 78 additions & 16 deletions calendar.html

Large diffs are not rendered by default.

94 changes: 78 additions & 16 deletions expectations.html

Large diffs are not rendered by default.

94 changes: 78 additions & 16 deletions figures.html

Large diffs are not rendered by default.

94 changes: 78 additions & 16 deletions index.html

Large diffs are not rendered by default.

94 changes: 78 additions & 16 deletions learning_resources.html

Large diffs are not rendered by default.

94 changes: 78 additions & 16 deletions methods.html

Large diffs are not rendered by default.

94 changes: 78 additions & 16 deletions online_resources.html

Large diffs are not rendered by default.

94 changes: 78 additions & 16 deletions presentation.html

Large diffs are not rendered by default.

94 changes: 78 additions & 16 deletions scicomm.html

Large diffs are not rendered by default.

396 changes: 198 additions & 198 deletions search.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion site_libs/bootstrap/bootstrap.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions site_libs/quarto-nav/quarto-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ window.document.addEventListener("DOMContentLoaded", function () {
const links = window.document.querySelectorAll("a");
for (let i = 0; i < links.length; i++) {
if (links[i].href) {
links[i].dataset.originalHref = links[i].href;
links[i].href = links[i].href.replace(/\/index\.html/, "/");
}
}
Expand Down
65 changes: 52 additions & 13 deletions site_libs/quarto-search/quarto-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,18 @@ function showCopyLink(query, options) {
// create the index
var fuseIndex = undefined;
var shownWarning = false;

// fuse index options
const kFuseIndexOptions = {
keys: [
{ name: "title", weight: 20 },
{ name: "section", weight: 20 },
{ name: "text", weight: 10 },
],
ignoreLocation: true,
threshold: 0.1,
};

async function readSearchData() {
// Initialize the search index on demand
if (fuseIndex === undefined) {
Expand All @@ -685,17 +697,7 @@ async function readSearchData() {
shownWarning = true;
return;
}
// create fuse index
const options = {
keys: [
{ name: "title", weight: 20 },
{ name: "section", weight: 20 },
{ name: "text", weight: 10 },
],
ignoreLocation: true,
threshold: 0.1,
};
const fuse = new window.Fuse([], options);
const fuse = new window.Fuse([], kFuseIndexOptions);

// fetch the main search.json
const response = await fetch(offsetURL("search.json"));
Expand Down Expand Up @@ -1226,8 +1228,34 @@ function algoliaSearch(query, limit, algoliaOptions) {
});
}

function fuseSearch(query, fuse, fuseOptions) {
return fuse.search(query, fuseOptions).map((result) => {
let subSearchTerm = undefined;
let subSearchFuse = undefined;
const kFuseMaxWait = 125;

async function fuseSearch(query, fuse, fuseOptions) {
let index = fuse;
// Fuse.js using the Bitap algorithm for text matching which runs in
// O(nm) time (no matter the structure of the text). In our case this
// means that long search terms mixed with large index gets very slow
//
// This injects a subIndex that will be used once the terms get long enough
// Usually making this subindex is cheap since there will typically be
// a subset of results matching the existing query
if (subSearchFuse !== undefined && query.startsWith(subSearchTerm)) {
// Use the existing subSearchFuse
index = subSearchFuse;
} else if (subSearchFuse !== undefined) {
// The term changed, discard the existing fuse
subSearchFuse = undefined;
subSearchTerm = undefined;
}

// Search using the active fuse
const then = performance.now();
const resultsRaw = await index.search(query, fuseOptions);
const now = performance.now();

const results = resultsRaw.map((result) => {
const addParam = (url, name, value) => {
const anchorParts = url.split("#");
const baseUrl = anchorParts[0];
Expand All @@ -1244,4 +1272,15 @@ function fuseSearch(query, fuse, fuseOptions) {
crumbs: result.item.crumbs,
};
});

// If we don't have a subfuse and the query is long enough, go ahead
// and create a subfuse to use for subsequent queries
if (now - then > kFuseMaxWait && subSearchFuse === undefined) {
subSearchTerm = query;
subSearchFuse = new window.Fuse([], kFuseIndexOptions);
resultsRaw.forEach((rr) => {
subSearchFuse.add(rr.item);
});
}
return results;
}
52 changes: 26 additions & 26 deletions sitemap.xml
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://sipbs-compbiol.github.io/bm432-project/scicomm.html</loc>
<lastmod>2024-01-30T09:13:00.689Z</lastmod>
<loc>https://sipbs-compbiol.github.io/bm432-project/presentation.html</loc>
<lastmod>2024-06-03T14:49:30.725Z</lastmod>
</url>
<url>
<loc>https://sipbs-compbiol.github.io/bm432-project/thesis.html</loc>
<lastmod>2024-01-30T09:13:00.689Z</lastmod>
<loc>https://sipbs-compbiol.github.io/bm432-project/learning_resources.html</loc>
<lastmod>2024-06-03T14:49:30.725Z</lastmod>
</url>
<url>
<loc>https://sipbs-compbiol.github.io/bm432-project/presentation.html</loc>
<lastmod>2024-01-30T09:13:00.689Z</lastmod>
<loc>https://sipbs-compbiol.github.io/bm432-project/expectations.html</loc>
<lastmod>2024-06-03T14:49:30.721Z</lastmod>
</url>
<url>
<loc>https://sipbs-compbiol.github.io/bm432-project/online_resources.html</loc>
<lastmod>2024-01-30T09:13:00.689Z</lastmod>
<loc>https://sipbs-compbiol.github.io/bm432-project/methods.html</loc>
<lastmod>2024-06-03T14:49:30.725Z</lastmod>
</url>
<url>
<loc>https://sipbs-compbiol.github.io/bm432-project/figures.html</loc>
<lastmod>2024-01-30T09:13:00.689Z</lastmod>
<loc>https://sipbs-compbiol.github.io/bm432-project/index.html</loc>
<lastmod>2024-06-03T14:49:30.721Z</lastmod>
</url>
<url>
<loc>https://sipbs-compbiol.github.io/bm432-project/time_management.html</loc>
<lastmod>2024-01-30T09:13:00.689Z</lastmod>
<loc>https://sipbs-compbiol.github.io/bm432-project/thesis.html</loc>
<lastmod>2024-06-03T14:49:30.725Z</lastmod>
</url>
<url>
<loc>https://sipbs-compbiol.github.io/bm432-project/software.html</loc>
<lastmod>2024-01-30T09:13:00.689Z</lastmod>
<loc>https://sipbs-compbiol.github.io/bm432-project/about.html</loc>
<lastmod>2024-06-03T14:49:30.681Z</lastmod>
</url>
<url>
<loc>https://sipbs-compbiol.github.io/bm432-project/index.html</loc>
<lastmod>2024-01-30T09:13:00.689Z</lastmod>
<loc>https://sipbs-compbiol.github.io/bm432-project/time_management.html</loc>
<lastmod>2024-06-03T14:49:30.725Z</lastmod>
</url>
<url>
<loc>https://sipbs-compbiol.github.io/bm432-project/about.html</loc>
<lastmod>2024-01-30T09:13:00.649Z</lastmod>
<loc>https://sipbs-compbiol.github.io/bm432-project/figures.html</loc>
<lastmod>2024-06-03T14:49:30.721Z</lastmod>
</url>
<url>
<loc>https://sipbs-compbiol.github.io/bm432-project/expectations.html</loc>
<lastmod>2024-01-30T09:13:00.689Z</lastmod>
<loc>https://sipbs-compbiol.github.io/bm432-project/calendar.html</loc>
<lastmod>2024-06-03T14:49:30.721Z</lastmod>
</url>
<url>
<loc>https://sipbs-compbiol.github.io/bm432-project/calendar.html</loc>
<lastmod>2024-01-30T09:13:00.689Z</lastmod>
<loc>https://sipbs-compbiol.github.io/bm432-project/software.html</loc>
<lastmod>2024-06-03T14:49:30.725Z</lastmod>
</url>
<url>
<loc>https://sipbs-compbiol.github.io/bm432-project/methods.html</loc>
<lastmod>2024-01-30T09:13:00.689Z</lastmod>
<loc>https://sipbs-compbiol.github.io/bm432-project/online_resources.html</loc>
<lastmod>2024-06-03T14:49:30.725Z</lastmod>
</url>
<url>
<loc>https://sipbs-compbiol.github.io/bm432-project/learning_resources.html</loc>
<lastmod>2024-01-30T09:13:00.689Z</lastmod>
<loc>https://sipbs-compbiol.github.io/bm432-project/scicomm.html</loc>
<lastmod>2024-06-03T14:49:30.725Z</lastmod>
</url>
</urlset>
94 changes: 78 additions & 16 deletions software.html

Large diffs are not rendered by default.

95 changes: 79 additions & 16 deletions thesis.html

Large diffs are not rendered by default.

94 changes: 78 additions & 16 deletions time_management.html

Large diffs are not rendered by default.

0 comments on commit 359f357

Please sign in to comment.