Add 404 page and robots.txt
This commit is contained in:
parent
6f145aead6
commit
4728ba47e7
6 changed files with 52 additions and 2 deletions
10
custom.d.ts
vendored
10
custom.d.ts
vendored
|
|
@ -45,3 +45,13 @@ declare module '*.pdf' {
|
|||
const content: url;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module '*.txt' {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare module '*.html' {
|
||||
const content: string;
|
||||
export default content;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
"scripts": {
|
||||
"start": "webpack-dev-server --mode development",
|
||||
"lint": "npx eslint --fix \"src/**/*.ts\" && npx prettier --write \"src/**/*.ts\"",
|
||||
"build": "webpack && find dist -type f -regex \".*\\(js\\|css\\|txt\\)\" | xargs rm"
|
||||
"build": "webpack && find dist -type f -regex \".*\\(js\\|css\\|LICENSE.*\\)\" | xargs rm"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import './static/no-change/favicon.ico';
|
||||
import './static/no-change/og-image.jpg';
|
||||
import './static/no-change/robots.txt';
|
||||
import './static/no-change/404.html';
|
||||
|
||||
import './styles.scss';
|
||||
import { create } from './portfolio';
|
||||
|
|
|
|||
36
src/static/no-change/404.html
Normal file
36
src/static/no-change/404.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
|
||||
<title>Not found</title>
|
||||
<meta name="theme-color" content="#b7455e" />
|
||||
<meta name="viewport" content="initial-scale=1.0" />
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #b7455e;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: "Roboto", "Helvetica Neue", sans-serif;
|
||||
font-weight: 100;
|
||||
font-size: 3rem;
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>The requested resource cannot be found.</h1>
|
||||
</body>
|
||||
</html>
|
||||
2
src/static/no-change/robots.txt
Normal file
2
src/static/no-change/robots.txt
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
User-agent: *
|
||||
Allow: /
|
||||
|
|
@ -117,7 +117,7 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
{
|
||||
test: /\.ico$/i,
|
||||
test: /no-change.*(ico|html|txt)$/i,
|
||||
use: {
|
||||
loader: 'file-loader',
|
||||
query: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue