rust-lang / rust-lang/mdBook

unable to use serve as a http server if site-url is required

Open
#2,732 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
22.2k
Forks
1.9k
PR merge metrics
PR metrics pending

Description

The code snippet makes it impossible to use the serve command to be used as a http server.
It is pretty handy if you want to also watch for changes.

I guess there is a reason for overwriting site-url here, is that still necessary?

https://github.com/rust-lang/mdBook/blob/e8dff6f97e6558655fe92290744bb4312b3f3c4e/src/cmd/serve.rs#L67

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 reading src/cmd/serve.rs at the linked line and reproduce the serve command with a required site-url. Determine why site-url is overwritten and whether that is necessary; done means serve can act as an HTTP server while watching for changes without breaking required site-url handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
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.