📦 EqualifyEverything / equalify-hub

📄 static.ts · 58 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58// Static files: robots.txt, sitemap.xml, security.txt, humans.txt
import type { Context } from 'hono';
import config from '#src/utils/config';

export const robots = (c: Context) => {
    return c.text(`User-agent: *
Allow: /

# ${config.siteName} - Developer tools for ${config.githubOrg}
# https://opensource.equalifyapp.com

Sitemap: https://opensource.equalifyapp.com/sitemap.xml`);
};

export const sitemap = (c: Context) => {
    const pages = [
        { loc: 'https://opensource.equalifyapp.com/', priority: '1.0', changefreq: 'daily' },
        { loc: 'https://opensource.equalifyapp.com/about', priority: '0.8', changefreq: 'monthly' },
        { loc: `https://opensource.equalifyapp.com/${config.githubOrg}`, priority: '0.9', changefreq: 'daily' },
        { loc: 'https://opensource.equalifyapp.com/reports', priority: '0.7', changefreq: 'monthly' },
    ];

    const xml = `<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
${pages.map(p => `  <url>
    <loc>${p.loc}</loc>
    <changefreq>${p.changefreq}</changefreq>
    <priority>${p.priority}</priority>
  </url>`).join('\n')}
</urlset>`;

    return c.body(xml, 200, { 'Content-Type': 'application/xml' });
};

export const security = (c: Context) => {
    return c.text(`Contact: https://github.com/${config.githubOrg}
Preferred-Languages: en
Canonical: https://opensource.equalifyapp.com/.well-known/security.txt`);
};

export const humans = (c: Context) => {
    return c.text(`/* TEAM */
Organization: ${config.githubOrg}
Site: ${config.equalifyAppUrl}
GitHub: @${config.githubOrg}

/* SITE */
Built with: TypeScript, Node.js, AWS Lambda
Last updated: 2026
Standards: HTML5, CSS3
Philosophy: Fast, accessible developer tools for open source.

/* THANKS */
GitHub - for the API
UIC - for the support
You - for contributing`);
};