about summary refs log tree commit diff
path: root/src/librustdoc/html/static_files.rs
AgeCommit message (Collapse)AuthorLines
2023-09-15rustdoc: merge theme css into rustdoc.cssMichael Howell-3/+0
Based on https://github.com/rust-lang/rust/pull/115812#issuecomment-1717960119 Having them in separate files used to make more sense, before the migration to CSS variables made the theme files as small as they are nowadays. This is already how docs.rs and mdBook do it.
2023-09-13Merge settings.css into rustdoc.cssGuillaume Gomez-1/+0
2023-08-16Improve code readability by moving fmt args directly into the stringGuillaume Gomez-1/+1
2023-07-14rustdoc: use `src` consistently over `source` in JavaScriptMichael Howell-1/+1
Since the directory that contains source files is called `src`, it makes sense to name the scripts that way, too.
2023-02-01Inline CSS background images directly into the CSSGuillaume Gomez-3/+0
2022-11-26Fix UI issues with Rustdoc scrape-examples feature.Will Crichton-1/+1
* Help file was being loaded from the wrong place. * CSS selector in JS has a typo. * Line numbers are overflowing, change to display: grid to fix.
2022-11-18couple of clippy::perf fixesMatthias Krüger-1/+1
2022-11-14Fix missing minification for static filesGuillaume Gomez-2/+6
2022-10-29Generate static file hashes onceJacob Hoffman-Andrews-9/+18
2022-10-29Make --static-root-path point to static.filesJacob Hoffman-Andrews-2/+2
2022-10-29rustdoc: add hash to filename of toolchain filesJacob Hoffman-Andrews-147/+99
All static files used by rustdoc are now stored in static.files/ and include a hash of their contents. They no longer include the contents of the --resource-suffix flag. This clarifies caching semantics. Anything in static.files can use Cache-Control: immutable because any updates will show up as a new URL. Invocation-specific files like crates-NN.js, search-index-NN.js, and sidebar-items-NN.js still get the resource suffix. The --disable-minification flag is removed because it would vary the output of static files based on invocation flags. Instead, for rustdoc development purposes it's preferable to symlink static files to a non-minified copy for quick iteration.
2022-05-21Remove `crate` visibility modifier in libs, testsJacob Pratt-45/+48
2022-05-14Remove theme picker buttonGuillaume Gomez-3/+0
2022-04-21Remove .woff font filesGuillaume Gomez-42/+9
2022-03-27Add scrape examples help pageWill Crichton-0/+2
2022-01-13Use the updated Rust logo and change it's format to SVGLoïc BRANSTETT-2/+3
2021-10-26rustdoc: use ttf based font for cjk glyphsShinwoo Park-9/+29
2021-10-23Rollup merge of #85833 - willcrichton:example-analyzer, r=jyn514Matthias Krüger-0/+4
Scrape code examples from examples/ directory for Rustdoc Adds support for the functionality described in https://github.com/rust-lang/rfcs/pull/3123 Matching changes to Cargo are here: https://github.com/rust-lang/cargo/pull/9525 Live demo here: https://willcrichton.net/example-analyzer/warp/trait.Filter.html#method.and
2021-10-12rustdoc: update noto sans krShinwoo Park-8/+7
2021-10-08Move template initialization into its own file.Jacob Hoffman-Andrews-3/+0
2021-10-08Add template for print_itemJacob Hoffman-Andrews-0/+1
Add print_item.html and the code in print_item.rs to use it.
2021-10-06Move JS into a standalone fileWill Crichton-0/+4
2021-08-03Simplify usage of CSS background-imageGuillaume Gomez-4/+6
2021-08-03Rustdoc accessibility: use an icon for the [-]/[+] controlsMichael Howell-0/+4
This way, we can show the plus and minus buttons on screens, while voice control will read off actual words "Collapse" and "Expand" instead of reading "open brace minus close brace" and "open brace plus close brace". Part of #87059
2021-07-07Clean up rustdoc static filesGuillaume Gomez-41/+42
2021-06-22Rollup merge of #86402 - tspiteri:source-woff2, r=jshaYuki Okushi-0/+24
rustdoc: add optional woff2 versions of Source Serif and Source Code This provides woff2 versions of Source Serif and Source Code similar to how #82545 provides woff2 versions of Fira Sans. The total byte count for the six files (three for each font family) is reduced by 25% from 476 KiB to 358 KiB.
2021-06-20Use Tera templates for rustdoc.Jacob Hoffman-Andrews-0/+2
Replaces a format!() call in layout::render with a template expansion. Introduces a `templates` field in SharedContext so parts of rustdoc can share pre-rendered templates. This currently builds in a copy of the single template available, like with static files. However, future work can make this live-loadable with a perma-unstable flag, to make rustdoc developers' work easier.
2021-06-17rustdoc: add optional woff2 versions of Source Serif and Source CodeTrevor Spiteri-0/+24
2021-05-31Remove unneeded file to load sidebar items at crate levelGuillaume Gomez-3/+0
2021-05-26Rollup merge of #84048 - konan8205:master, r=jshaYuki Okushi-0/+11
Avoid CJK legacy fonts in Windows As metioned in #84035, the default serif CJK font in Windows is meh-looking. To avoid this, we should use sans-serif font or provide CJK glyph supported font in `rustdoc.css`.
2021-05-15Call `initSidebarItems` in root module of crateJustus K-0/+3
2021-05-15chore: format codeShinwoo Park-3/+6
2021-05-15rustdoc: update static filesShinwoo Park-0/+8
2021-05-10Use an SVG image for clipboard instead of unicode characterGuillaume Gomez-0/+3
2021-04-14Update comment on search.js static file.Jacob Hoffman-Andrews-2/+1
2021-04-12Move search JS into search-index.jsJacob Hoffman-Andrews-0/+4
Export a few variables and functions into the global scope because they are needed both by main.js and search-index.js.
2021-04-05Update Source Serif to release 4.004Trevor Spiteri-11/+10
Now the family name is Source Serif 4 (upstream issue 77) instead of Source Serif Pro.
2021-03-07Update Source Code Pro and include italicsTrevor Spiteri-4/+8
2021-02-26Embed woff2 files in rustdoc binary.Jacob Hoffman-Andrews-0/+6
2020-11-15Make all rustdoc functions and structs crate-privateJoshua Nelson-36/+36
This gives warnings about dead code.
2020-09-23Use theme-adaptive SVG favicon from other Rust sitesJarek Samic-2/+4
2020-07-12Add Ayu theme to rustdocJarek Samic-0/+3
2020-03-07rustdoc: remove redundant static lifetimes (clippy::redundant_static_lifetimes)Matthias Krüger-28/+28
2019-11-21Revert "Update Source Code Pro and include italics"Guillaume Gomez-8/+4
This reverts commit ea9519bf16f0be137a814a49c9fbaf232ba49a43.
2019-11-20Rollup merge of #65665 - tspiteri:italic-and-update-SourceCodePro, ↵Mazdak Farrokhzad-4/+8
r=GuillaumeGomez Update Source Code Pro and include italics Fixes #65502. A few notes: * As stated in #65502, this does increase the download size. * Since this PR changes the font set, I think docs.rs would have to be updated if this PR is merged. * The fonts have a double extension (.ttf.woff); this is to keep the names consistent with the upstream font release which does that to distinguish these from the .otf.woff files ([Source Code Pro otf renders poorly on older Windows system apps](https://github.com/adobe-fonts/source-code-pro/issues/25#issuecomment-9019600)).
2019-11-18Rename rustdoc options --themes and --check-themes to --theme and --check-themeGuillaume Gomez-1/+1
2019-11-18rename check-theme option into check-themesGuillaume Gomez-1/+1
2019-11-18Rename theme-checker option to check-themeGuillaume Gomez-1/+1
2019-10-21Update Source Code Pro and include italicsTrevor Spiteri-4/+8
2019-04-29Revert "Update Source Code Pro fonts to version 2.030"Manish Goregaokar-1/+1
This reverts commit 6bafc58cedc6f409dbcd8919a25b2f5d425f42ae.