-
${esc(firm.blurb)}
-
- About ·
- Portfolio ·
- Team ·
- Jobs
-
-
Portfolio
-
+
+ ${INDEX_END}`;
}
// Every generated page points `isPartOf` at #website and `funder`/`worksFor` at
@@ -929,12 +934,7 @@ function injectBetween(html, beginMarker, endMarker, block) {
function renderIndexHtml(config) {
let html = readText("index.html");
html = injectBetween(html, JSONLD_BEGIN, JSONLD_END, renderHomeJsonLd(config));
- html = injectBetween(
- html,
- NOSCRIPT_BEGIN,
- NOSCRIPT_END,
- renderNoscriptIndex(config)
- );
+ html = injectBetween(html, INDEX_BEGIN, INDEX_END, renderTextIndex(config));
return html;
}
@@ -996,7 +996,7 @@ module.exports = {
outDir,
renderCompany,
renderIndexHtml,
- renderNoscriptIndex,
+ renderTextIndex,
renderPerson,
writePages,
};
diff --git a/tests/build-pages.test.js b/tests/build-pages.test.js
index f38e42f7..a93b989f 100644
--- a/tests/build-pages.test.js
+++ b/tests/build-pages.test.js
@@ -643,19 +643,36 @@ describe("index.html", () => {
expect(h1.className).toBe("visually-hidden");
});
- it("lists every company and person in the noscript block", () => {
- const noscript = html.slice(
+ it("lists every company and person in the crawlable index block", () => {
+ const block = html.slice(
html.indexOf("BEGIN generated-index"),
html.indexOf("END generated-index")
);
for (const slug of Object.keys(config.portfolio)) {
- expect(noscript).toContain(`href="/portfolio/${slug}/"`);
+ expect(block).toContain(`href="/portfolio/${slug}/"`);
}
for (const slug of Object.keys(config.team)) {
- expect(noscript).toContain(`href="/team/${slug}/"`);
+ expect(block).toContain(`href="/team/${slug}/"`);
}
});
+ it("keeps the crawlable index reachable to text extractors", () => {
+ // Not