Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Site checks

on:
pull_request:
push:
branches: [main]

permissions:
contents: read

concurrency:
group: site-checks-${{ github.ref }}
cancel-in-progress: true

jobs:
verify:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09
with:
persist-credentials: false
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
with:
node-version: '22'
- name: Check shared search and generated page coverage
run: node --test tests/search.test.cjs
2 changes: 1 addition & 1 deletion 2025/05/07/wo-de-di-yi-pian-bo-ke/index.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 404.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion about/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion archives/2025/05/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion archives/2025/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion archives/2026/05/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion archives/2026/06/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion archives/2026/07/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion archives/2026/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion archives/2026/page/2/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion archives/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion archives/page/2/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion categories/AI应用工程/RAG专题/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion categories/AI应用工程/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion categories/AI应用工程/生产护栏/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion categories/AI应用工程/部署与运维/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion categories/AI时代思考/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion categories/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion categories/项目/PatchBrake/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion categories/项目/Token-Studio-ROI/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion categories/项目/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion categories/项目/个人博客/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion categories/项目/简喵/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contact/index.html

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions docs/search-repair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Local search repair

All 70 primary generated pages load `/js/search.js` and use one search bootstrap. Queries are literal text, highlights are DOM text nodes, and index destinations must stay on the current HTTP(S) origin. This fixes searches such as `C++`, `[`, `a.b` and `$&` without treating query text as a regular expression or HTML.

Run `node --test tests/search.test.cjs` with Node 20+ for special-character, index-escaping, URL-boundary and generated-page coverage checks. The deterministic test exercises the actual shared script with DOM/jQuery boundary fixtures; it is not a full browser acceptance test.

This repository contains generated site output rather than the Hexo source/theme build. Apply the same shared-script bootstrap to that upstream source template before regenerating the site. Otherwise regeneration can restore the broken inline implementation; the page-coverage regression will detect that drift.

No hosting/deployment configuration is changed in this repair.
2 changes: 1 addition & 1 deletion friends/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion index.html

Large diffs are not rendered by default.

72 changes: 71 additions & 1 deletion js/search.js
Original file line number Diff line number Diff line change
@@ -1 +1,71 @@
function escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function escapeHTML(e){return e.replace(/[&<>"']/g,function(e){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}[e]})}var searchFunc=function(e,n,a){$.ajax({url:e,dataType:"xml",success:function(e){var t=$("entry",e).map(function(){return{title:$("title",this).text(),content:$("content",this).text(),url:$("url",this).text()}}).get(),e=document.getElementById(n),r=document.getElementById(a);e.addEventListener("input",function(){var u,o='<ul class="search-result-list">',p=this.value.trim().toLowerCase().split(/[\s\-]+/);r.innerHTML="",this.value.trim().length<=0||(u=1,t.forEach(function(e){var r,n,a=!0,c=e.title.trim().toLowerCase(),s=e.content.trim().replace(/<[^>]+>/g,"").toLowerCase(),t=e.url,i=-1,l=-1;""!=c&&""!=s&&p.forEach(function(e,t){r=c.indexOf(e),i=s.indexOf(e),r<0&&i<0?a=!1:(i<0&&(i=0),0==t&&(l=i))}),a&&(o+="<li><a href='"+t+"' class='search-result-title'>"+String(u)+". "+escapeHTML(c)+"</a>",u+=1,t=e.content.trim().replace(/<[^>]+>/g,""),0<=l&&(e=l-20,n=escapeHTML(t.substr(e=e<0?0:e,100)),p.forEach(function(e){var e=escapeHTML(e),t=new RegExp(escapeRegExp(e),"gi");n=n.replace(t,'<em class="search-keyword">'+e+"</em>")}),o+='<p class="search-result">'+n+"...</p>"),o+="</li>")}),o+="</ul>",o='<p class="search-result-summary">共找到'+String(u-1)+"条结果</p>"+o,r.innerHTML=o)})}})};
/* Shared local search for generated pages. Queries and index content are text. */
var searchFunc = function (indexPath, inputId, resultId) {
function textOf(value) { return String(value || "").replace(/<[^>]+>/g, ""); }
function appendHighlighted(parent, text, keywords) {
var lower = text.toLowerCase(), offset = 0;
while (offset < text.length) {
var next = -1, length = 0;
keywords.forEach(function (keyword) {
var index = lower.indexOf(keyword, offset);
if (index >= 0 && (next < 0 || index < next || (index === next && keyword.length > length))) {
next = index; length = keyword.length;
}
});
if (next < 0) { parent.appendChild(document.createTextNode(text.slice(offset))); break; }
parent.appendChild(document.createTextNode(text.slice(offset, next)));
var emphasis = document.createElement("em");
emphasis.className = "search-keyword";
emphasis.textContent = text.slice(next, next + length);
parent.appendChild(emphasis);
offset = next + length;
}
}
$.ajax({url: indexPath, dataType: "xml", success: function (xml) {
var records = $("entry", xml).map(function () {
return { title: $("title", this).text(), content: $("content", this).text(), url: $("url", this).text() };
}).get();
var input = document.getElementById(inputId), output = document.getElementById(resultId);
if (!input || !output || input.dataset.searchBound) return;
input.dataset.searchBound = "true";
input.addEventListener("input", function () {
output.textContent = "";
var query = input.value.trim().toLowerCase().slice(0, 200);
if (!query) return;
var keywords = query.split(/[\s\-]+/).filter(Boolean).slice(0, 10);
if (!keywords.length) return;
var list = document.createElement("ul"), count = 0;
list.className = "search-result-list";
records.forEach(function (record) {
if (count >= 50) return;
var title = String(record.title || ""), content = textOf(record.content);
var lowerTitle = title.toLowerCase(), lowerContent = content.toLowerCase();
if (!keywords.every(function (word) { return lowerTitle.includes(word) || lowerContent.includes(word); })) return;
var destination;
try {
destination = new URL(record.url, window.location.href);
if (destination.origin !== window.location.origin || !/^https?:$/.test(destination.protocol)) return;
} catch (_) { return; }
var item = document.createElement("li"), link = document.createElement("a");
link.className = "search-result-title";
link.style.overflowWrap = "anywhere";
link.href = destination.href;
link.textContent = title;
item.appendChild(link);
var snippet = document.createElement("p");
snippet.className = "search-result";
snippet.style.overflowWrap = "anywhere";
var first = lowerContent.indexOf(keywords[0]), start = Math.max(0, first - 20);
appendHighlighted(snippet, content.slice(start, start + 100), keywords);
snippet.appendChild(document.createTextNode("..."));
item.appendChild(snippet);
list.appendChild(item);
count++;
});
var summary = document.createElement("p");
summary.className = "search-result-summary";
summary.textContent = "共找到 " + count + " 条结果";
output.appendChild(summary);
output.appendChild(list);
});
}});
};
2 changes: 1 addition & 1 deletion p/ai-app-deployment-domain/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion p/ai-coding-trustworthy-delivery/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion p/ai-production-guardrails/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion p/jianmiao-launch/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion p/jianmiao-minimal-rag-agent/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion p/jm-01/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion p/jm-02/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion p/jm-03/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion p/patchbrake/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion p/public-server-ssh-security/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion p/rag-core-terms/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion p/rag-evidence-chain/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion p/token-studio-roi/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion portfolio/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<!-- rss -->


<link rel="alternate" href="/portfolio/true" title="Ryan Guo" type="application/atom+xml" />
<link rel="alternate" href="/portfolio/atom.xml" title="Ryan Guo" type="application/atom+xml" />

<!-- mathjax -->

Expand Down
6 changes: 4 additions & 2 deletions portfolio/about/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<!-- rss -->


<link rel="alternate" href="/portfolio/true" title="Ryan Guo" type="application/atom+xml" />
<link rel="alternate" href="/portfolio/atom.xml" title="Ryan Guo" type="application/atom+xml" />

<!-- mathjax -->

Expand Down Expand Up @@ -222,6 +222,8 @@ <h3 id="Education"><a href="#Education" class="headerlink" title="Education"></a
var utterances_theme = 'preferred-color-scheme';

(function(){
var container = document.getElementById('utterances_thread');
if (!container) return;
var script = document.createElement('script');

script.src = 'https://utteranc.es/client.js';
Expand All @@ -231,7 +233,7 @@ <h3 id="Education"><a href="#Education" class="headerlink" title="Education"></a
script.setAttribute('theme', utterances_theme);
script.setAttribute('crossorigin', 'anonymous');
script.async = true;
(document.getElementById('utterances_thread')).appendChild(script);
container.appendChild(script);
}());
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
<!-- rss -->


<link rel="alternate" href="/portfolio/true" title="Ryan Guo" type="application/atom+xml" />
<link rel="alternate" href="/portfolio/atom.xml" title="Ryan Guo" type="application/atom+xml" />

<!-- mathjax -->

Expand Down Expand Up @@ -408,6 +408,8 @@ <h2 id="What’s-Next"><a href="#What’s-Next" class="headerlink" title="What
var utterances_theme = 'preferred-color-scheme';

(function(){
var container = document.getElementById('utterances_thread');
if (!container) return;
var script = document.createElement('script');

script.src = 'https://utteranc.es/client.js';
Expand All @@ -417,7 +419,7 @@ <h2 id="What’s-Next"><a href="#What’s-Next" class="headerlink" title="What
script.setAttribute('theme', utterances_theme);
script.setAttribute('crossorigin', 'anonymous');
script.async = true;
(document.getElementById('utterances_thread')).appendChild(script);
container.appendChild(script);
}());
</script>

Expand Down
2 changes: 1 addition & 1 deletion portfolio/blog/archives/2026/05/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<!-- rss -->


<link rel="alternate" href="/portfolio/true" title="Ryan Guo" type="application/atom+xml" />
<link rel="alternate" href="/portfolio/atom.xml" title="Ryan Guo" type="application/atom+xml" />

<!-- mathjax -->

Expand Down
2 changes: 1 addition & 1 deletion portfolio/blog/archives/2026/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<!-- rss -->


<link rel="alternate" href="/portfolio/true" title="Ryan Guo" type="application/atom+xml" />
<link rel="alternate" href="/portfolio/atom.xml" title="Ryan Guo" type="application/atom+xml" />

<!-- mathjax -->

Expand Down
2 changes: 1 addition & 1 deletion portfolio/blog/archives/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<!-- rss -->


<link rel="alternate" href="/portfolio/true" title="Ryan Guo" type="application/atom+xml" />
<link rel="alternate" href="/portfolio/atom.xml" title="Ryan Guo" type="application/atom+xml" />

<!-- mathjax -->

Expand Down
2 changes: 1 addition & 1 deletion portfolio/blog/categories/ai-engineering/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<!-- rss -->


<link rel="alternate" href="/portfolio/true" title="Ryan Guo" type="application/atom+xml" />
<link rel="alternate" href="/portfolio/atom.xml" title="Ryan Guo" type="application/atom+xml" />

<!-- mathjax -->

Expand Down
6 changes: 4 additions & 2 deletions portfolio/contact/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<!-- rss -->


<link rel="alternate" href="/portfolio/true" title="Ryan Guo" type="application/atom+xml" />
<link rel="alternate" href="/portfolio/atom.xml" title="Ryan Guo" type="application/atom+xml" />

<!-- mathjax -->

Expand Down Expand Up @@ -225,6 +225,8 @@ <h3 id="Collaboration-Style"><a href="#Collaboration-Style" class="headerlink" t
var utterances_theme = 'preferred-color-scheme';

(function(){
var container = document.getElementById('utterances_thread');
if (!container) return;
var script = document.createElement('script');

script.src = 'https://utteranc.es/client.js';
Expand All @@ -234,7 +236,7 @@ <h3 id="Collaboration-Style"><a href="#Collaboration-Style" class="headerlink" t
script.setAttribute('theme', utterances_theme);
script.setAttribute('crossorigin', 'anonymous');
script.async = true;
(document.getElementById('utterances_thread')).appendChild(script);
container.appendChild(script);
}());
</script>

Expand Down
4 changes: 2 additions & 2 deletions portfolio/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<!-- rss -->


<link rel="alternate" href="/portfolio/true" title="Ryan Guo" type="application/atom+xml" />
<link rel="alternate" href="/portfolio/atom.xml" title="Ryan Guo" type="application/atom+xml" />

<!-- mathjax -->

Expand Down Expand Up @@ -121,7 +121,7 @@ <h1 class="p-name">Ryan Guo</h1>

<section id="about" class="p-note">

<p><strong>AI Application Engineer</strong> — I build LLM-powered products end-to-end, from prompt engineering and RAG to production deployment.<br><strong>Core:</strong> Spring AI · RAG (Hybrid + Rerank) · Agent Design (ReAct, Plan-Execute) · MCP Protocol · Vue 3 · Java&#x2F;Python<br><a href="/resume/">📄 Resume</a> &nbsp;·&nbsp; <a href="/projects/">🛠 Projects</a> &nbsp;·&nbsp; <a href="/contact/">📧 Contact</a></p>
<p><strong>AI Application Engineer</strong> — I build LLM-powered products end-to-end, from prompt engineering and RAG to production deployment.<br><strong>Core:</strong> Spring AI · RAG (Hybrid + Rerank) · Agent Design (ReAct, Plan-Execute) · MCP Protocol · Vue 3 · Java&#x2F;Python<br><a href="/portfolio/resume/">📄 Resume</a> &nbsp;·&nbsp; <a href="/projects/">🛠 Projects</a> &nbsp;·&nbsp; <a href="/contact/">📧 Contact</a></p>



Expand Down
6 changes: 4 additions & 2 deletions portfolio/projects/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<!-- rss -->


<link rel="alternate" href="/portfolio/true" title="Ryan Guo" type="application/atom+xml" />
<link rel="alternate" href="/portfolio/atom.xml" title="Ryan Guo" type="application/atom+xml" />

<!-- mathjax -->

Expand Down Expand Up @@ -267,6 +267,8 @@ <h3 id="Performance-Metrics"><a href="#Performance-Metrics" class="headerlink" t
var utterances_theme = 'preferred-color-scheme';

(function(){
var container = document.getElementById('utterances_thread');
if (!container) return;
var script = document.createElement('script');

script.src = 'https://utteranc.es/client.js';
Expand All @@ -276,7 +278,7 @@ <h3 id="Performance-Metrics"><a href="#Performance-Metrics" class="headerlink" t
script.setAttribute('theme', utterances_theme);
script.setAttribute('crossorigin', 'anonymous');
script.async = true;
(document.getElementById('utterances_thread')).appendChild(script);
container.appendChild(script);
}());
</script>

Expand Down
9 changes: 4 additions & 5 deletions portfolio/resume/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<!-- rss -->


<link rel="alternate" href="/portfolio/true" title="Ryan Guo" type="application/atom+xml" />
<link rel="alternate" href="/portfolio/atom.xml" title="Ryan Guo" type="application/atom+xml" />

<!-- mathjax -->

Expand Down Expand Up @@ -157,9 +157,6 @@ <h3 id="Personal"><a href="#Personal" class="headerlink" title="Personal"></a>Pe
<li><strong>GitHub:</strong> <a target="_blank" rel="noopener" href="https://github.com/RyanCoreAI">github.com&#x2F;RyanCoreAI</a> — Open-source contributions and projects</li>
<li>Continuous learner: first-principles approach, English-first documentation, AI-accelerated workflow</li>
</ul>
<blockquote>
<p>📄 <a href="/assets/ryan-guo-resume.pdf">Download Resume (PDF)</a></p>
</blockquote>


</div>
Expand Down Expand Up @@ -244,6 +241,8 @@ <h3 id="Personal"><a href="#Personal" class="headerlink" title="Personal"></a>Pe
var utterances_theme = 'preferred-color-scheme';

(function(){
var container = document.getElementById('utterances_thread');
if (!container) return;
var script = document.createElement('script');

script.src = 'https://utteranc.es/client.js';
Expand All @@ -253,7 +252,7 @@ <h3 id="Personal"><a href="#Personal" class="headerlink" title="Personal"></a>Pe
script.setAttribute('theme', utterances_theme);
script.setAttribute('crossorigin', 'anonymous');
script.async = true;
(document.getElementById('utterances_thread')).appendChild(script);
container.appendChild(script);
}());
</script>

Expand Down
2 changes: 1 addition & 1 deletion portfolio/tags/embedding/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<!-- rss -->


<link rel="alternate" href="/portfolio/true" title="Ryan Guo" type="application/atom+xml" />
<link rel="alternate" href="/portfolio/atom.xml" title="Ryan Guo" type="application/atom+xml" />

<!-- mathjax -->

Expand Down
2 changes: 1 addition & 1 deletion portfolio/tags/java/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<!-- rss -->


<link rel="alternate" href="/portfolio/true" title="Ryan Guo" type="application/atom+xml" />
<link rel="alternate" href="/portfolio/atom.xml" title="Ryan Guo" type="application/atom+xml" />

<!-- mathjax -->

Expand Down
2 changes: 1 addition & 1 deletion portfolio/tags/llm/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<!-- rss -->


<link rel="alternate" href="/portfolio/true" title="Ryan Guo" type="application/atom+xml" />
<link rel="alternate" href="/portfolio/atom.xml" title="Ryan Guo" type="application/atom+xml" />

<!-- mathjax -->

Expand Down
2 changes: 1 addition & 1 deletion portfolio/tags/pgvector/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<!-- rss -->


<link rel="alternate" href="/portfolio/true" title="Ryan Guo" type="application/atom+xml" />
<link rel="alternate" href="/portfolio/atom.xml" title="Ryan Guo" type="application/atom+xml" />

<!-- mathjax -->

Expand Down
2 changes: 1 addition & 1 deletion portfolio/tags/rag/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<!-- rss -->


<link rel="alternate" href="/portfolio/true" title="Ryan Guo" type="application/atom+xml" />
<link rel="alternate" href="/portfolio/atom.xml" title="Ryan Guo" type="application/atom+xml" />

<!-- mathjax -->

Expand Down
2 changes: 1 addition & 1 deletion portfolio/tags/spring-ai/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<!-- rss -->


<link rel="alternate" href="/portfolio/true" title="Ryan Guo" type="application/atom+xml" />
<link rel="alternate" href="/portfolio/atom.xml" title="Ryan Guo" type="application/atom+xml" />

<!-- mathjax -->

Expand Down
Loading
Loading