Skip to content

Add citation option in configuration - #3217

Open
Evian-Zhang wants to merge 1 commit into
rust-lang:mainfrom
Evian-Zhang:citations
Open

Evian-Zhang wants to merge 1 commit into
rust-lang:mainfrom
Evian-Zhang:citations

Conversation

@Evian-Zhang

@Evian-Zhang Evian-Zhang commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Follow up the discussion in this thread in Rust Internal Forums. More and more academic papers tend to cite official Rust books, and I think it would be better if the HTML version can directly give people the citation files.

In this PR, a new configuration key "citation" is added to the [output.html]. This key points to a file, and a new button will be added to the up right corner, which will link to the pointed file for user to download.

For now, the download button simply link to the original file given by book authors. In the future, this functionality can become: author provide either bib or cff, user can download bib, plaintext, APA, etc.. But since there is no such a mature crate for this functionality, I think we can temporarily keep it simple, and such functionality should not reside in this crate, but in an individual crate.

@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Sep 8, 2026
@GuillaumeGomez

Copy link
Copy Markdown
Member

Please add a screenshot of what the page looks like with the citation button. Otherwise seems like a good idea to me overall.

@Evian-Zhang

Copy link
Copy Markdown
Contributor Author
截屏2026-09-09 00 36 44 截屏2026-09-09 00 37 22

It looks like this, in the upper right corner.

@GuillaumeGomez GuillaumeGomez added A-needs-discussion This issue/PR needs to be discussed by the team and removed S-waiting-on-review Status: waiting on a review labels Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-needs-discussion This issue/PR needs to be discussed by the team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants