Help centre · Guide 26
Blog - Static sites via GitHub
Time: 15 minutes. Works with: any site built from Markdown files stored in GitHub and published by Netlify, Vercel, GitHub Pages or Cloudflare Pages. The agent adds each article as a Markdown file, and your host rebuilds the site by itself.
Step 1: Create a GitHub token
- On GitHub, open Settings > Developer settings > Personal access tokens > Fine-grained tokens > Generate new token.
- Name it "SocioRelay". Repository access: only the website's repository.
- Permissions > Repository permissions > Contents: Read and write.
- Click Generate token and copy it.
Step 2: Find your folders
Look in the repository for where existing articles live:
| Site builder | Posts folder | File name | Images folder | Image address prefix |
|---|---|---|---|---|
| Hugo | content/posts (or content/blog) | {slug}.md | static/images/blog | /images/blog/ |
| Jekyll | _posts | {date}-{slug}.md | assets/images/blog | /assets/images/blog/ |
| Astro | src/content/blog | {slug}.md | public/images/blog | /images/blog/ |
| Eleventy | posts (or src/posts) | {slug}.md | images/blog | /images/blog/ |
| Gatsby / Next.js | content/blog (check your project) | {slug}.md | public/images/blog | /images/blog/ |
Step 3: Add the website in the app
- Blog > Add a website. Blogging system: Static site via GitHub.
- Website address: for example
https://www.yoursite.com. - Repository:
owner/name(from the GitHub address). Paste the GitHub token. - Fill in Posts folder, File name, Images folder and Image address prefix from Step 2.
- Set Article address pattern to how your posts appear, for example
{url}/posts/{slug}/or{url}/blog/{slug}/. - Press Save, then Test connection.
Good to know
- Each article is written as Markdown with front matter: title, date, slug, description, summary, categories and image. If your theme uses different front-matter names, check one article after publishing and adjust the theme or ask your developer.
- The site is live once your host finishes rebuilding (usually 1 to 3 minutes).
These guides are also in the app: Step-by-step guides. Stuck? Email info@sociorelay.com.