kuizuo / blog

A Blog on Customizing Docusaurus
https://kuizuo.cn
MIT License
264 stars 150 forks source link

大佬问一下这个是在哪里实现的啊 #154

Closed onewhitethreee closed 2 years ago

onewhitethreee commented 2 years ago

kuizuo commented 2 years ago

这个技术叫PWA(渐进式 Web [应用),在这里主要由插件@docusaurus/plugin-pwa提供的,可点击这里查看完整代码

    [
      '@docusaurus/plugin-pwa',
      {
        debug: true,
        offlineModeActivationStrategies: ['appInstalled', 'standalone', 'queryString'],
        pwaHead: [
          {
            tagName: 'link',
            rel: 'icon',
            href: '/img/logo.png',
          },
          {
            tagName: 'link',
            rel: 'manifest',
            href: '/manifest.json',
          },
          {
            tagName: 'meta',
            name: 'theme-color',
            content: 'rgb(51 139 255)',
          },
        ],
      },
    ],
onewhitethreee commented 2 years ago

又学到一个新技术,谢谢大佬