Add 404 page and robots.txt
This commit is contained in:
parent
975f794cdf
commit
f568888077
6 changed files with 53 additions and 3 deletions
10
custom.d.ts
vendored
10
custom.d.ts
vendored
|
|
@ -14,3 +14,13 @@ declare module '*.jpeg' {
|
||||||
const content: ResponsiveImage;
|
const content: ResponsiveImage;
|
||||||
export default content;
|
export default content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare module '*.txt' {
|
||||||
|
const content: string;
|
||||||
|
export default content;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module '*.html' {
|
||||||
|
const content: string;
|
||||||
|
export default content;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "webpack-dev-server --mode development",
|
"start": "webpack-dev-server --mode development",
|
||||||
"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": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
import './index.scss';
|
import './index.scss';
|
||||||
|
import './no-change/404.html';
|
||||||
|
import './no-change/robots.txt';
|
||||||
import { Photos } from './photos';
|
import { Photos } from './photos';
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|
|
||||||
36
src/no-change/404.html
Normal file
36
src/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/no-change/robots.txt
Normal file
2
src/no-change/robots.txt
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
User-agent: *
|
||||||
|
Allow: /
|
||||||
|
|
@ -116,7 +116,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.ico$/i,
|
test: /no-change.*(ico|html|txt)$/i,
|
||||||
use: {
|
use: {
|
||||||
loader: 'file-loader',
|
loader: 'file-loader',
|
||||||
query: {
|
query: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue