Enhance web-system and improve overall features#35
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates a Jekyll-based personal site by removing legacy resume/comment-system assets, tightening analytics/SEO handling, and adding new UI/content features (notably a books feature and several client-side render helpers for rich content blocks).
Changes:
- Removed resume JSON +
_includes/resume/*partials and Disqus include; adjusted site configuration accordingly. - Added a bookshelf/book-review layout and styling, plus a sample book template entry.
- Added/updated multiple frontend assets (icons, TOC assets moved local, analytics gating to production, several JS setup helpers).
Reviewed changes
Copilot reviewed 60 out of 68 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| blog/index.html | Removes inline <head>/robots tag from blog index page. |
| assets/json/resume.json | Removes embedded JSON resume data. |
| assets/js/vega-setup.js | Adds Vega-Lite codeblock-to-embed rendering helper. |
| assets/js/vanilla-back-to-top.min.js | Adds back-to-top behavior (minified vendor). |
| assets/js/typograms.js | Adds typograms renderer and codeblock transform. |
| assets/js/tooltips-setup.js | Adds tooltip initialization helper. |
| assets/js/tabs.min.js | Adds tabs functionality (minified library). |
| assets/js/shortcut-key.js | Adds Mac-specific search shortcut key rendering. |
| assets/js/pseudocode-setup.js | Adds pseudocode codeblock rendering setup. |
| assets/js/progress-bar.js | Adds reading progress-bar logic as standalone JS. |
| assets/js/plotly-setup.js | Adds Plotly codeblock-to-chart rendering helper. |
| assets/js/mathjax-setup.js | Adds MathJax config tweaks (inherit color CSS). |
| assets/js/leaflet-setup.js | Adds Leaflet GeoJSON codeblock-to-map rendering helper. |
| assets/js/jupyter_new_tab.js | Adds logic to open notebook links in a new tab. |
| assets/js/highlight-search-term.js | Adds custom-highlight based search term highlighter module. |
| assets/js/echarts-setup.js | Adds ECharts codeblock-to-chart rendering helper. |
| assets/js/diff2html-setup.js | Adds diff2html codeblock rendering helper. |
| assets/js/chartjs-setup.js | Adds Chart.js codeblock rendering helper. |
| assets/js/bootstrap.bundle.min.js | Adds Bootstrap bundle (minified vendor). |
| assets/js/bootstrap-toc.min.js | Adds bootstrap-toc JS locally (minified vendor). |
| assets/js/bibsearch.js | Adds bibliography filtering + highlighting behavior. |
| assets/css/bootstrap-toc.min.css | Adds bootstrap-toc CSS locally (minified vendor). |
| assets/bibliography/2018-12-22-distill.bib | Removes a bibliography entry file. |
| .gitignore | Adds draft assets + CLAUDE.md to ignore list. |
| .github/workflows/deploy.yml | Removes unused MY_ID secret env var from deploy job. |
| .all-contributorsrc | Removes all-contributors configuration file. |
| _sass/_typograms.scss | Adds typograms styling. |
| _sass/_tabs.scss | Adds styling for tab UI component. |
| _sass/_base.scss | Adds “bookshelf” UI styles. |
| _projects/6_project.md | Removes example project page. |
| _projects/5_project.md | Removes example project page. |
| _projects/4_project.md | Removes example project page. |
| _projects/3_project.md | Removes example project page. |
| _projects/2_project.md | Removes example project page. |
| _projects/1_project.md | Removes example project page. |
| _posts/.gitkeep | Keeps _posts directory present. |
| _pages/teaching.md | Removes teaching page. |
| _pages/publications.md | Removes inline <head>/robots tag from publications page. |
| _pages/dropdown.md | Removes dropdown navigation page definition. |
| _pages/books.md | Adds (currently unpublished) bookshelf page entry point. |
| _layouts/page.html | Removes inline robots meta and GTM noscript block. |
| _layouts/cv.html | Removes inline robots meta from CV layout. |
| _layouts/book-shelf.html | Adds bookshelf listing layout. |
| _layouts/book-review.html | Adds book review page layout. |
| _layouts/bib.html | Removes inline robots meta from bibliography layout. |
| _includes/scripts/wechatModal.html | Removes WeChat modal script include. |
| _includes/scripts/misc.html | Switches bootstrap-toc to local asset. |
| _includes/scripts/analytics.html | Gates GA script to production environment. |
| _includes/scripts/additional_analytics.html | Gates additional analytics to production; adds search tracking. |
| _includes/resume/work.html | Removes resume partial. |
| _includes/resume/volunteer.html | Removes resume partial. |
| _includes/resume/skills.html | Removes resume partial. |
| _includes/resume/references.html | Removes resume partial. |
| _includes/resume/publications.html | Removes resume partial. |
| _includes/resume/projects.html | Removes resume partial. |
| _includes/resume/languages.html | Removes resume partial. |
| _includes/resume/interests.html | Removes resume partial. |
| _includes/resume/education.html | Removes resume partial. |
| _includes/resume/certificates.html | Removes resume partial. |
| _includes/resume/basics.html | Removes resume partial. |
| _includes/resume/awards.html | Removes resume partial. |
| _includes/head.html | Adds noindex on non-root pages; adds Tabler Icons; switches TOC CSS local. |
| _includes/giscus.html | Updates noscript link to HTTPS. |
| _includes/disqus.html | Removes Disqus integration include. |
| _config.yml | Fixes typo (repository_url), updates scholar author name, removes external resume JSON config, comments out books collection. |
| _books/book_template.md | Adds sample book review template content/front matter. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+61
to
+65
| document.getElementById("bibsearch").addEventListener("input", function () { | ||
| clearTimeout(timeoutId); // Clear the previous timeout | ||
| const searchTerm = this.value.toLowerCase(); | ||
| timeoutId = setTimeout(filterItems(searchTerm), 300); | ||
| }); |
Comment on lines
+84
to
+88
| let node; | ||
| while ((node = walker.nextNode())) { | ||
| if (node.textContent && node.textContent.toLowerCase().includes(text)) { | ||
| nodes.push(node); | ||
| } |
Comment on lines
+96
to
+104
| const text = (node.textContent ? node.textContent.toLowerCase() : "") || ""; | ||
|
|
||
| let start = 0; | ||
| let index; | ||
| while ((index = text.indexOf(search, start)) >= 0) { | ||
| const range = new Range(); | ||
| range.setStart(node, index); | ||
| range.setEnd(node, index + search.length); | ||
| ranges.push(range); |
Comment on lines
+1252
to
+1256
| for (let y = 0; y < diagram.length; y++) { | ||
| for (let x = 0; x < diagram[y].length; x++) { | ||
| if (diagram[y].length > width) { | ||
| width = diagram[x].length; | ||
| } |
Comment on lines
+1
to
+18
| $(document).ready(function () { | ||
| // Let external links in jupyter notebooks open in new tab | ||
| let jupyterNotebooks = $(".jupyter-notebook-iframe-container"); | ||
| jupyterNotebooks.each(function () { | ||
| let iframeBody = $(this).find("iframe").get(0).contentWindow.document.body; | ||
| // Get all <a> elements in the bodyElement | ||
| let links = $(iframeBody).find("a"); | ||
|
|
||
| // Loop through each <a> element | ||
| links.each(function () { | ||
| // Check if the <a> element has an 'href' attribute | ||
| if ($(this).attr("href")) { | ||
| // Set the 'target' attribute to '_blank' to open the link in a new tab/window | ||
| $(this).attr("target", "_blank"); | ||
| } | ||
| }); | ||
| }); | ||
| }); |
Comment on lines
+499
to
+518
| (function() { | ||
| var ninjaKeys = document.getElementById('global-ninja-keys'); | ||
| if (!ninjaKeys) return; | ||
|
|
||
| ninjaKeys.addEventListener('open', function() { | ||
| gtag('event', 'site_search_open', { | ||
| 'page_path': window.location.pathname | ||
| }); | ||
| }); | ||
|
|
||
| ninjaKeys.addEventListener('selected', function(e) { | ||
| var term = e.detail && e.detail.search ? e.detail.search : ''; | ||
| var title = e.detail && e.detail.action && e.detail.action.title ? e.detail.action.title : ''; | ||
| gtag('event', 'search', { | ||
| 'search_term': term, | ||
| 'result_selected': title, | ||
| 'page_path': window.location.pathname | ||
| }); | ||
| }); | ||
| })(); |
| } | ||
| arrow.setAttribute("transform", `translate(${reach} 9)`); | ||
| result.appendChild(arrow); | ||
| return result; |
| } | ||
| arrow.setAttribute("transform", `translate(${reach} 9) translate(0 36) rotate(180)`); | ||
| result.appendChild(arrow); | ||
| return result; |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 60 out of 68 changed files in this pull request and generated 11 comments.
Comments suppressed due to low confidence (2)
_config.yml:150
- The PR adds book layouts/pages under
_layouts/and_pages/and a_books/template, but thebookscollection is commented out here. Also,_booksis currently listed underexclude:later in this same config, so even enabling the collection won’t work until_booksis removed fromexclude. As-is, the new book content/layouts will never be generated by Jekyll.
# books:
# output: true
# permalink: /books/:path/
_layouts/book-review.html:6
yearis derived only frompage.started. For reviews withoutstarted(e.g., queued/finished-only entries), this will produce an incorrect year (often 1970) and break the year link in the header. Consider falling back tofinishedand thendate.
{% assign year = page.started | date: '%Y' %}
{% assign tags = page.tags | join: '' %}
{% assign categories = page.categories | join: '' %}
Comment on lines
+8
to
+10
| {% unless page.url == "/" %} | ||
| <meta name="robots" content="noindex"> | ||
| {% endunless %} |
Comment on lines
+18
to
+20
| window.onload = function () { | ||
| setTimeout(progressBarSetup, 50); | ||
| }; |
Comment on lines
+53
to
+57
| const updateInputField = () => { | ||
| const hashValue = decodeURIComponent(window.location.hash.substring(1)); // Remove the '#' character | ||
| document.getElementById("bibsearch").value = hashValue; | ||
| filterItems(hashValue); | ||
| }; |
Comment on lines
+1
to
+24
| let vegaTheme = determineComputedTheme(); | ||
|
|
||
| /* Create vega lite chart as another node and hide the code block, appending the vega lite node after it | ||
| this is done to enable retrieving the code again when changing theme between light/dark */ | ||
| document.addEventListener("readystatechange", () => { | ||
| if (document.readyState === "complete") { | ||
| document.querySelectorAll("pre>code.language-vega_lite").forEach((elem) => { | ||
| const jsonData = elem.textContent; | ||
| const backup = elem.parentElement; | ||
| backup.classList.add("unloaded"); | ||
| /* create vega lite node */ | ||
| let chartElement = document.createElement("div"); | ||
| chartElement.classList.add("vega-lite"); | ||
| backup.after(chartElement); | ||
|
|
||
| /* Embed the visualization in the container */ | ||
| if (vegaTheme === "dark") { | ||
| vegaEmbed(chartElement, JSON.parse(jsonData), { theme: "dark" }); | ||
| } else { | ||
| vegaEmbed(chartElement, JSON.parse(jsonData)); | ||
| } | ||
| }); | ||
| } | ||
| }); |
Comment on lines
+1
to
+20
| let diff2HtmlTheme = determineComputedTheme(); | ||
|
|
||
| /* Create diff2html as another node and hide the code block, appending the diff2html node after it | ||
| this is done to enable retrieving the code again when changing theme between light/dark */ | ||
| document.addEventListener("readystatechange", () => { | ||
| if (document.readyState === "complete") { | ||
| document.querySelectorAll("pre>code.language-diff2html").forEach((elem) => { | ||
| const textData = elem.textContent; | ||
| const backup = elem.parentElement; | ||
| backup.classList.add("unloaded"); | ||
| /* create diff node */ | ||
| let diffElement = document.createElement("div"); | ||
| diffElement.classList.add("diff2html"); | ||
| backup.after(diffElement); | ||
| const configuration = { colorScheme: diff2HtmlTheme, drawFileList: true, highlight: true, matching: "lines" }; | ||
| const diff2htmlUi = new Diff2HtmlUI(diffElement, textData, configuration); | ||
| diff2htmlUi.draw(); | ||
| }); | ||
| } | ||
| }); |
Comment on lines
+1
to
+29
| let echartsTheme = determineComputedTheme(); | ||
|
|
||
| /* Create echarts chart as another node and hide the code block, appending the echarts node after it | ||
| this is done to enable retrieving the code again when changing theme between light/dark */ | ||
| document.addEventListener("readystatechange", () => { | ||
| if (document.readyState === "complete") { | ||
| document.querySelectorAll("pre>code.language-echarts").forEach((elem) => { | ||
| const jsonData = elem.textContent; | ||
| const backup = elem.parentElement; | ||
| backup.classList.add("unloaded"); | ||
| /* create echarts node */ | ||
| let chartElement = document.createElement("div"); | ||
| chartElement.classList.add("echarts"); | ||
| backup.after(chartElement); | ||
|
|
||
| /* create echarts */ | ||
| if (echartsTheme === "dark") { | ||
| var chart = echarts.init(chartElement, "dark-fresh-cut"); | ||
| } else { | ||
| var chart = echarts.init(chartElement); | ||
| } | ||
|
|
||
| chart.setOption(JSON.parse(jsonData)); | ||
| window.addEventListener("resize", function () { | ||
| chart.resize(); | ||
| }); | ||
| }); | ||
| } | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several changes across the codebase, focusing on content updates, configuration fixes, and code cleanup. The most significant changes involve the removal of resume section partials, configuration corrections, and the addition of a new book template. Below is a summary of the most important changes:
Resume and Content Cleanup:
_includes/resume/*.htmlpartials, effectively removing the custom resume section rendering templates. This likely means resume rendering is being refactored or removed. [1] [2] [3] [4] [5] [6] [7] [8]Configuration and Metadata Updates:
journalsection of_config.ymlby renamingrepository_urtorepository_url.scholarconfiguration in_config.ymlto use a new author name.bookscollection in_config.yml, possibly disabling book collection output._config.yml..all-contributorsrcfile, removing contributor metadata from the repository.Book and UI Enhancements:
_books/book_template.md.<meta name="robots" content="noindex">tag to all non-root pages to improve SEO and prevent indexing of subpages.Comment System and Workflow Adjustments:
_includes/disqus.html.MY_IDenvironment variable from the deploy GitHub Actions workflow.These changes collectively improve configuration accuracy, update content, and clean up unused or obsolete code.