diff --git a/themes/zettels/assets/js/search.js b/themes/zettels/assets/js/search.js
index b25a082..8024e7f 100644
--- a/themes/zettels/assets/js/search.js
+++ b/themes/zettels/assets/js/search.js
@@ -1,6 +1,6 @@
// On localhost the root url is /MATH201
// On sasserisop the root url is /sasserisop
-const localhost = true;
+const localhost = false;
const root = localhost ? "" : "/MATH201";
loadIndex()
@@ -181,14 +181,15 @@ function load_lecture_links() {
const sorted_links = new Map([...lecture_links.entries()].sort((a, b) => (a[0] - b[0])));
sorted_links.forEach(val => {
a_tag = document.createElement('a');
- a_tag.innerText = val[0];
- a_tag.href = val[1];
+ a_tag.innerText = val[0]; //title
+ a_tag.href = val[1]; //permalink
p_tag = document.createElement('p');
p_tag.append(a_tag);
p_tag.className = "lecture-link"
+ // Add lecture notes before third tag in _index.md
$("#note-wrapper br:nth-of-type(3)").before(p_tag);
});
- }, root);
+ });
}
}
function loadIndex() {
@@ -228,9 +229,9 @@ function loadIndex() {
const tags = '' + note.tags + ''
var list_content;
if (current_note === permalink) {
- list_content = '' + title + summary + ''
+ list_content = '' + title + summary + ''
} else {
- list_content = '' + title + summary + thumbnail + tags + ''
+ list_content = '' + title + summary + thumbnail + tags + ''
}
const child = document.createElement("li");
@@ -272,11 +273,11 @@ function loadIndex() {
// tags.append(child)
// });
//
- }, root);
+ });
}
-function fetchJSON(callback, root) {
+function fetchJSON(callback) {
const requestURL = root + '/index.json';
const request = new XMLHttpRequest();
request.open('GET', requestURL, true);