Repository navigation
improvement(landing): serve the homepage as Markdown when clients ask for text/markdown #9154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
waleedlatif1
merged 2 commits into
staging
from
improvement/homepage-markdown-negotiation
Oct 17, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
apps/sim/app/(landing)/components/home-structured-data/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,8 @@ | ||
| export { HOME_PAGE_DESCRIPTION, HOME_PAGE_TITLE, HomeStructuredData } from './home-structured-data' | ||
| export { | ||
| HOME_FEATURES, | ||
| HOME_HERO_HEADING, | ||
| HOME_HERO_SUMMARY, | ||
| HOME_PAGE_DESCRIPTION, | ||
| HOME_PAGE_TITLE, | ||
| HomeStructuredData, | ||
| } from './home-structured-data' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| import { SITE_URL } from '@/lib/core/utils/urls' | ||
| import { DOCS_URL } from '@/lib/help-links' | ||
| import { | ||
| HOME_FEATURES, | ||
| HOME_HERO_HEADING, | ||
| HOME_HERO_SUMMARY, | ||
| HOME_PAGE_DESCRIPTION, | ||
| } from '@/app/(landing)/components/home-structured-data' | ||
| import { PLATFORM_MENU } from '@/app/(landing)/components/navbar/components/nav-menu-chip' | ||
| import { | ||
| DOCS_LINE, | ||
| GITHUB_LINE, | ||
| linkLine, | ||
| markdownResponse, | ||
| navMenuLines, | ||
| PRICING_LINE, | ||
| SITEMAP_LINE, | ||
| SOLUTION_LINES, | ||
| section, | ||
| } from '@/app/llms.txt/llms' | ||
|
|
||
| export const dynamic = 'force-static' | ||
| export const revalidate = 3600 | ||
|
|
||
| /** | ||
| * The homepage as Markdown. `next.config.ts` rewrites `/` here when `Accept` asks for | ||
| * `text/markdown`, so this body is also served at `/`. It is `no-store` so a cache that ignores | ||
| * `Vary` can never hand it to a browser; at worst such a cache serves the HTML to a Markdown | ||
| * client. | ||
| */ | ||
| export async function GET() { | ||
| const response = markdownResponse( | ||
| [ | ||
| `# Sim: ${HOME_HERO_HEADING.join(' ')}`, | ||
| `> ${HOME_PAGE_DESCRIPTION}`, | ||
| HOME_HERO_SUMMARY, | ||
| section('Get started', [ | ||
| linkLine('Sign up', '/signup', 'Create a free account'), | ||
| PRICING_LINE, | ||
| DOCS_LINE, | ||
| GITHUB_LINE, | ||
| ]), | ||
| section('Build with code', [ | ||
| linkLine( | ||
| 'API quickstart', | ||
| `${DOCS_URL}/api-reference/getting-started`, | ||
| 'Create an API key and run a deployed workflow' | ||
| ), | ||
| linkLine( | ||
| 'TypeScript SDK', | ||
| `${DOCS_URL}/api-reference/typescript`, | ||
| '`bun add simstudio-ts-sdk`' | ||
| ), | ||
| linkLine('Python SDK', `${DOCS_URL}/api-reference/python`, '`pip install simstudio-sdk`'), | ||
| linkLine('CLI', `${DOCS_URL}/cli`, '`bun add -g sim`'), | ||
| linkLine('MCP server', `${DOCS_URL}/mcp/overview`, 'Connect an AI app to Sim'), | ||
| ]), | ||
| section( | ||
| 'What teams do in Sim', | ||
| HOME_FEATURES.map((feature) => `- ${feature}`) | ||
| ), | ||
| section('Platform', navMenuLines(PLATFORM_MENU)), | ||
| section('Solutions', SOLUTION_LINES), | ||
| section('More', [ | ||
| linkLine('llms.txt', '/llms.txt', 'An index of every public page'), | ||
| linkLine( | ||
| 'llms-full.txt', | ||
| '/llms-full.txt', | ||
| 'Full text of the library, customer stories, and comparisons' | ||
| ), | ||
| SITEMAP_LINE, | ||
| ]), | ||
| ], | ||
| revalidate | ||
| ) | ||
| response.headers.set('Cache-Control', 'no-store') | ||
| response.headers.set('Link', `<${SITE_URL}>; rel="canonical"`) | ||
| return response | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.