Targ Apps Docs
Targ Apps Site

SEO & Indexing

How the Targ Apps marketing site exposes robots.txt, sitemap.xml, blog RSS, meta tags, and JSON-LD.

Search-engine indexing for targapps.xyz is implemented in the targ-apps project. SEO constants and XML builders live in shared modules so routes stay in sync.

Configuration module

app/lib/seo.ts defines:

  • Site origin and canonical URL (https://www.targapps.xyz/)
  • Default title, description, and Open Graph image
  • Blog URLs (/blog, /blog/rss.xml)
  • buildSitemapEntries() — homepage, blog index, and published blog posts
  • buildSitemapXml() and buildRobotsTxt()
  • JSON-LD objects for Organization, WebSite, and ProfessionalService

Update this file when adding indexable pages or changing site-wide SEO constants.

Resource routes

React Router resource routes (loader-only, no UI component) serve crawler-facing endpoints:

Route fileURLContent-Type
app/routes/sitemap[.]xml.ts/sitemap.xmlapplication/xml
app/routes/robots[.]txt.ts/robots.txttext/plain
app/routes/blog.rss[.]xml.tsx/blog/rss.xmlapplication/rss+xml

The sitemap loader reads published blog posts and passes them to buildSitemapEntries(). The blog RSS loader reads the same posts through getAllPosts() and buildBlogRssFeed().

Routes are registered in app/routes.ts and prerendered at build time alongside the homepage and blog pages.

Meta tags & structured data

The homepage route (app/routes/home.tsx) exports:

  • Standard meta — title, description, keywords, author, robots directives
  • Open Graph — type, site name, locale, title, description, url, image dimensions
  • Twitter Cardsummary_large_image with title, description, image
  • Canonical URLhttps://www.targapps.xyz/
  • JSON-LD — Organization, WebSite, and ProfessionalService schemas via script:ld+json

Global layout (app/root.tsx) declares the blog RSS alternate link so feed autodiscovery works site-wide.

Blog routes export their own meta() entries with article Open Graph tags and RSS alternates.

Prerendering

react-router.config.ts prerenders:

  • /
  • /sitemap.xml
  • /robots.txt
  • /blog
  • /blog/rss.xml
  • /blog/[slug] for every published post

Without prerendering, SPA mode would ship an empty HTML shell and most crawlers would miss route-level meta tags.

robots.txt rules

User-agent: *
Allow: /
Disallow: /targapps_kvdb.html

Sitemap: https://www.targapps.xyz/sitemap.xml

The internal KV demo at /targapps_kvdb.html remains reachable but is excluded from indexing.

Adding a new public page

  1. Create the route under app/routes/.
  2. Export meta() and links() with a canonical URL.
  3. For blog posts, add an MDX file under content/blog/ — sitemap and RSS update automatically.
  4. For other indexable pages, extend buildSitemapEntries() in app/lib/seo.ts.
  5. Rebuild — prerender regenerates crawler endpoints with updated content.

Verification

After npm run build, confirm generated files exist under build/client/:

  • index.html — contains prerendered meta and JSON-LD
  • blog/index.html and blog/*/index.html — blog pages
  • sitemap.xml, robots.txt, blog/rss.xml — crawler endpoints

Run:

npm test
npm run typecheck
npm run build

On this page