Short version
  1. Make sure your site already builds when you push to the remote branch (GitHub Pages, Cloudflare Pages or Netlify).
  2. Clone the site repo with GitSync.md into a Files location your editor can open.
  3. 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.
  4. Add images to the folder your generator expects, resized first.
  5. Review the diff in GitSync.md, commit, and push.
  6. 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

Markdown editor (iPhone)
→
GitSync.md commit + push
→
Git repo
→
Host build
→
Live site

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.

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.

Get GitSync.md for iPhone and 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.

GeneratorWhere posts goFile nameMinimal front matterDrafts
Hugocontent/posts/, or the section your theme usesAny name, or a page bundle such as content/posts/my-post/index.mdtitle, 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 titlePut drafts in _drafts/; they aren't published (docs). Future-dated posts aren't published while future is false, its default (docs)
AstroThe folder your collection's loader points to, for example src/content/blog/ (docs)Any name your loader's pattern matchesMust match the collection schema. Copy the fields from an existing postOnly if your schema and pages define one. Check an existing post and your collection config
EleventyThe folder your site uses for postsVaries per sitepermalink and tags conventions vary, so copy an existing postVaries 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.md in a page bundle (the bundle's files become page resources), or in static/.
  • Jekyll: an assets/ folder at the project root, linked as /assets/photo.jpg (docs).
  • Astro: src/assets/ or public/, 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.

Related guides