Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
925a0f4
perf(docs): core web vitals fixes — self-host fonts, drop dead assets…
dhananjay6561 Aug 7, 2026
0d8d037
perf(docs): add source maps, Trusted Types (report-only), and asset/f…
dhananjay6561 Aug 7, 2026
516b4a9
fix(docs): guard Meta Pixel bootstrap against duplicate idle scheduling
dhananjay6561 Aug 7, 2026
929ad47
perf(docs): convert used GIFs to MP4 video (D3, LCP)
dhananjay6561 Aug 7, 2026
0a7cb8d
fix(ci): satisfy prettier and Vale on the MP4 video markup
dhananjay6561 Aug 7, 2026
3ab5e8d
perf(docs): stamp width/height on raw <img> tags for CLS (D5)
dhananjay6561 Aug 7, 2026
9308909
fix(pixel): bootstrap immediately on first SPA nav to avoid dropped P…
dhananjay6561 Aug 10, 2026
97390d3
docs(remark): note sizeCache is per-process (dev restart to pick up r…
dhananjay6561 Aug 10, 2026
e704979
ci(asset-budget): drop redundant shallow fetch; add avif to image bud…
dhananjay6561 Aug 10, 2026
6369986
perf(docs): add video posters + preload/self-host DM Sans (CLS/LCP)
dhananjay6561 Aug 15, 2026
39de4be
perf(docs): idle-defer all analytics to cut mobile LCP (4.0s -> 2.9s)
dhananjay6561 Aug 15, 2026
2a021ed
perf(docs): remove Hotjar, interaction-gate Clarity+Apollo (mobile 79…
dhananjay6561 Aug 17, 2026
caaea75
perf(docs): fire GA + Meta Pixel eagerly (accuracy over LCP)
dhananjay6561 Aug 17, 2026
dcf5783
fix(docs): address review iteration 3 (verified findings)
dhananjay6561 Aug 18, 2026
c6c5ed4
fix(docs): aria-hidden the GSoC guide's decorative SVGs (D9/X4)
dhananjay6561 Aug 20, 2026
5dd24f5
ci(docs): catch renamed assets and unresolved /docs src refs (X1)
dhananjay6561 Aug 20, 2026
13827a1
ci(docs): remove Vale doc linter
dhananjay6561 Aug 21, 2026
048a55f
ci(docs): guard poster= refs and scope asset check to D3
dhananjay6561 Aug 21, 2026
094500c
chore(assets): convert docs images to webp
dhananjay6561 Aug 27, 2026
7236c84
perf(docs): serve images from S3 as webp with intrinsic dimensions
dhananjay6561 Aug 27, 2026
cac0fc6
fix(docs): repair case-collision-corrupted openhospital screenshots
dhananjay6561 Aug 28, 2026
26509a2
fix(docs): point openhospital screenshots at their uploaded S3 path
dhananjay6561 Aug 28, 2026
8c0685a
Merge remote-tracking branch 'origin/main' into perf/web-vitals-docs
dhananjay6561 Sep 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
87 changes: 87 additions & 0 deletions .github/workflows/asset-budget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Asset & Font Budget

# Guardrails from the web-quality plan:
# X1 - no committed image > 500 KB
# X3 - no new render-blocking external font stylesheets (self-host instead)
#
# Both checks are scoped to the files CHANGED in the PR (diff against the base
# branch), so pre-existing large assets (e.g. GIFs still awaiting MP4/WebM
# conversion) never fail an unrelated PR — only newly added/modified files are
# held to the budget.

on:
pull_request:
branches: ["main"]

jobs:
asset-budget:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: New/changed images must be under 500 KB (X1)
run: |
# checkout ran with fetch-depth: 0, so origin/<base> is already present
# with full ancestry for the three-dot merge-base below.
base="origin/${{ github.base_ref }}"
max=512000 # 500 KiB
fail=0
while IFS= read -r f; do
[ -z "$f" ] && continue
[ -f "$f" ] || continue # skip deletions
size=$(wc -c < "$f")
if [ "$size" -gt "$max" ]; then
echo "::error file=$f::$f is $((size / 1024)) KB (> 500 KB). Optimize (WebP/AVIF) or convert to video before committing."
fail=1
fi
done < <(git diff --name-only --diff-filter=AMR "$base"...HEAD | grep -iE '\.(png|jpe?g|gif|webp|avif|svg)$' || true)
# AMR, not AM: a rename (R) that also re-encodes the file larger would
# otherwise slip the budget entirely, since git reports it as R.
if [ "$fail" -eq 0 ]; then echo "All new/changed images are within the 500 KB budget."; fi
exit "$fail"

- name: Block new render-blocking font stylesheets (X3)
run: |
base="origin/${{ github.base_ref }}"
# Match the actual render-blocking stylesheet URL (…googleapis.com/css…),
# not prose mentions of the domain, to avoid false positives on comments.
added=$(git diff --diff-filter=AMR "$base"...HEAD -- '*.js' '*.jsx' '*.ts' '*.tsx' '*.json' '*.md' '*.mdx' '*.html' '*.css' \
| grep -E '^\+' | grep -E 'fonts\.googleapis\.com/css' || true)
if [ -n "$added" ]; then
echo "::error::New external Google Fonts reference detected. Self-host the font (src/fonts/*.woff2 + @font-face in src/css/custom.css) instead of a render-blocking <link>:"
echo "$added"
exit 1
fi
echo "No new external font stylesheets."

- name: New local asset references in markdown must resolve (D3)
run: |
base="origin/${{ github.base_ref }}"
# Docusaurus serves static/ at baseUrl /docs/, so an added
# src|poster="/docs/<p>" must have a file at static/<p>. onBrokenLinks
# only validates links, not <img>/<video>/<source> src or <video>
# poster, so this guards that every ADDED reference resolves. Both
# attributes are checked: every converted <video> adds a src AND a
# poster, so omitting poster would leave half of D3's refs unguarded.
#
# Scope note: this is the D3 (added-reference) direction only. The
# mirror D2 direction — a deletion breaking a pre-existing reference —
# is deliberately not guarded here: such references sit on unchanged
# lines (invisible to the diff), and a whole-tree scan would
# false-positive on non-rendering commented-out mentions that predate
# the asset cleanups (e.g. `[//]: #` lines still naming removed GIFs).
fail=0
while IFS= read -r rel; do
[ -z "$rel" ] && continue
if [ ! -f "static/$rel" ]; then
echo "::error::Added asset reference /docs/$rel does not resolve to static/$rel"
fail=1
fi
done < <(git diff --diff-filter=AMR "$base"...HEAD -- '*.md' '*.mdx' '*.js' '*.jsx' '*.ts' '*.tsx' '*.html' \
| grep -E '^\+' | grep -oE '(src|poster)="/docs/[^"]+"' \
| sed -E 's#^(src|poster)="/docs/##; s#"$##' | sort -u || true)
if [ "$fail" -eq 0 ]; then echo "All new /docs/ asset references resolve under static/."; fi
exit "$fail"
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
dist-id: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }}
invalidation: /docs*
delete-removed: true
cache: "public, max-age:86400"
cache: "public, max-age=86400"
private: true

- name: Submit docs URLs to IndexNow
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/vale-lint-action.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .vale.ini

This file was deleted.

2 changes: 1 addition & 1 deletion docs/gsoc/contribution-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Google pays the students, not the organizations they work with. Beginning in 202

You can read more about the format of the program and its goals [here](https://google.github.io/gsocguides/mentor/).

<img src="/img/gsoc-banner.png"/>
<img src="https://keploy-devrel.s3.us-west-2.amazonaws.com/docs/webp-s3/img/gsoc-banner.webp" width="1920" height="1080" />

## Keploy X GSoC

Expand Down
Loading
Loading