Gathering detailed insights and metrics for @memo28/vite-plugin-meta
Gathering detailed insights and metrics for @memo28/vite-plugin-meta
Gathering detailed insights and metrics for @memo28/vite-plugin-meta
Gathering detailed insights and metrics for @memo28/vite-plugin-meta
npm install @memo28/vite-plugin-meta
Typescript
Module System
Node Version
NPM Version
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
1
@memo28/vite-plugin-mete
Generate and formulate meta
tags through configuration and add them to the page
1<!-- You need to add a line of the same comment, and the plug-in will replace the generated tag tag tag with this line of comment --> 2<!DOCTYPE html> 3 <html lang="en"> 4 5 <head> 6 <meta charset="UTF-8" /> 7 <link rel="icon" type="image/svg+xml" href="/vite.svg" /> 8 <meta name="viewport" content="width=device-width, initial-scale=9.0" /> 9 <meta name="renderer" content="ie-comp"> 10 11 <!-- @memo28/vite-plugin-mete --> 12 <title>Vite + Vue + TS</title> 13 </head> 14 15 <body> 16 <div id="app"></div> 17 <script type="module" src="/src/main.ts"></script> 18 </body> 19 20</html>
1// vite.config.ts
2import { defineConfig } from 'vite'
3import vitePluginMetes from 'vite-plugin-meta'
4
5export default defineConfig({
6 plugins: [vitePluginMetes({
7 ...opts
8 })]
9})
10
11// or
12
13import { Engine } from '@memo28/vitebuild'
14import { defineConfig } from 'vite'
15
16const config = new Engine().setTechnologyStack('vue').addPlugins(
17 (plugin) => {
18 // Add additional plug-in configuration
19 plugin.addHTMLMeta({
20 // Jump to the url configuration every 5 seconds after the page is loaded
21 // refreshJump: {
22 // timeout: 5,
23 // url: "https://www.baidu.com"
24 // }
25 })
26 }
27).getBuildConfig({
28 plugins: []
29})
30
31export default defineConfig({
32 ...config
33})
refreshJump
Refresh jump
1const config = new Engine().setTechnologyStack('vue').addPlugins(
2 (plugin) => {
3 // 添加额外插件配置
4 plugin.addHTMLMeta({
5 // 页面加载后间隔5秒跳转至url配置处
6 refreshJump: {
7 timeout: 5,
8 url: "https://www.baidu.com"
9 }
10 })
11 }
12).getBuildConfig()
xDnsPrefetchControl
Generally speaking, the a
tag in the HTML
page will automatically enable DNS pre-resolution to improve website performance, but it is invalid in websites using the https
protocol. We can set: to turn on the' dns' pre-resolution of the a
tag
1const config = new Engine().setTechnologyStack('vue').addPlugins(
2 (plugin) => {
3 // 添加额外插件配置
4 plugin.addHTMLMeta({
5 xDnsPrefetchControl: true
6 })
7 }
8).getBuildConfig()
author
Used to indicate the name of the author of the page, such as an organization or institution
1const config = new Engine().setTechnologyStack('vue').addPlugins(
2(plugin) => {
3 // 添加额外插件配置
4 plugin.addHTMLMeta({
5 author: '@memo28'
6 })
7}
8).getBuildConfig()
keywords
The keywords related to the page content are separated by commas. Some search engines will use these keywords to classify documents when they encounter these keywords. Take headlines and taobao
as examples
1const config = new Engine().setTechnologyStack('vue').addPlugins(
2(plugin) => {
3 // 添加额外插件配置
4 plugin.addHTMLMeta({
5 keywords: 'javascript,typescript'
6 })
7}
8).getBuildConfig()
tencentQq
Tencent qq related
forcedVerticalScreen
Forced vertical screen
1const config = new Engine().setTechnologyStack('vue').addPlugins(
2(plugin) => {
3 // 添加额外插件配置
4 plugin.addHTMLMeta({
5 tencentQq: {
6 forcedVerticalScreen: true
7 }
8 })
9}
10).getBuildConfig()
fullscreen
Force full screen
1const config = new Engine().setTechnologyStack('vue').addPlugins(
2(plugin) => {
3 // 添加额外插件配置
4 plugin.addHTMLMeta({
5 tencentQq: {
6 fullscreen: true
7 }
8 })
9}
10).getBuildConfig()
appMode
QQ application mode
1const config = new Engine().setTechnologyStack('vue').addPlugins(
2(plugin) => {
3 // 添加额外插件配置
4 plugin.addHTMLMeta({
5 tencentQq: {
6 appMode: true
7 }
8 })
9}
10).getBuildConfig()
apple
Apple related
appleItunesApp
An app banner is displayed at the top of the page to provide app store download
1const config = new Engine().setTechnologyStack('vue').addPlugins(
2 (plugin) => {
3 // 添加额外插件配置
4 plugin.addHTMLMeta({
5 apple: {
6 appleItunesApp: {
7 appId: '',
8 affiliateId: '',
9 someText: '',
10 }
11 }
12 })
13 }
14).getBuildConfig()
appleTitle
Title added to the main screen
1const config = new Engine().setTechnologyStack('vue').addPlugins(
2 (plugin) => {
3 // 添加额外插件配置
4 plugin.addHTMLMeta({
5 apple: {
6 appleTitle: ""
7 }
8 })
9 }
10).getBuildConfig()
No vulnerabilities found.
No security vulnerabilities found.