rust-lang / rust-lang/docs.rs

Stop storing and rendering readmes

Open
#735 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-frontend E-medium P-low
Dominant language
Rust
Stars
1.2k
Forks
232
Avg merge
11h 35m
Merged PRs (30d)
60

Description

One of the features of the "crate details page" is showing the crate's README, and this is currently implemented by storing the markdown in the database and rendering it on the fly.

This feature is also present on crates.io though, and crates.io solved this by pre-rendering the READMEs in HTML and storing them on the CDN:

https://static.crates.io/readmes/{name}/{name}-{version}.html

We could reduce duplication by fetching that URL server side when the user requests the page, defaulting to the crate's description if the readme is missing.

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 at the crate details page and trace how README markdown is currently stored and rendered. Compare that flow with the crates.io-generated URL at static.crates.io/readmes/{name}/{name}-{version}.html; done means fetching the pre-rendered README server-side and falling back to the crate description when it is missing.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.