Make the width of Markdown images configurable (fixed at 760px)
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 85/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- html, hugo
- 領域
- content
調査の方向性
modules/blox/layouts/_markup/render-image.html の 45-52 行を読み、 img タグの sizes および Fit size が 760 に固定されている箇所を確認せよ。サイトパラメータ hugoblox.content.image_width をデフォルト 760 で追加し、そこでそれを使用し、さらに最大の srcset 候補を引き上げる。Done は、既存のサイトを変更せずに画像が設定幅に従うことを意味する。
索引モデルが issue の本文から書いたものです。
説明
Prerequisites
Proposal
Make the display width of Markdown images configurable, instead of the fixed 760px in modules/blox/layouts/_markup/render-image.html:
{{- $img_md := $img.Fit "760x760 webp" -}}
...
sizes="(max-width: 480px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 80vw, 760px"
For example, a site parameter that sets both the Fit size and the last sizes value, defaulting to 760 so nothing changes for existing sites:
hugoblox:
content:
image_width: 896
It would also help if the largest srcset candidate went up to twice that width (or the original width, whichever is smaller), so images stay sharp on high-density screens.
Motivation and context
On my blog the article column is 896px wide, so every Markdown image (mostly screenshots of profiler output and code) is 136px narrower than the text around it, and small text in the screenshots is harder to read than it needs to be.
Today the only way to change this is to copy the whole render-image.html into the site and edit two lines, then keep that copy in step with every theme update. The template also declares $max_width, $width and $height but always sets them to "", so there is no hook for this either.
- 主要言語
- HTML
- スター
- 9.8k
- フォーク
- 2.9k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
HugoBlox/kit のほかの issue
-
proposal stale
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
Feature request (docs): add an "Accessibility" page documenting HugoBlox's built-in a11y featuresオープンproposal stale
難易度 2/5 半日 初心者へのやさしさ 72/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
-
needs triage
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
-
needs triage
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
似ている issue
-
check:passed streams:remove
難易度 1/5 1時間未満 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 61/100
メンテナーはふだん 1 日以内に返信
-
check:passed logos:add
難易度 1/5 1時間未満 初心者へのやさしさ 79/100
メンテナーはふだん 4 日以内に返信
-
addition
難易度 1/5 1時間未満 初心者へのやさしさ 83/100
jaywcjlove/awesome-mac#4259 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
stacklok/toolhive-catalog#1890 ·
メンテナーはふだん 1 日以内に返信