Add citation option in configuration - #3217
Open
Evian-Zhang wants to merge 1 commit into
Open
Evian-Zhang wants to merge 1 commit into
Evian-Zhang wants to merge 1 commit into
Conversation
Member
|
Please add a screenshot of what the page looks like with the citation button. Otherwise seems like a good idea to me overall. |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


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.