GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tilestencil/scripts_indexnow.mjs at main · ismilewolf-eng/tilestencil

Expand file tree

/

scripts_indexnow.mjs

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
23 lines (21 loc) · 1.46 KB
/

scripts_indexnow.mjs

Copy path

File metadata and controls

23 lines (21 loc) · 1.46 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Notify IndexNow (Bing, Yandex, Seznam, Naver; Bing also feeds ChatGPT search and Copilot) about every URL in the
// built sitemap. Run after deploying: node scripts_indexnow.mjs
import { execFileSync } from "node:child_process";
import { readFileSync } from "node:fs";
const KEY = "c74895e7c82e4a42bfae1e82845c4791";
const HOST = "tilestencil.com";
const sitemap = readFileSync("out/sitemap.xml", "utf8");
const urlList = [...sitemap.matchAll(/<loc>([^<]+)<\/loc>/g)].map((m) => m[1]).filter((u) => u.startsWith(`https://${HOST}`));
// Node's fetch ignores HTTP(S)_PROXY, so behind a local proxy it cannot connect. curl honours the proxy settings.
// Send to Bing directly as well as the shared endpoint: on 2026-10-23 Bing Webmaster showed no IndexNow submissions at all
// for the two new sites after weeks of 200s from api.indexnow.org, and they appeared within minutes once posted to Bing.
const body = JSON.stringify({ host: HOST, key: KEY, keyLocation: `https://${HOST}/${KEY}.txt`, urlList });
for (const endpoint of ["https://api.indexnow.org/indexnow", "https://www.bing.com/indexnow"]) {
const status = execFileSync(
"curl",
["-s", "-m", "60", "-o", process.platform === "win32" ? "NUL" : "/dev/null", "-w", "%{http_code}", "-X", "POST",
"-H", "Content-Type: application/json; charset=utf-8", "--data-binary", "@-", endpoint],
{ input: body, encoding: "utf8" },
);
console.log(`IndexNow ${new URL(endpoint).host}: ${status} for ${urlList.length} URLs`);
}
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.