this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

+

Altagos f09d7909 6d8ac967

+9 -3
+7 -1
_config.ts
··· 68 68 export: true, 69 69 }); 70 70 71 + const api_key = Deno.env.get("DARKVISITORS_API_KEY"); 72 + if (api_key == undefined) { 73 + console.error("DARKVISITORS_API_KEY is not defined in.env file"); 74 + Deno.exit(1); 75 + } 76 + 71 77 site.use(robots({ 72 - api_key: Deno.env.get("DARKVISITORS_API_KEY"), 78 + api_key: api_key, 73 79 agent_types: [ 74 80 "AI Data Scraper", "AI Assistant", "AI Search Crawler", 75 81 ],
+2 -2
src/robots.ts
··· 1 1 import Site from "lume/core/site.ts"; 2 2 3 3 interface Options { 4 - api_key: string | undefined; 4 + api_key: string; 5 5 agent_types: string[]; 6 6 } 7 7 8 8 export default function (options: Options) { 9 9 return (site: Site) => { 10 10 site.addEventListener("beforeSave", async () => { 11 - console.log("Fetching robots.txt from DarkVisitors... (api_key: " + options.api_key + ")"); 11 + // console.log("Fetching robots.txt from DarkVisitors... (api_key: " + options.api_key + ")"); 12 12 const robotsTXT = await fetch("https://api.darkvisitors.com/robots-txts", { 13 13 method: "POST", 14 14 headers: {