Skip to content

Commit 61035ac

Browse files
trsoliuclaude
andcommitted
fix(docs): use Mintlify head config to inject zoom lock on hosted site
The JS file approach doesn't work — Mintlify treats JS files as content, not executable scripts. Instead use the official docs.json "head" config to inject viewport meta, touch-action CSS, and zoom lock script directly into <head> on Mintlify Cloud hosted pages (ccb.agent-aura.top). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d975721 commit 61035ac

2 files changed

Lines changed: 17 additions & 79 deletions

File tree

docs.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,5 +131,22 @@
131131
"source": "/docs/introduction",
132132
"destination": "/docs/introduction/what-is-claude-code"
133133
}
134+
],
135+
"head": [
136+
{
137+
"tag": "meta",
138+
"attributes": {
139+
"name": "viewport",
140+
"content": "width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, viewport-fit=cover"
141+
}
142+
},
143+
{
144+
"tag": "style",
145+
"children": "html,body,html *{touch-action:pan-x pan-y!important;-ms-touch-action:pan-x pan-y!important;}"
146+
},
147+
{
148+
"tag": "script",
149+
"children": "(function(){var V='width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, viewport-fit=cover';function lockAll(){var ms=document.querySelectorAll('meta[name=viewport]');for(var i=0;i<ms.length;i++){if(ms[i].getAttribute('content')!==V){ms[i].setAttribute('content',V);}}}lockAll();var h=document.head||document.getElementsByTagName('head')[0];if(h&&typeof MutationObserver!=='undefined'){new MutationObserver(function(){lockAll();}).observe(h,{childList:true,subtree:true,attributes:true,attributeFilter:['content']});}var n=function(e){e.preventDefault();};document.addEventListener('gesturestart',n,{passive:false});document.addEventListener('gesturechange',n,{passive:false});document.addEventListener('gestureend',n,{passive:false});document.addEventListener('touchmove',function(e){if(e.touches.length>1){e.preventDefault();}},{passive:false});var t=0;document.addEventListener('touchend',function(e){var now=Date.now();if(now-t<300){e.preventDefault();}t=now;},{passive:false});})();"
150+
}
134151
]
135152
}

docs/disable-zoom.js

Lines changed: 0 additions & 79 deletions
This file was deleted.

0 commit comments

Comments
 (0)