Back to Getting Started
Static Websites

Static Website Integration

Integrate SEO Sniper articles into your static HTML/CSS website using our simple embed system or by downloading HTML files.

Easiest Method: Download Ready-to-Use Script

When you create an API token in Settings → Integrations → API Tokens, we auto-generate a build script with your credentials already embedded.

1Go to Settings → Integrations and create a new API token
2Click "Download Build Script" to get your pre-configured script
3Run node build-blog.js to generate your blog files
4Upload the blog/ folder to your S3 bucket or hosting
Go to Settings to Create Token

Auto-Generated Build Script

No configuration needed! When you create an API token, we generate a script with your credentials already embedded. Just download and run.

What the script does:

  • Fetches all your published articles from the API
  • Downloads complete HTML pages with styling, meta tags, and SEO data
  • Creates a blog index page listing all articles
  • Outputs files to a blog/ folder ready for upload

Usage:

bash
# Run the downloaded script
node build-blog.js

# Output structure:
# blog/
#   index.html           (blog listing page)
#   article-slug-1/
#     index.html         (full article)
#   article-slug-2/
#     index.html
#   ...

Deploying to S3 / CloudFront

bash
# Sync blog folder to your S3 bucket
aws s3 sync ./blog s3://your-bucket-name/blog --delete

# Invalidate CloudFront cache (if using)
aws cloudfront create-invalidation \
  --distribution-id YOUR_DISTRIBUTION_ID \
  --paths "/blog/*"

Optional: Add to package.json

For convenience, you can add the script to your build process:

json
{
  "scripts": {
    "build-blog": "node build-blog.js",
    "deploy": "npm run build-blog && aws s3 sync ./blog s3://your-bucket/blog"
  }
}

Automatic Rebuilds with Webhooks

Trigger a rebuild whenever articles are published by setting up a webhook in Settings → Webhooks.

Netlify: Site Settings → Build & Deploy → Build Hooks

Creates a URL like https://api.netlify.com/build_hooks/...

Vercel: Project Settings → Git → Deploy Hooks

Creates a URL like https://api.vercel.com/v1/integrations/deploy/...

Cloudflare Pages: Use a Worker to trigger builds

Frequently Asked Questions

Do I need to be a developer to add SEO Sniper to a static site?

Not for the simplest path. The downloadable build script comes pre-configured with your API credentials, so for most static sites you only run one command — node build-blog.js — and upload the generated blog/ folder. The static-site-generator route for Hugo, Jekyll, and Eleventy needs a small fetch script, which we provide ready to copy above.

How do my articles stay up to date automatically?

Add a webhook in Settings → Webhooks pointing at your host's deploy hook (Netlify, Vercel, or Cloudflare Pages). Every time you publish or update an article, your site rebuilds with the latest content — no manual redeploys, no stale pages.

Will static pages still rank well without a server?

Yes — arguably better. Pre-rendered static HTML with proper <title> and meta description tags is exactly what search engines and AI crawlers prefer. There is no client-side rendering for them to wait on, so your articles are fully indexable on the very first crawl and load fast for visitors.

Where do I find my API URL and token?

Open Settings → Integrations → API Tokens in your dashboard. Each token starts with sst_ and should be kept on the server or in a build-time environment variable — never committed to a public repository.