[Next.js] Override the Default Next.js Document
JS The Default Document Next override
2023-09-14 09:00:45 时间
The Document is like the top level HTML structure of your Next.js application. You can use document to change the default language, set favicon;
Because Document only render on Server side, so it doesn't support event such as onClick....
pages/_document.txs
import { Html, Head, Main, NextScript } from "next/document";
export default function Document() {
return (
<Html lang="en">
<Head>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22" />
</Head>
<body>
<Main />
<NextScript />
</body>
</Html>
)
}
相关文章
- 使用 Dapr JS SDK 让 Nest.js 集成 Dapr(微软开源的分布式应用程序运行时)
- 【说站】js原型链继承的关系
- js正则使用变量_js正则表达式语法大全
- Mysql 1290 - The MySQL server is running with the --secure-file-priv option
- JS逆向之浏览器补环境详解
- JS手撕(四) call、apply、bind、柯里化、偏函数
- JS控制SVG缩放+鼠标控制事件
- 重学JS-2-数据类型和变量
- ORA-48485: The file exceeds the maximum length [string] ORACLE 报错 故障修复 远程处理
- ORA-48928: The predicate exceeds the max limit string ORACLE 报错 故障修复 远程处理
- ORA-55567: The _highthreshold_undoretention value should be at least string based on the current undo retention settings. ORACLE 报错 故障修复 远程处理
- ORA-55568: The maximum query length (mql) value should be atmost string based on the current _highthreshold_undoretention setting. ORACLE 报错 故障修复 远程处理
- js实现md5加密详解编程语言
- js数组去重详解编程语言
- Exploring the versatility of Linux: The significance of the var directory(linux系统var)
- 使用JS操作Oracle数据库探索潜在可能性(js和oracle数据库)
- 疯掉了,尽然有js写的操作系统
- 用js实现上传图片前的预览(TX的面试题)
- js限制文本框为整数和货币的函数代码
- js函数的引用,关于内存的开销
- js关闭子窗体刷新父窗体实现方法
- 引用外部js乱码问题分析及解决方案
- 使用js在页面中绘制表格核心代码
- JS将所有对象s的属性复制给对象r(原生js+jquery)
- js中一维数组和二位数组中的几个问题示例说明