Thinkmill / Thinkmill/keystatic

Docs: Add "how to add images" to the Astro starter

Open
#617 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
Dominant language
TypeScript
Stars
2.4k
Forks
159
Avg merge
21h 41m
Merged PRs (30d)
2

Description

https://github.com/Thinkmill/keystatic/blob/main/docs/src/content/pages/installation-astro.mdoc

^ It'd be great to include "how to add images and ensure they're resolved" to the astro docs, since there seems to be some awkwardness with how the paths are generated:

with src/content/posts/first-post.mdoc in the starter, uploading an image from the ui adds src/content/posts/first-post/content/image.jpeg and links ![](image.jpeg) in src/content/posts/first-post.mdoc, which Astro ends up not resolving.

Maybe worth changing the config / reccomending changing the config for a blog w/ images or improving the path generation code?

Changing keystatic.config.ts to path: "src/content/posts/*/" doesn't seem to help, since then the image is still referenced as ![](image.jpeg) when it's in the ./content/ directory

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with docs/src/content/pages/installation-astro.mdoc and reproduce the image upload in the Astro starter using src/content/posts/first-post.mdoc and keystatic.config.ts. Document a working image setup and confirm that uploaded images are referenced with paths Astro resolves; whether config or path generation changes are needed remains open.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.