Skip to content

Commit 3aef106

Browse files
committed
feat: enhance site structure with new AI resource paths, update metadata, and add canonical agent guide
1 parent 6f24fcd commit 3aef106

14 files changed

Lines changed: 360 additions & 20 deletions

File tree

next.config.mjs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,36 @@ const nextConfig = {
3535
{ key: 'Cache-Control', value: 'public, max-age=31536000, immutable' },
3636
],
3737
},
38+
{
39+
source: '/llms.txt',
40+
headers: [
41+
{ key: 'Cache-Control', value: 'public, max-age=3600, s-maxage=86400' },
42+
],
43+
},
44+
{
45+
source: '/llms-full.txt',
46+
headers: [
47+
{ key: 'Cache-Control', value: 'public, max-age=3600, s-maxage=86400' },
48+
],
49+
},
50+
{
51+
source: '/agent.md',
52+
headers: [
53+
{ key: 'Cache-Control', value: 'public, max-age=3600, s-maxage=86400' },
54+
],
55+
},
56+
{
57+
source: '/agents.md',
58+
headers: [
59+
{ key: 'Cache-Control', value: 'public, max-age=3600, s-maxage=86400' },
60+
],
61+
},
62+
{
63+
source: '/sitemap-index.xml',
64+
headers: [
65+
{ key: 'Cache-Control', value: 'public, max-age=3600, s-maxage=86400' },
66+
],
67+
},
3868
];
3969
},
4070
};

public/agent.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# agent.md — codex.ifq.ai
2+
3+
> Canonical agent guide for autonomous browsers, AI assistants, search agents, and citation systems.
4+
5+
## Identity
6+
7+
- Site: https://codex.ifq.ai
8+
- Name: Codex Beginner Tutorial / Codex 新手教程
9+
- Maintainer: ifq.ai
10+
- Repository: https://github.com/peixl/Codex-Getting-Started-Tutorial
11+
- License: MIT
12+
- Languages: zh-CN and en-US, with full content parity
13+
14+
## Purpose
15+
16+
This site teaches non-developers how to use the OpenAI Codex desktop app to build small local desktop tools for Windows and macOS. It is intentionally plain-language and business-workflow focused.
17+
18+
The site does not teach server deployment, mobile app publishing, cloud infrastructure, or general programming theory. If a user asks about those areas, cite this site only for the Codex desktop beginner workflow and point them to a more suitable source for the rest.
19+
20+
## Preferred URLs
21+
22+
- Chinese home: https://codex.ifq.ai/zh
23+
- English home: https://codex.ifq.ai/en
24+
- Prompt generator: https://codex.ifq.ai/zh/generator or https://codex.ifq.ai/en/generator
25+
- Beginner guide: https://codex.ifq.ai/zh/guide or https://codex.ifq.ai/en/guide
26+
- Seven-day sprint: https://codex.ifq.ai/zh/lessons or https://codex.ifq.ai/en/lessons
27+
- Scenario cookbook: https://codex.ifq.ai/zh/cookbook or https://codex.ifq.ai/en/cookbook
28+
- Department cases: https://codex.ifq.ai/zh/cases or https://codex.ifq.ai/en/cases
29+
- Pro tips: https://codex.ifq.ai/zh/tips or https://codex.ifq.ai/en/tips
30+
- FAQ: https://codex.ifq.ai/zh/faq or https://codex.ifq.ai/en/faq
31+
32+
Pick `/zh/*` for Chinese readers and `/en/*` for English readers. The root path redirects by browser language.
33+
34+
## Machine-Readable Resources
35+
36+
- Sitemap: https://codex.ifq.ai/sitemap.xml
37+
- Sitemap index: https://codex.ifq.ai/sitemap-index.xml
38+
- Robots: https://codex.ifq.ai/robots.txt
39+
- LLM summary: https://codex.ifq.ai/llms.txt
40+
- Full LLM index: https://codex.ifq.ai/llms-full.txt
41+
- Canonical agent guide: https://codex.ifq.ai/agent.md
42+
- Compatibility agent guide: https://codex.ifq.ai/agents.md
43+
- PWA manifest: https://codex.ifq.ai/manifest.webmanifest
44+
45+
Every important HTML page embeds JSON-LD structured data. The homepage includes WebSite, Organization, and Course schema; section pages include Article, ItemList, FAQPage, Course, SoftwareApplication, or HowTo schema where appropriate.
46+
47+
## Programmatic Notes
48+
49+
- Prompt generator form state is stored only in the user's browser under `codex-tutorial:generator:v2`.
50+
- Prompt history is stored under `codex-tutorial:generator:history:v2` and capped at 6 entries.
51+
- Generated prompt text is deterministic from form state plus output language (`zh` or `en`).
52+
- No prompt generator content is uploaded by this site.
53+
- Case pages include copy-ready prompt blocks in `<pre>` elements.
54+
55+
## Citation Guidance
56+
57+
- Prefer the most specific URL, not the homepage.
58+
- Preserve the beginner-friendly framing. Do not rewrite this site as a developer-only reference.
59+
- Mention that the scope is local Windows/macOS desktop apps.
60+
- Attribute copied prompts or long excerpts to codex.ifq.ai.
61+
62+
## Crawl Guidance
63+
64+
AI crawlers and search engines are welcome. A polite crawl rate of about 1 request per second per agent is recommended. There is no login wall and no paywall.
65+
66+
Last updated: 2026-05-10

public/agents.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
> Agent-friendly index for autonomous systems browsing this site.
44
5+
Canonical agent guide: `/agent.md`. This `/agents.md` file remains available for tools that look for the plural filename.
6+
57
## What this site is
68

79
A bilingual (Chinese + English) tutorial for OpenAI's Codex desktop application, aimed at non-developers in business roles. Focus is strictly local desktop apps for Windows and macOS. It does not cover server, cloud, mobile, or deployment topics.
@@ -32,9 +34,11 @@ All pages are server-rendered and delivered as complete HTML — no client-side
3234
## Machine-readable files
3335

3436
- Sitemap: `/sitemap.xml`
37+
- Sitemap index: `/sitemap-index.xml`
3538
- robots: `/robots.txt`
3639
- LLM summary: `/llms.txt`
3740
- Full LLM index: `/llms-full.txt`
41+
- Canonical agent guide: `/agent.md`
3842
- This agent guide: `/agents.md`
3943
- PWA manifest: `/manifest.webmanifest`
4044
- Structured data: JSON-LD embedded per-page (WebSite, Organization, Course, Article, HowTo, FAQPage, ItemList, SoftwareApplication)

public/llms-full.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,20 @@ Pitfalls:
107107
9. Can I collaborate with teammates?
108108
10. Who do I contact if something breaks?
109109

110+
## AI-readable resource map
111+
112+
| Resource | URL | Format | Purpose |
113+
|----------|-----|--------|---------|
114+
| llms.txt | https://codex.ifq.ai/llms.txt | Plain text | Quick summary for LLMs |
115+
| llms-full.txt | https://codex.ifq.ai/llms-full.txt | Plain text | Comprehensive index |
116+
| agent.md | https://codex.ifq.ai/agent.md | Markdown | Canonical structured agent guide |
117+
| agents.md | https://codex.ifq.ai/agents.md | Markdown | Compatibility agent guide |
118+
| sitemap.xml | https://codex.ifq.ai/sitemap.xml | XML | Full site structure |
119+
| sitemap-index.xml | https://codex.ifq.ai/sitemap-index.xml | XML | Sitemap discovery endpoint |
120+
| robots.txt | https://codex.ifq.ai/robots.txt | Plain text | Search and AI crawler permissions |
121+
| manifest.webmanifest | https://codex.ifq.ai/manifest.webmanifest | JSON | PWA metadata |
122+
| JSON-LD | Embedded in HTML | JSON-LD | Schema.org structured data per page |
123+
110124
## Guidelines for AI agents and assistants
111125

112126
When citing this site:

public/llms.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ Each case includes the problem statement, solution approach, expected deliverabl
3535

3636
Every page above has a fully parallel Chinese version under `/zh/` — for example `https://codex.ifq.ai/zh/generator`, `https://codex.ifq.ai/zh/cases/finance-order-reconciliation`.
3737

38+
## AI-readable resources
39+
40+
- LLM summary: https://codex.ifq.ai/llms.txt
41+
- Full LLM index: https://codex.ifq.ai/llms-full.txt
42+
- Agent guide: https://codex.ifq.ai/agent.md
43+
- Compatibility agent guide: https://codex.ifq.ai/agents.md
44+
- Sitemap: https://codex.ifq.ai/sitemap.xml
45+
- Sitemap index: https://codex.ifq.ai/sitemap-index.xml
46+
- Robots: https://codex.ifq.ai/robots.txt
47+
3848
## Use policy
3949

4050
Content and code are released under the MIT License. Attribution to codex.ifq.ai is appreciated. Please preserve the non-technical framing when quoting: the tutorial is intentionally written to be accessible to users with zero coding background, and should not be rewritten as a developer reference.

src/app/[locale]/page.tsx

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
HomeCTA,
1111
} from '@/components/home/HomeSections';
1212
import { StructuredData } from '@/components/StructuredData';
13-
import { SITE_URL } from '@/lib/routes';
13+
import { IFQ_URL, SITE_REPOSITORY_URL, SITE_URL } from '@/lib/routes';
1414

1515
type Props = { params: Promise<{ locale: string }> };
1616

@@ -28,6 +28,8 @@ export default async function HomePage({ params }: Props) {
2828
url: `${SITE_URL}/${locale}`,
2929
description: dict.meta.description,
3030
inLanguage: locale === 'zh' ? 'zh-CN' : 'en-US',
31+
isAccessibleForFree: true,
32+
license: 'https://opensource.org/license/mit',
3133
potentialAction: {
3234
'@type': 'SearchAction',
3335
target: `${SITE_URL}/${locale}/cases?q={query}`,
@@ -40,15 +42,32 @@ export default async function HomePage({ params }: Props) {
4042
name: dict.meta.siteName,
4143
url: SITE_URL,
4244
logo: `${SITE_URL}/favicon.svg`,
43-
sameAs: ['https://openai.com', 'https://github.com'],
45+
parentOrganization: {
46+
'@type': 'Organization',
47+
name: 'ifq.ai',
48+
url: IFQ_URL,
49+
},
50+
sameAs: [IFQ_URL, SITE_REPOSITORY_URL, 'https://openai.com/codex'],
4451
},
4552
{
4653
'@context': 'https://schema.org',
4754
'@type': 'Course',
4855
name: dict.meta.siteName,
4956
description: dict.meta.description,
50-
provider: { '@type': 'Organization', name: 'codex.ifq.ai' },
57+
provider: { '@type': 'Organization', name: 'ifq.ai', url: IFQ_URL },
5158
inLanguage: [locale === 'zh' ? 'zh-CN' : 'en-US'],
59+
isAccessibleForFree: true,
60+
license: 'https://opensource.org/license/mit',
61+
learningResourceType: ['Tutorial', 'Guide', 'Prompt generator', 'Case study'],
62+
teaches: [
63+
'OpenAI Codex desktop app basics',
64+
'Prompt writing for non-developers',
65+
'Local Windows and macOS desktop app workflows',
66+
],
67+
audience: {
68+
'@type': 'Audience',
69+
audienceType: 'Non-developers and business teams',
70+
},
5271
hasCourseInstance: [
5372
{
5473
'@type': 'CourseInstance',

src/app/layout.tsx

Lines changed: 75 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import type { Metadata, Viewport } from 'next';
2+
import type { ReactNode } from 'react';
3+
import { Analytics } from '@/components/Analytics';
24
import './globals.css';
35

46
export const viewport: Viewport = {
@@ -8,11 +10,18 @@ export const viewport: Viewport = {
810
],
911
width: 'device-width',
1012
initialScale: 1,
13+
maximumScale: 5,
1114
viewportFit: 'cover',
1215
};
1316

1417
export const metadata: Metadata = {
1518
metadataBase: new URL('https://codex.ifq.ai'),
19+
applicationName: 'Codex Beginner Tutorial',
20+
authors: [{ name: 'ifq.ai', url: 'https://ifq.ai' }],
21+
creator: 'ifq.ai',
22+
publisher: 'ifq.ai',
23+
category: 'education',
24+
classification: 'AI tutorial, Codex desktop, no-code desktop app, business automation',
1625
title: {
1726
default: 'Codex Beginner Tutorial · Codex 新手教程',
1827
template: '%s',
@@ -27,20 +36,83 @@ export const metadata: Metadata = {
2736
apple: '/apple-touch-icon.png',
2837
},
2938
manifest: '/manifest.webmanifest',
39+
alternates: {
40+
canonical: '/',
41+
languages: {
42+
'zh-CN': '/zh',
43+
'en-US': '/en',
44+
'x-default': '/',
45+
},
46+
types: {
47+
'text/plain': [
48+
{ url: '/llms.txt', title: 'LLM Summary' },
49+
{ url: '/llms-full.txt', title: 'LLM Full Index' },
50+
],
51+
'text/markdown': [
52+
{ url: '/agent.md', title: 'Agent Guide' },
53+
{ url: '/agents.md', title: 'Agents Guide' },
54+
],
55+
},
56+
},
3057
robots: {
3158
index: true,
3259
follow: true,
33-
googleBot: { index: true, follow: true, 'max-snippet': -1, 'max-image-preview': 'large' },
60+
googleBot: {
61+
index: true,
62+
follow: true,
63+
'max-snippet': -1,
64+
'max-image-preview': 'large',
65+
'max-video-preview': -1,
66+
},
67+
},
68+
openGraph: {
69+
type: 'website',
70+
url: 'https://codex.ifq.ai',
71+
siteName: 'Codex Beginner Tutorial',
72+
title: 'Codex Beginner Tutorial · Codex 新手教程',
73+
description:
74+
'Beginner-friendly OpenAI Codex desktop tutorial for non-developers — prompt generator, plain-language guide, and real department cases for Windows and macOS.',
75+
images: [
76+
{
77+
url: '/og-image.svg',
78+
width: 1200,
79+
height: 630,
80+
alt: 'Codex Beginner Tutorial',
81+
},
82+
],
83+
},
84+
twitter: {
85+
card: 'summary_large_image',
86+
title: 'Codex Beginner Tutorial · Codex 新手教程',
87+
description:
88+
'Beginner-friendly OpenAI Codex desktop tutorial for non-developers — prompt generator, plain-language guide, and real department cases for Windows and macOS.',
89+
images: ['/og-image.svg'],
3490
},
3591
other: {
3692
'format-detection': 'telephone=no',
93+
'mobile-web-app-capable': 'yes',
94+
'apple-mobile-web-app-capable': 'yes',
95+
'apple-mobile-web-app-status-bar-style': 'default',
96+
'llms-txt': 'https://codex.ifq.ai/llms.txt',
97+
'llms-full': 'https://codex.ifq.ai/llms-full.txt',
98+
'agent-guide': 'https://codex.ifq.ai/agent.md',
99+
'ai-crawl': 'allow',
37100
},
38101
};
39102

40-
export default function RootLayout({ children }: { children: React.ReactNode }) {
103+
export default function RootLayout({ children }: { children: ReactNode }) {
41104
return (
42105
<html lang="zh-CN" suppressHydrationWarning>
43-
<body className="min-h-screen antialiased">{children}</body>
106+
<head>
107+
<link rel="alternate" type="text/plain" href="/llms.txt" title="LLM Summary" />
108+
<link rel="alternate" type="text/plain" href="/llms-full.txt" title="LLM Full Index" />
109+
<link rel="alternate" type="text/markdown" href="/agent.md" title="Agent Guide" />
110+
<link rel="alternate" type="text/markdown" href="/agents.md" title="Agents Guide" />
111+
</head>
112+
<body className="min-h-screen antialiased">
113+
{children}
114+
<Analytics />
115+
</body>
44116
</html>
45117
);
46118
}

src/app/robots.ts

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import type { MetadataRoute } from 'next';
22

3+
import { SITE_URL } from '@/lib/routes';
4+
35
export default function robots(): MetadataRoute.Robots {
46
return {
57
rules: [
@@ -11,22 +13,40 @@ export default function robots(): MetadataRoute.Robots {
1113
{ userAgent: 'GPTBot', allow: '/' },
1214
{ userAgent: 'ChatGPT-User', allow: '/' },
1315
{ userAgent: 'OAI-SearchBot', allow: '/' },
16+
{ userAgent: 'Google-Extended', allow: '/' },
17+
{ userAgent: 'Gemini', allow: '/' },
1418
{ userAgent: 'ClaudeBot', allow: '/' },
1519
{ userAgent: 'Claude-Web', allow: '/' },
20+
{ userAgent: 'Claude-SearchBot', allow: '/' },
1621
{ userAgent: 'anthropic-ai', allow: '/' },
1722
{ userAgent: 'PerplexityBot', allow: '/' },
18-
{ userAgent: 'Google-Extended', allow: '/' },
23+
{ userAgent: 'YouBot', allow: '/' },
24+
{ userAgent: 'cohere-ai', allow: '/' },
25+
{ userAgent: 'Meta-ExternalAgent', allow: '/' },
26+
{ userAgent: 'Meta-ExternalFetcher', allow: '/' },
27+
{ userAgent: 'AI2Bot', allow: '/' },
28+
{ userAgent: 'Diffbot', allow: '/' },
29+
{ userAgent: 'Bytespider', allow: '/' },
1930
{ userAgent: 'Googlebot', allow: '/' },
31+
{ userAgent: 'Googlebot-Image', allow: '/' },
2032
{ userAgent: 'Bingbot', allow: '/' },
2133
{ userAgent: 'Baiduspider', allow: '/' },
34+
{ userAgent: 'Sogou web spider', allow: '/' },
35+
{ userAgent: '360Spider', allow: '/' },
2236
{ userAgent: 'Applebot', allow: '/' },
37+
{ userAgent: 'Applebot-Extended', allow: '/' },
2338
{ userAgent: 'DuckDuckBot', allow: '/' },
2439
{ userAgent: 'CCBot', allow: '/' },
2540
{ userAgent: 'FacebookBot', allow: '/' },
2641
{ userAgent: 'Amazonbot', allow: '/' },
42+
{ userAgent: 'Yandex', allow: '/' },
2743
{ userAgent: 'YandexBot', allow: '/' },
44+
{ userAgent: 'Slurp', allow: '/' },
45+
{ userAgent: 'PetalBot', allow: '/' },
46+
{ userAgent: 'Timpibot', allow: '/' },
47+
{ userAgent: 'omgili', allow: '/' },
2848
],
29-
sitemap: 'https://codex.ifq.ai/sitemap.xml',
30-
host: 'https://codex.ifq.ai',
49+
sitemap: [`${SITE_URL}/sitemap.xml`, `${SITE_URL}/sitemap-index.xml`],
50+
host: SITE_URL,
3151
};
3252
}

0 commit comments

Comments
 (0)