Redocly / Redocly/redoc

redoc-cli serve does not load assets

Open
#1,264 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
TypeScript
Stars
25.9k
Forks
2.4k
Avg merge
13h 10m
Merged PRs (30d)
4

Description

I would like to use redoc-cli serve while developing to see live updated to my site. However non of my images are loading. They all live in the same directory as where I call redoc. My dir structure is

/openapi
  openapi.yaml
/assets
  logo.png
template.hbs

From this directory I call:
@npx redoc-cli@0.9.6 serve openapi/openapi.yaml --watch -t template.hbs
Any way of making the images show up?

Contributor guide

Open the contributing guide

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 by reproducing the issue with the shown /openapi, /assets, and template.hbs layout and the redoc-cli serve command. Trace how serve handles the OpenAPI path, template, and --watch mode; done means images from /assets load while viewing the served documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
handlebars, openapi, typescript
Domain
cli, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.