我的 Github 页面站点有一个 404 错误页面,它依赖于外部 CSS 和图像,如下所示:
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>404 Error - Page not found</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@800&display=swap" rel="stylesheet">
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel='stylesheet' href='./site.css'>
<link rel="icon" href="./images/icons/icon.ico">
</head>
当 URL 仅包含一个路径名时,它在我的 GitHub 页面站点上工作得很好。例如:

我的目录结构是这样的:
root.
│ 404.html
│ index.html
│ site.css
│
├───images
│ │ file1.png
│ │ file2.png
│ │ file3.jpg
│ │ file4.png
│ │ file5.jpg
│ │
│ └───icons
│ file6.png
│ file7.ico
│ file8.png
│ file9.png
│ file10.png
│
This is all that's important
非常感谢任何帮助!
