Skip to content

Commit

Permalink
iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
elringus committed Nov 10, 2023
1 parent 4534039 commit 5a99cc8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/.vitepress/ext/vite/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ export const Vite: UserConfig = {
ext: ".md",
enforce: "pre",
local: "./docs/public/assets",
cache: "./docs/public/assets/remote/.cache"
cache: "./docs/public/assets/remote/.cache",
width: 720
})],
resolve: { alias: [override("NotFound", "not-found")] }
};
Expand Down
5 changes: 4 additions & 1 deletion docs/.vitepress/imgit/server/transform/5-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,8 @@ export function buildServeRoot(asset: EncodedAsset): string {
}

function buildStyle(size: AssetSize) {
return `style="width: ${size.width}px; height: ${size.height}px"`;
const mod = config.width && size.width > config.width ? config.width / size.width : 1;
const width = Math.floor(size.width * mod);
const height = Math.floor(size.height * mod);
return `style="width: ${width}px; height: ${height}px"`;
}

0 comments on commit 5a99cc8

Please sign in to comment.