Post-build SEO layer for static doc sites.
Build your docs with any SSG - Jekyll, Hugo, Docusaurus, MkDocs, VitePress. Run freestruct after build for full SEO coverage.
Static doc sites require the same SEO work every time:
- Meta tags and Open Graph
- Sitemap and canonical URLs
- Cache busting
- Search indexing
- CI/CD wiring
Every project reinvents the wheel.
One tool that wraps the SEO pain points:
npm install freestruct
npx freestructNo template changes needed. Works with any SSG.
- Title, description, canonical per page
- Open Graph tags
- Twitter cards
- JSON-LD structured data
- Generates
search.jsonpost-build - Works with any client-side search
- No external dependencies
- Auto-generated
sitemap.xml - Auto-generated
robots.txt - Auto-generated
feed.xml(RSS)
- Cache-busting hash per build
- Lazy loading on images
- Reading time injection
- Auto 404 page with search
- Link validation
- Custom injection hooks
npm install freestruct# docs/ssr-config.yml
site:
name: My Docs
url: https://example.com/docs
description: My documentation
twitter:
username: "@handle"
og:
image: /og-default.png# Run after your SSG builds
npx freestruct// package.json
{
"scripts": {
"build": "jekyll build && freestruct"
}
}All features are on by default. Disable in docs/ssr-config.yml:
generateSitemap: false # skip sitemap
generateFeed: false # skip RSS
generate404: false # skip 404 page
generateRobots: false # skip robots.txt
readingTime: false # skip read time
lastModified: false # skip timestamp
lazyLoad: false # skip lazy loading
linkCheck: false # skip link check
searchIndex: false # skip search indexPurge hooks run shell commands via execSync. Enable explicitly in config:
# In ssr-config.yml
runHooks: true # must be set to enable
cacheBusting:
purge:
- name: cloudflare
command: "cf-cli purge $SITE_URL"Use only trusted commands. Disabled by default.
Production ready. See CHANGELOG.md for full history.
- prestruct - React SSG for Cloudflare Pages