Open treagod opened 4 years ago
Tried to reproduce by using Browerstack.
It looks good on:
That's strange. I made a screenshot, don't know if that helps or if I can do anything else.
@billyyyyy3320
In the source code, the following meta tags are present:
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
However, when the site is loaded they are removed. If you "inspect" you will see that these 2 tags disappear.
I did the test here (Android + Firefox), and the site loads normally with the mobile layout, but after a few seconds it changes to the desktop version.
Basically same issue here.
When I inspect the site on Firefox 82.1.3 on Android it rendered normally with the mobile layout on first load, then turned to desktop layout instantly.
For now, as @ktquez said, I add these two tags in docs/.vuepress/config.js
same as injecting extra tags to <head>
which can fix this temporarily.
However, these two tags also disappears after I try inspecting the site with latest Chrome on Android. So I guess that it's just new Firefox's (after Daylight update) default viewport setting that differs from Chrome which causes this issue.
When it comes to the disappearance of these two tags, I'm pretty sure its the problem VuePress has with its own since it also occurs on the clean site inited by npx create-vuepress-site
.
Found the cause of the problem:
In @vuepress/core/lib/client/root-mixins/updateMeta.js
, it removes all meta nodes in head then injects newMetaTags
.
So these two meta nodes are removed by the filter since newMetaTags
doesn't have them:
BTW the <meta name="generator" content="VuePress 1.7.1">
is also removed just in case.
A long time has passed and there is still no fix? This issue reduces SEO.
I early reported this issue in #2369 PR #2333 try to fix it, but it doesn't been merged and keep open
Bug report
When using the Firefox browser on Android my Vuepress application does not look friendly. It looks exactly like the desktop version
Steps to reproduce
Visit Vuepress Website or visit your own generated Vuepress application (
yarn create vuepress
) via Firefox Mobile (it also affects Firefox Desktop with developer mobile view activated)What is expected?
See a mobile view of the vuepress application, i.e. a mobile navigation with hamburger icon.
What is actually happening?
See the desktop view without a hamburger icon and all navigation links still visible. Also the content is very small on the sccreen.
Other relevant information