MCPcopy Create free account
hub / github.com/crisxuan/bestJavaer / getArticleIndex

Function getArticleIndex

assets/article-cards.js:519–544  ·  view source on GitHub ↗
(articleRoot)

Source from the content-addressed store, hash-verified

517 }
518
519 function getArticleIndex(articleRoot) {
520 articleRoot = articleRoot || 'ai-articles';
521
522 if (articleIndexCache[articleRoot]) {
523 return articleIndexCache[articleRoot];
524 }
525
526 articleIndexCache[articleRoot] = fetch(articleRoot + '/README.md?v=20260604-bilingual-readme', {
527 cache: 'force-cache'
528 })
529 .then(function (response) {
530 if (!response.ok) {
531 return '';
532 }
533
534 return response.text();
535 })
536 .then(function (markdown) {
537 return extractArticleIndex(markdown, articleRoot);
538 })
539 .catch(function () {
540 return [];
541 });
542
543 return articleIndexCache[articleRoot];
544 }
545
546 function extractArticleIndex(markdown, articleRoot) {
547 var articles = [];

Callers 1

renderSeriesNavFunction · 0.85

Calls 1

extractArticleIndexFunction · 0.85

Tested by

no test coverage detected