Freestruct
Freestruct adds SEO tags and search to your static docs after build. It works with any SSG - Jekyll, Hugo, Docusaurus, MkDocs, VitePress. Run it once, and every page gets proper meta tags, Open Graph cards, Twitter meta, a sitemap, and cache-busting hashes.
How it works
Freestruct runs after your SSG builds your site. It scans your output folder, reads a simple config, and injects SEO into every HTML file.
1. Build your docs
Run your SSG like you always do. Jekyll, Hugo, Docusaurus, MkDocs - Freestruct doesn't care what you use. It only looks at the HTML files after they're built.
2. Run Freestruct
A single command that reads your config, scans your output folder, and injects SEO into every HTML file.
node docs/lib/inject.js
3. Deploy
Done. Your docs now have Open Graph tags, Twitter Cards, canonical URLs, sitemap.xml, and a unique hash that forces CDNs to fetch fresh content. No plugins, no template changes.
What you get
Freestruct handles all the SEO boilerplate so you don't have to. Configure once, and it injects everything.
Open Graph + Twitter Cards
Every page gets proper meta tags for social previews. LinkedIn, Twitter, Slack - your docs look good everywhere. Configure your site name and image once, and Freestruct applies it everywhere.
Canonical URLs
Proper canonical tags on every page. Search engines index the right URL, not duplicates. Each page gets a canonical pointing to itself with a cache-busting query param.
Cache-busting Hash
Each build gets a unique hash injected into the HTML. The hash appears in a meta tag and in asset URLs (CSS, JS, images, fonts). When CDNs see a new URL with a fresh hash, they fetch fresh content. No manual purge needed.
Auto Sitemap
Freestruct generates sitemap.xml with all your pages. Search engines can crawl everything without help. The sitemap updates automatically on every build.
Custom Code Hooks
Add custom code to every page via hooks. Header, body-start, and footer templates let you inject fonts, analytics, skip links - no template changes needed.
CDN Purge Hooks
Configure CloudFlare, Fastly, or CloudFront to purge automatically after each build. Add a purge command to your config, and Freestruct runs it. Your docs stay fresh.
- Full configuration reference
</section>Quick setup
Install the only dependency, create a config, run Freestruct:
npm install js-yaml
# Create docs/ssr-config.yml with your site info
node docs/lib/inject.js
That's it. See Getting Started for the full guide.
Why Freestruct?
Every static doc site needs the same SEO work. Freestruct does it for you automatically - so you can focus on writing docs.
SSG Agnostic
Works with whatever SSG you already use. Jekyll, Hugo, Docusaurus, MkDocs, VitePress - Freestruct just needs a folder of HTML files. It doesn't care how the HTML was generated.
Zero Template Changes
Don't edit your templates. Don't add plugins to your SSG. Freestruct works on the output files after your SSG is done. Your SSG configuration stays untouched - no lock-in.
Configure Once
One config file has your site name, URL, social handles, and image. Apply it to every page automatically. No repeating yourself across every page template.
CI/CD Ready
Add Freestruct to your GitHub Actions workflow. It runs after your SSG builds. Every deploy gets SEO automatically - no forgetting to update meta tags, no broken social previews.
The concept: post-build SEO
Most SEO tools require template changes or SSG plugins. Freestruct takes a different approach - it runs after your site is built.
Post-build injection
Your SSG builds your site as usual. Then Freestruct reads the HTML files and adds meta tags. This means your SSG doesn't need to know about SEO at all - Freestruct handles it separately.
SSG independence
Because Freestruct works on the output, it works with any SSG. Switch from Jekyll to Hugo? Just keep running Freestruct - your config stays the same.
Single source of truth
Your SEO config lives in one place - ssr-config.yml. Change your site name once, and Freestruct updates every page. No hunting through templates.
Works with CI/CD
Since Freestruct runs after your build, it fits naturally into any CI/CD pipeline. GitHub Actions, GitLab CI, Netlify, Vercel - just add one command to your build script.
Guides
Freestruct vs manual setup
Setting up SEO manually works, but you have to do it for every page. Freestruct automates it.
| Freestruct | Manual | |
|---|---|---|
| Works with any SSG | Yes | Yes |
| Configure once | Yes | No |
| Cache busting | Yes | No |
| No template changes | Yes | No |
| Auto sitemap | Yes | No |
| Search included | Yes | No |