Repository
If your site builds from a Git repository, Publishedt can commit each new item to it as a Markdown file, one commit per item. The post appears on your site when it deploys, the same way a post you wrote yourself would.
It works with a repository on GitHub, or on a Forgejo or Gitea server such as Codeberg. The layout presets cover the Hugo, Jekyll, Eleventy, and Astro static site generators, and Custom covers the rest.
Make a token
Publishedt needs a token that can push to one repository. Keep the token as narrow as you can, because anyone who has it can write to that repository.
GitHub
GitHub calls this a fine-grained personal access token.
- Open Settings, then Developer settings, then Personal access tokens, then Fine-grained tokens, and choose Generate new token.
- Under Resource owner, choose the account that owns the repository. For an organization's repository, choose the organization. An organization may list the token as pending until an owner approves it, and a connect before then can fail to find the repository.
- Set Repository access to Only select repositories, and choose your site's repository.
- Under Permissions, set Contents to Read and write.
- Set a long expiry. GitHub lets Publishedt read when the token expires, so you get a warning before then. A token with no expiry gets no warning.
- Copy the token.
Forgejo, Gitea, and Codeberg
- Open Settings, then Applications, then Manage access tokens.
- Name the token, and under Permissions give repository read and write access, which is the
write:repositoryscope. The label varies by version. If your server offers it, limit the token to specific repositories. - Generate the token and copy it. The server shows it only once.
A Forgejo or Gitea token doesn't expire. It works until you delete it.
A read-only token
On GitHub, Publishedt refuses a read-only token when you connect. It checks by writing an empty file object that no commit points to, so nothing changes in the repository, and GitHub cleans it up.
A Forgejo or Gitea server may report whether the token's account can push, rather than whether the token itself can, so a read-only token can get past the connect check there. If the first post fails with "The token can no longer push to this repository", the token is probably read-only. Make a token with write access to the repository's contents, and choose Reconnect on the destination's page.
Connect
- In Publishedt, go to Destinations, then Connect a destination, and choose Repository.
- Choose your Forge. For Forgejo or Gitea, enter the Server, such as
https://codeberg.org. - Enter the Repository as
owner/name, or paste its page's address. - Enter the Branch, or leave it empty to use the repository's default branch.
- Paste the token under Token.
- Choose your Site generator. Choose Custom to set your own path, front matter, and image folder.
- Choose Connect repository, then Send a test post on the destination's page to check it.
If it worked, Publishedt shows Test post sent, and its View commit link opens the commit. Activity lists it as Test post with the status Posted, and the destination shows as Working. The post shows up on your site once its build runs. If it didn't work, the message gives the reason, in the same words Activity uses.
A test post is a real commit. It adds a test file to the branch, and your site's build publishes it. Delete the file once you've seen it.
When you connect, Publishedt checks that the token can push to the repository, that the repository isn't archived, and that the branch exists. Keep the token private. Publishedt stores it encrypted and never shows it again.
You can connect each branch of a repository once per workspace, so to post to two branches, connect two destinations.
Next, route a feed to it, then use its template to decide what goes in each file's body.
The files
Each item becomes one Markdown file, with its images either next to it or in a folder of their own. Your site generator decides the path and the front matter.
| Site generator | File | Images |
|---|---|---|
| Hugo | content/posts/{{ date }}-{{ slug }}/index.md |
Next to the file |
| Jekyll | _posts/{{ date }}-{{ slug }}.md |
assets/images/{{ slug }}/ |
| Eleventy | posts/{{ date }}-{{ slug }}/index.md |
Next to the file |
| Astro | src/content/posts/{{ slug }}/index.md |
Next to the file |
dateis the item's date in UTC, as2026-01-02.year,month, anddayare its parts.slugis the title in lowercase letters, digits, and dashes, cut to 60 characters, then a dash and 6 characters from the item's ID. An item with no title gets only the 6 characters. The same item always gets the same slug, which is how a retry finds the file it already wrote.
Front matter
The file starts with front matter, between --- lines for YAML or +++ lines for TOML:
---
title: "Notes on a trip"
date: "2026-01-02T15:04:05Z"
link: "https://example.com/trip"
tags:
- "travel"
images:
- src: "./image-1.jpg"
alt: "A lake at dawn"
---
title,date(RFC 3339), andlink(the item's address) are always there.tagslists the item's tags, and is left out when there are none.imageslists each image'ssrcandalt, and is left out when there are none.srcis relative to the file.
Publishedt writes every value as a quoted string. A colon, a quote, or a line break in a title can't break the file.
After the front matter comes the body, which is the route's template. It starts as {{ summary }}, a blank line, then {{ url }}.
The body and your site's templates
A post's text can contain template syntax, such as a post about Liquid or Hugo. Each preset writes the body so that your site's build reads it as text:
- Jekyll: each line of the body sits in a
{% raw %}block, and the front matter setsexcerpt_separatorto a blank line, so the excerpt ends between blocks. A reference link's definition, such as[1]: https://example.com, is written as it is when it contains no{{,}},{%, or%}, so the excerpt keeps it. The body's line ends are rewritten so a blank line always ends the excerpt. - Eleventy: the front matter sets
templateEngineOverride: md, so Eleventy reads the file as Markdown alone, with no Liquid or Nunjucks. - Hugo: a
{{<or{{%in the body is written as{\{<or{\{%, so Hugo doesn't read it as a shortcode. The page shows the braces without the backslash, except in code, where the backslash shows. - Astro: a
.mdentry is Markdown alone, so the body is written as it is. - Custom: the body is written as it is, with no escaping for any template engine. If your site runs the file through one, use a template whose output can't contain that engine's syntax, or turn the engine off for these files.
Hugo
Choose the Hugo preset for a Hugo site. Hugo's built-in templates don't read an images list of src and alt, so the preset writes resources instead, with each image's src and its alt text as its title. Hugo then treats the images as page resources of the bundle.
Jekyll
The preset sets excerpt_separator to a blank line in each post, whatever your site's _config.yml sets. Each post's excerpt is its first paragraph.
Jekyll's image src is a path from the site root, such as /assets/images/a-title-3f9a1c/image-1.jpg. That assumes the repository's root is your site's root. For a Jekyll site in a subfolder, choose Custom.
Astro
The preset writes title, date, link, tags, and images. Your collection's schema has to accept those fields, or your site's build fails on the first commit. date is written as a quoted string, so your schema has to read it with z.coerce.date(), not z.date(). If your schema needs other names, such as the blog starter's pubDate and description, you have two options:
- Change the schema to accept the fields Publishedt writes.
- Choose Custom, and set a path in a collection of its own, with a schema that accepts those fields.
A site in a subfolder
Every preset's path starts at the repository's root. If your site lives in a subfolder, such as site/, choose Custom and put the folder in the path, such as site/content/posts/{{ date }}-{{ slug }}/index.md. Set the image folder the same way.
Custom
Custom takes three settings, and the page shows a sample path as you type.
- Path: a template made of
{{ date }},{{ year }},{{ month }},{{ day }}, and{{ slug }}. The path has to remain inside the repository, use only letters, digits, dots, dashes, underscores, and slashes, and end in.mdor.markdown. - Front matter: YAML or TOML.
- Image folder: a template like the path. It has to include
{{ slug }}, so that each item's images remain separate. Leave it empty to put images next to the file.
To change any of this later, choose Edit layout on the destination's page. A change applies to the items that come after it, and files that were already committed remain as they are.
What's committed
- One commit per item. The message is
Addfollowed by the title, or by the slug when there's no title. The token's account is the commit's author. - Images: at most 4 images, named
image-1,image-2, and so on, each with its own extension. Publishedt shrinks each one, and leaves off any image that's still over 10 MB or that can't be fetched. Activity shows why. - Pacing: a destination's commits are at least 2 seconds apart.
A file that is already there
Before it commits, Publishedt looks for the item's file on the branch.
- If there's no file, it commits.
- If the same file is there, an earlier try landed and its response was lost. Publishedt doesn't commit again, and the post counts as sent, with the file's page as its link.
- If a different file is there, Activity shows "A file is already at this item's path and it's different, so Publishedt left it alone." Publishedt never overwrites a file. Move or delete the file, or change the path template, then choose Try again in Activity.
A different file usually means someone edited the post after it was committed, and then the delivery was tried again.
A protected branch
If the destination shows Needs attention with the message "The branch is protected and rejects direct commits", choose another branch with Change branch, or let the token's account commit to the branch. On GitHub, that means adding the account to the branch rule's bypass list.
A protected branch rejects commits pushed straight to it, and Publishedt doesn't open pull requests.
When the token expires
When a GitHub token expires, the destination's page shows Token expired, and the next post is rejected, which sets the destination to Needs reconnecting. Make a new token and choose Reconnect on the destination's page. Posts are queued until you do. A token for a different repository is rejected.
Publishedt sends a warning before that happens. It reads a GitHub token's expiry and checks it regularly. When a token expires within 7 days, Publishedt sends one notice for it in the workspace's failure emails, if those are on. The destination's page shows the date under Token expires, with a warning when it's near. A token that's already within 7 days when you connect it gets no email, so you'll only see it on the page.
Reconnect, change branch, and edit layout
- Reconnect: paste a new token for the same repository. If the repository was moved or renamed, enter its new name too, and you can leave the token empty to keep the saved one, unless it has expired.
- If the page shows "The token can no longer push to this repository", you can fix the token instead of replacing it. Give it write access on the forge, then choose Reconnect and leave the token empty, and Publishedt checks again with the saved token. An expired token can't be checked again, so paste a new one.
- Change branch: enter another branch. The token doesn't change.
- Edit layout: choose another site generator, or change Custom's settings.
Posted link
Activity links each post to its commit, labeled View commit. When the file was already there, the link goes to the file's page instead, labeled View file.
Limits
- Images: at most 4 images per post, 10 MB each.
- Posts per day: your plan sets a daily cap for each destination. See Pricing.
What each failure means
| Activity shows | What it means |
|---|---|
| The forge no longer accepts this destination's token. Reconnect it with a new token to keep committing. | The forge no longer accepts the token: it was revoked or ran out. Posts wait. Create a new token, then open the destination and choose Reconnect. |
| Publishedt couldn't read this destination's saved token. Reconnect it to keep committing. | The saved token or repository can't be read. Posts wait. Open the destination and choose Reconnect. |
| The token can no longer push to this repository. Give it write access to the repository's contents, or reconnect with a new token. | The token can no longer push to the repository. Posts wait. Give it write access to the repository's contents, or reconnect with a new token. |
| The repository was moved, renamed or deleted. Reconnect to choose it again. | The forge can't find the repository: it was moved, renamed, or deleted, or the token can't see it. Posts wait. Reconnect and choose it again. |
| The branch Publishedt commits to is gone. Choose another branch. | The branch Publishedt commits to was deleted or renamed. Posts wait. Choose another branch. |
| The branch is protected and rejects direct commits. Choose another branch, or let the token's account commit to it. | The branch is protected and rejects commits pushed directly to it. Nothing was committed. Posts wait. Choose another branch, or let the token's account commit to it. |
| A file is already at this item's path and it's different, so Publishedt left it alone. | A different file is already at the item's path, often because someone edited it. Publishedt never overwrites a file, so nothing was committed. Move the file, or change the path template, then choose Try again in Activity. |
| This item's file path isn't valid. Check the destination's path template. | The path template made a path that can't be committed: outside the repository, with characters other than letters, digits, dots, dashes, underscores, and slashes, or not ending in .md or .markdown. Fix the path template, then choose Try again in Activity. |
| Your repository rejected the post. | The destination rejected this post and gave a reason. It isn't retried. Fix what it names, then choose Try again in Activity. |
| Your repository had an error. | The destination kept responding with an error. Publishedt retried, waiting longer each time, then stopped. Choose Try again in Activity. |
| Your repository took too long to respond. | Each try timed out before the post was sent. Nothing posted. Choose Try again in Activity. |
| Publishedt couldn't reach your repository. | Publishedt couldn't connect on any try. Nothing posted. Choose Try again in Activity. |
| Publishedt couldn't confirm whether this posted. Check your repository before posting it again. | The post was sent, but no response came, so Publishedt can't tell whether it was posted. Check the destination. If the post isn't there, post it again from Activity. |
| Posted without n image(s) that your repository rejected. | A note, not a failure: the post was sent without some images. The table below shows why for each. |
Images
| Why an image was left off | What it means |
|---|---|
| Publishedt couldn't download an image from the feed's site. | The image's address didn't respond. |
| An image's address isn't a public website. | The image is on a private network, which Publishedt never connects to. |
| A linked file isn't a picture Publishedt can post. | The file at the image's address isn't an image. |
| An image is in a format Publishedt can't post, such as HEIC. | The image is in a format that can't be posted, such as HEIC or an animated AVIF. Use JPEG, PNG, GIF, WebP, or AVIF. |
| An image is too large to process. | The image is over 10 MB, or has too many pixels to open. |
| An image couldn't be made small enough for your repository. | The image couldn't be made small enough for the destination's size limit. |
For failures any destination can run into, see Getting started.
Something wrong on this page? Contact support@publishedt.app.