added
This commit is contained in:
1 parent
38ae828d82
commit
6dda00181f
29 files changed
+1185
-339
No files matched your search
@@ -8,6 +8,14 @@ Use the build_ai_index.py, which materializes the site’s public/ai-index.json
|
||||
|
||||
If available in the future (because this content could be deleted), it also includes explicitly referenced whitepapers from home.md, normalizes common encoding artifacts, validates that referenced local markdown/chunks/QA files exist, and records validation results in the output so the index can be regenerated deterministically after content changes.
|
||||
|
||||
After this skill runs, run `discovery-files-materialization-skill.md` / `build_discovery_files.py` to regenerate the root public discovery files that depend on the current AI index and rendered HTML routes:
|
||||
|
||||
- `public/robots.txt`
|
||||
- `public/sitemap.xml`
|
||||
- `public/llms.txt`
|
||||
- `public/agents.md`
|
||||
- `public/skills.md`
|
||||
|
||||
---
|
||||
|
||||
# Overview
|
||||
|
||||
@@ -6,6 +6,8 @@ Outputs:
|
||||
- public/llms.txt
|
||||
- public/agents.md
|
||||
- public/skills.md
|
||||
- public/.well-known/security.txt
|
||||
- public/.well-known/agent-card.json
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -28,6 +30,7 @@ HUGO_PUBLIC = REPO_ROOT / "hugo-html-builder" / "public"
|
||||
SITE_URL = "https://indx.earth"
|
||||
SITE_TITLE = "iNDX Earth"
|
||||
PUBLISHER = "Eddie Soehnel"
|
||||
SECURITY_CONTACT = "https://indx.earth/#contact-us"
|
||||
SITEMAP_ROOT_HELPER_FILES = (
|
||||
"ai-index.json",
|
||||
"llms.txt",
|
||||
@@ -350,6 +353,47 @@ The generated sitemap currently declares {len(entries)} public URLs with last mo
|
||||
"""
|
||||
|
||||
|
||||
def build_security_txt() -> str:
|
||||
expires_year = date.today().year + 1
|
||||
return "\n".join(
|
||||
[
|
||||
f"Contact: {SECURITY_CONTACT}",
|
||||
f"Expires: {expires_year}-12-31T23:59:59Z",
|
||||
f"Canonical: {SITE_URL}/.well-known/security.txt",
|
||||
f"Preferred-Languages: en",
|
||||
"",
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
def build_agent_card_json() -> str:
|
||||
payload = {
|
||||
"name": SITE_TITLE,
|
||||
"url": f"{SITE_URL}/",
|
||||
"description": "Public, AI-readable discovery website for iNDX platform information, community summaries, and semantic artifacts.",
|
||||
"publisher": PUBLISHER,
|
||||
"contact": SECURITY_CONTACT,
|
||||
"license": f"{SITE_URL}/wiki/license/",
|
||||
"discovery": {
|
||||
"ai_index": f"{SITE_URL}/ai-index.json",
|
||||
"sitemap": f"{SITE_URL}/sitemap.xml",
|
||||
"llms": f"{SITE_URL}/llms.txt",
|
||||
"agents": f"{SITE_URL}/agents.md",
|
||||
"skills": f"{SITE_URL}/skills.md",
|
||||
},
|
||||
"retrieval": {
|
||||
"preferred_start": f"{SITE_URL}/ai-index.json",
|
||||
"semantic_artifacts": "/data/open/pages/**/chunks.json",
|
||||
"qa_artifacts": "/data/open/pages/**/qa.json",
|
||||
},
|
||||
"policies": {
|
||||
"crawl": "Crawl politely, cache public resources when possible, and do not submit forms unless a human explicitly initiates the action.",
|
||||
"attribution": "Preserve source URLs, license, usageInfo, and attribution metadata when reusing content or semantic artifacts.",
|
||||
},
|
||||
}
|
||||
return json.dumps(payload, indent=2, ensure_ascii=False) + "\n"
|
||||
|
||||
|
||||
def skill_title_from_file(path: Path) -> str:
|
||||
if path.suffix == ".py":
|
||||
return path.name
|
||||
@@ -440,7 +484,7 @@ def validate_outputs() -> None:
|
||||
raise RuntimeError("sitemap.xml is missing changefreq or priority fields")
|
||||
if f"Sitemap: {SITE_URL}/sitemap.xml" not in read_text(PUBLIC_ROOT / "robots.txt"):
|
||||
raise RuntimeError("robots.txt does not reference sitemap.xml")
|
||||
for filename in ("llms.txt", "agents.md", "skills.md"):
|
||||
for filename in ("llms.txt", "agents.md", "skills.md", ".well-known/security.txt", ".well-known/agent-card.json"):
|
||||
path = PUBLIC_ROOT / filename
|
||||
if not path.exists() or path.stat().st_size == 0:
|
||||
raise RuntimeError(f"{filename} was not created")
|
||||
@@ -457,6 +501,8 @@ def main() -> None:
|
||||
write_text(PUBLIC_ROOT / "llms.txt", build_llms_txt(entries))
|
||||
write_text(PUBLIC_ROOT / "agents.md", build_agents_md(entries))
|
||||
write_text(PUBLIC_ROOT / "skills.md", build_skills_md())
|
||||
write_text(PUBLIC_ROOT / ".well-known" / "security.txt", build_security_txt())
|
||||
write_text(PUBLIC_ROOT / ".well-known" / "agent-card.json", build_agent_card_json())
|
||||
validate_outputs()
|
||||
print(f"Wrote discovery files in {PUBLIC_ROOT} for {len(entries)} sitemap URLs.")
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Contact Form Deployment
|
||||
|
||||
The website form posts to `/api/contact`. The handler is a small FastAPI app in
|
||||
`api/contact_app.py` and sends mail through SMTP provider.
|
||||
`api/contact_app.py` and sends mail through Postmark SMTP.
|
||||
|
||||
## VM Packages
|
||||
|
||||
@@ -15,12 +15,13 @@ python3 -m pip install -r requirements-contact-api.txt
|
||||
The runtime needs these environment variables. Do not commit their values:
|
||||
|
||||
```bash
|
||||
SMTP_HOST=smtp.example.com
|
||||
SMTP_HOST=smtp.postmarkapp.com
|
||||
SMTP_PORT=587
|
||||
SMTP_USER=<smtp-user>
|
||||
SMTP_PASSWORD=<smtp-password>
|
||||
SMTP_USER=<postmark-server-token-or-smtp-user>
|
||||
SMTP_PASSWORD=<postmark-server-token-or-smtp-password>
|
||||
CONTACT_TO_EMAIL=<where messages should go>
|
||||
CONTACT_FROM_EMAIL=<verified SMTP sender address>
|
||||
CONTACT_FROM_EMAIL=<verified Postmark sender address>
|
||||
RECAPTCHA_SECRET_KEY=<google-recaptcha-secret-key>
|
||||
```
|
||||
|
||||
## Run Command
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# iNDX Deploy Security Headers
|
||||
|
||||
The website repo does not own the live routing or Caddy configuration. Apply equivalent headers at the external proxy, CDN, or static hosting layer that serves `https://indx.earth/`.
|
||||
|
||||
Recommended security headers:
|
||||
|
||||
- `Strict-Transport-Security: max-age=31536000; includeSubDomains; preload`
|
||||
- `X-Content-Type-Options: nosniff`
|
||||
- `Referrer-Policy: strict-origin-when-cross-origin`
|
||||
- `Permissions-Policy: camera=(), microphone=(), geolocation=()`
|
||||
- `Content-Security-Policy: default-src 'self'; script-src 'self' https://www.googletagmanager.com https://www.google.com https://www.gstatic.com 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; connect-src 'self' https://www.google-analytics.com https://www.googletagmanager.com; frame-src https://www.google.com; frame-ancestors 'self'; base-uri 'self'; form-action 'self'`
|
||||
|
||||
Recommended cache and compression behavior:
|
||||
|
||||
- HTML pages: `Cache-Control: public, max-age=300`
|
||||
- Root discovery files such as `robots.txt`, `sitemap.xml`, `llms.txt`, `agents.md`, `skills.md`, and `ai-index.json`: `Cache-Control: public, max-age=300`
|
||||
- Static assets under `/assets/`: `Cache-Control: public, max-age=31536000, immutable`
|
||||
- Health checks under `/healthz/`: `Cache-Control: no-store`
|
||||
- Enable gzip, Brotli, or zstd compression at the serving layer for text, HTML, CSS, JavaScript, JSON, XML, and Markdown responses.
|
||||
@@ -55,8 +55,8 @@ Identify all public human-facing routes:
|
||||
|
||||
- `/`
|
||||
- section landing pages such as `/community-summaries/`
|
||||
- audience landing pages such as `/community-summaries/paddling/`
|
||||
- article pages such as `/community-summaries/paddling/{slug}.html`
|
||||
- landing pages such as `/community-summaries/`
|
||||
- article pages such as `/community-summaries/{slug}.html`
|
||||
|
||||
Exclude operational-only endpoints from the sitemap, especially `/healthz/`.
|
||||
|
||||
@@ -77,7 +77,7 @@ Recommended defaults:
|
||||
|
||||
- Home: `weekly`, `1.0`
|
||||
- Primary section landing page: `weekly`, `0.8`
|
||||
- Audience section landing page: `weekly`, `0.7`
|
||||
- Secondary section landing page: `weekly`, `0.7`
|
||||
- Article/community summary page: `monthly`, `0.6`
|
||||
- Root AI/helper resource: `weekly`, `0.4`
|
||||
|
||||
|
||||
@@ -63,8 +63,8 @@ public/data/open/pages/<same relative content path>/<slug>/
|
||||
Example:
|
||||
|
||||
```text
|
||||
content/community-summaries/paddling/example-page.md
|
||||
public/data/open/pages/community-summaries/paddling/example-page/
|
||||
content/community-summaries/example-page.md
|
||||
public/data/open/pages/community-summaries/example-page/
|
||||
```
|
||||
|
||||
3. Create:
|
||||
|
||||
@@ -29,6 +29,7 @@ CONTACT_FORM = """<form class="contact-form" id="email-subscribe" method="POST"
|
||||
<label>Message
|
||||
<textarea name="message" rows="5" required></textarea>
|
||||
</label>
|
||||
<div class="g-recaptcha" data-sitekey="<recaptcha-site-key>"></div>
|
||||
<label class="form-hidden">Company
|
||||
<input type="text" name="company" tabindex="-1" autocomplete="off">
|
||||
</label>
|
||||
@@ -53,16 +54,6 @@ SECTION_INDEXES = {
|
||||
title: "CO+ Platform Summaries"
|
||||
summary: "iNDX CO+ platform summaries organized by audience."
|
||||
---
|
||||
""",
|
||||
Path("community-summaries") / "paddling" / "_index.md": """---
|
||||
title: "CO+ Platform Summaries - Paddling"
|
||||
summary: "iNDX CO+ platform summaries for the paddling industry audience."
|
||||
---
|
||||
""",
|
||||
Path("community-summaries") / "home-health" / "_index.md": """---
|
||||
title: "CO+ Platform Summaries - Home Health"
|
||||
summary: "iNDX CO+ platform summaries for the home health audience."
|
||||
---
|
||||
""",
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user