forked from Qiskit/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert images to AVIF (Qiskit#2555)
This PR converts all existing PNG and JPG images to AVIF and updates the markdown to point to the new files. This is blocked by a PR in inner-source that will add support for AVIF images. <details><summary>Conversion script</summary> ```python from pathlib import Path import subprocess # I ran this again with the extension changed to ".jpg" image_files = Path("public/").rglob("**/*.png") def to_relative(path: Path) -> str: return str(path).removeprefix("public/") for file in image_files: outfile = file.with_suffix(".avif") subprocess.run(f"magick {file} {outfile} && rm {file}", shell=True) subprocess.run(f"sd -s '{to_relative(file)}' '{to_relative(outfile)}' docs/**/*", shell=True) ``` And then I had to follow it up with this (run from `docs/`) to clean up links that didn't work for some reason. ```sh rg '\.png\)' -l | xargs sd -s '.png)' '.avif)' ``` </details> This PR also enables the AVIF conversion in the API docs sync script, and the AVIF linter for markdown files.
- Loading branch information
1 parent
b54ddb9
commit ca11486
Showing
8,216 changed files
with
3,150 additions
and
3,142 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.