- Make sure your site already builds when you push to the remote branch (GitHub Pages, Cloudflare Pages or Netlify).
- Clone the site repo with GitSync.md into a Files location your editor can open.
- Duplicate your last post in an editor that opens that folder in place, then change it. Keep the front matter, folder and file-name rules for your generator.
- Add images to the folder your generator expects, resized first.
- Review the diff in GitSync.md, commit, and push.
- Check the host's build (GitHub Actions run, Cloudflare or Netlify deploy), then reload the post URL.
This works for Hugo, Jekyll, Astro and Eleventy because the phone never touches the generator. What differs is where the post goes, what it is called, what front matter it needs and how drafts work. The reference table in Step 3 covers each.
How the pieces fit
The phone does not run Hugo, Ruby, Node or a preview server. GitSync.md only clones, commits, pulls and pushes. The build happens on your host's servers. Because you can't preview on the phone, the build result in Step 6 takes the place of a preview. If you publish an Obsidian vault with Quartz instead, see Publish Obsidian notes with Quartz from your iPhone.
Before you start
Do this one-time check on any device: the site must build when you push to the remote branch. Which setup you have decides what to look at later.
- GitHub Pages with Jekyll from a branch (the classic setup): GitHub builds the site, but only supported plugins run. GitHub says Pages cannot build sites using unsupported plugins. Custom plugins need a build elsewhere, such as a GitHub Actions workflow.
- GitHub Pages with Hugo or Astro: needs a GitHub Actions workflow, and Settings → Pages → Source set to GitHub Actions (GitHub: publishing source). See Hugo's GitHub Pages guide and Astro's. Astro's guide also has you set
site(andbasefor a project site) in the config. - Cloudflare Pages and Netlify: connect the repository through their Git integration (Cloudflare). Cloudflare creates preview deployments for branches that aren't the production branch. Netlify builds Deploy Previews for pull requests.
If your site is only built on a laptop today, set up one of these first.
Clone the site repo on the phone
Install GitSync.md and clone your site repository. When you choose the destination, pick a Files location your editor can open, such as On My iPhone or the editor's own folder. Sign in with an HTTPS token or use SSH. The token link builder sets up a GitHub token, the clone guide walks through the screens, and the SSH guide covers keys. On iPad, see Git on iPad.
Pick an editor that opens a Files folder in place
Apps that can open a folder from Files include iA Writer, Obsidian, Runestone, Textastic and 1Writer. Check each app's current App Store page for what it supports. "In place" matters: an editor that imports a copy of the file edits the copy, so the change never reaches the repository. After your first edit, return to GitSync.md and confirm the diff shows that change.
Create the post
Fastest and safest: duplicate your last post and edit it, so the front matter and folder are already right. If you start from scratch, use this table.
| Generator | Where posts go | File name | Minimal front matter | Drafts |
|---|---|---|---|---|
| Hugo | content/posts/, or the section your theme uses | Any name, or a page bundle such as content/posts/my-post/index.md | title, date, draft (docs) | draft: true pages aren't built by default, and neither are future-dated pages: buildDrafts and buildFuture default to false (docs) |
| Jekyll | _posts/ | YEAR-MONTH-DAY-title.md is required (docs) | Front matter is required, even if empty; usually layout and title | Put drafts in _drafts/; they aren't published (docs). Future-dated posts aren't published while future is false, its default (docs) |
| Astro | The folder your collection's loader points to, for example src/content/blog/ (docs) | Any name your loader's pattern matches | Must match the collection schema. Copy the fields from an existing post | Only if your schema and pages define one. Check an existing post and your collection config |
| Eleventy | The folder your site uses for posts | Varies per site | permalink and tags conventions vary, so copy an existing post | Varies per site |
Copyable front matter. Replace the values with your own, and compare with an existing post in your repo.
Hugo (YAML), for example content/posts/hello-from-iphone.md:
---
title: "Hello from my iPhone"
date: 2026-12-02T09:00:00-05:00
draft: false
---
This post was written on a phone.
Hugo's docs show dates such as 2023-10-15T13:18:50-07:00. A date in the future, or draft: true, keeps the page out of the default build.
Jekyll, for example _posts/2026-12-02-hello-from-iphone.md:
---
layout: post
title: "Hello from my iPhone"
---
This post was written on a phone.
The layout name must exist in your site. post is common, but check an existing post.
Astro, for example src/content/blog/hello-from-iphone.md. These field names are only an example; yours come from your collection schema:
---
title: "Hello from my iPhone"
description: "A first post written on a phone."
pubDate: 2026-12-02
---
This post was written on a phone.
Add images from the phone
Save the photo into the repo folder from Photos with Share → Save to Files, choosing the cloned repository's folder, then link to it in the post. Where images go depends on the generator:
- Hugo: next to
index.mdin a page bundle (the bundle's files become page resources), or instatic/. - Jekyll: an
assets/folder at the project root, linked as/assets/photo.jpg(docs). - Astro:
src/assets/orpublic/, depending on how your site and schema handle images. Copy how an existing post does it.
Resize before you commit. Full-resolution phone photos bloat the repository, and every version stays in history. Use lowercase file names without spaces. If your repo already uses Git LFS, see Git LFS on iOS.
Review, commit and push in GitSync.md
Open the repository in GitSync.md, check the diff so only the post and its images changed, write a clear commit message, and push. If you also edit on a laptop, pull first. Before pushing, you can check how GitHub-flavored Markdown renders in the Markdown preview; it doesn't know your theme or generator.
Confirm it went live
Open the build result in your phone's browser: the repository's Actions tab for GitHub Pages, or the Cloudflare or Netlify deploy log. When it's green, reload the post URL. A failed run tells you why, usually in a few lines.
Safer option: create a branch in GitSync.md (the repository's Git tools have a Branches section with Create and Switch), commit and push that branch, and open the preview deploy. Cloudflare builds branches other than production; Netlify builds a Deploy Preview for a pull request, which you can open on GitHub. Then merge on the host's Git service. Your production branch name is whatever your host is set to use.
Optional: a one-tap Shortcut
GitSync.md has a Sync Repository Shortcuts action that pulls first, then stages, commits and pushes, and stops with a message on a conflict or divergence instead of guessing. Add it to a Shortcut after you write and publishing becomes one tap. See Automate Git pulls with Apple Shortcuts for what it does and doesn't do. It stages all non-ignored changes, so review the diff first.
Troubleshooting
The post doesn't appear
Check, in order: draft: true in a Hugo post; a future date (Hugo's buildFuture and Jekyll's future are off by default); a post in the wrong folder; a Jekyll file name that is missing the date or has the wrong format; a Jekyll post in _drafts/. Time zones matter: a date a few hours ahead of the build's clock counts as future.
The build failed
Open the log. Typical causes: an Astro post whose front matter doesn't match the collection schema (Astro reports a violation, so fix the field it names); a Hugo date that isn't in a format Hugo accepts; a Jekyll plugin that GitHub Pages doesn't support when you publish from a branch.
The push is rejected
The remote has commits you don't. Pull first. If it conflicts, follow Fix merge conflicts on iPhone; the steps are the same for any Markdown repo.
Authentication errors
See Obsidian Git not working on iPhone for token and permission checks; they apply to any HTTPS remote. If you edit workflow files from the phone, the token may need the workflow permission.
The image doesn't load
Check the path and the case. Linux build servers treat Photo.JPG and photo.jpg as different files, and a path that works from your editor may not match the URL on the site.
Dedicated blogging apps vs a Git client
Single-purpose "blog from phone" apps exist. A general Git client such as GitSync.md also syncs notes and other repositories and shows real diffs. If you only ever publish to one site and want a guided editor, a dedicated app may be simpler. Check each app's own page for what it does.
FAQ
Can I preview the site on the phone?
No. GitSync.md doesn't build or preview sites. Push a branch and open the preview deploy from Cloudflare Pages or Netlify instead.
Does this work on Android?
Yes. GitSync.md is on Google Play, and the loop is the same with an editor that can open a Files folder, such as Markor. See Markor with Git on Android.
Do I need GitHub?
No. GitLab, Codeberg and Bitbucket work as remotes too, and Cloudflare Pages and Netlify connect to some of them. See the GitLab and Codeberg guides for the Git side, and check your host's docs for which providers it supports.
Can I schedule a post?
Only indirectly. Hugo and Jekyll skip future-dated posts by default, so a future date publishes only if a build runs after that time, for example a scheduled workflow or a manual redeploy. A push alone won't make it appear. Check your host's docs for scheduled builds.
Write the post, push, and let your host build it.
