fix: allow robots.txt

This commit is contained in:
eshanized
2024-12-26 21:40:13 +05:30
parent 4cd29993d9
commit 45850bd98d
4 changed files with 76 additions and 4 deletions

View File

@@ -56,6 +56,8 @@
"tailwindcss": "^3.4.1",
"typescript": "^5.5.3",
"typescript-eslint": "^8.3.0",
"vite": "^5.4.2"
"vite": "^5.4.2",
"vite-plugin-sitemap": "^0.7.1",
"vite-plugin-static-copy": "^2.2.0"
}
}

50
pnpm-lock.yaml generated
View File

@@ -72,6 +72,12 @@ importers:
vite:
specifier: ^5.4.2
version: 5.4.11(@types/node@20.17.10)
vite-plugin-sitemap:
specifier: ^0.7.1
version: 0.7.1
vite-plugin-static-copy:
specifier: ^2.2.0
version: 2.2.0(vite@5.4.11(@types/node@20.17.10))
packages:
@@ -883,6 +889,10 @@ packages:
fraction.js@4.3.7:
resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==}
fs-extra@11.2.0:
resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==}
engines: {node: '>=14.14'}
fs-extra@8.1.0:
resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==}
engines: {node: '>=6 <7 || >=8'}
@@ -1041,6 +1051,9 @@ packages:
jsonfile@4.0.0:
resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==}
jsonfile@6.1.0:
resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==}
jszip@3.10.1:
resolution: {integrity: sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==}
@@ -1459,6 +1472,10 @@ packages:
resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==}
engines: {node: '>= 4.0.0'}
universalify@2.0.1:
resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==}
engines: {node: '>= 10.0.0'}
update-browserslist-db@1.1.1:
resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==}
hasBin: true
@@ -1471,6 +1488,15 @@ packages:
util-deprecate@1.0.2:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
vite-plugin-sitemap@0.7.1:
resolution: {integrity: sha512-4NRTkiWytLuAmcikckrLcLl9iYA20+5v6l8XshcOrzxH1WR8H0O3S6sTQYfjMrE8su/LG6Y0cTodvOdcOIxaLw==}
vite-plugin-static-copy@2.2.0:
resolution: {integrity: sha512-ytMrKdR9iWEYHbUxs6x53m+MRl4SJsOSoMu1U1+Pfg0DjPeMlsRVx3RR5jvoonineDquIue83Oq69JvNsFSU5w==}
engines: {node: ^18.0.0 || >=20.0.0}
peerDependencies:
vite: ^5.0.0 || ^6.0.0
vite@5.4.11:
resolution: {integrity: sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==}
engines: {node: ^18.0.0 || >=20.0.0}
@@ -2340,6 +2366,12 @@ snapshots:
fraction.js@4.3.7: {}
fs-extra@11.2.0:
dependencies:
graceful-fs: 4.2.11
jsonfile: 6.1.0
universalify: 2.0.1
fs-extra@8.1.0:
dependencies:
graceful-fs: 4.2.11
@@ -2483,6 +2515,12 @@ snapshots:
optionalDependencies:
graceful-fs: 4.2.11
jsonfile@6.1.0:
dependencies:
universalify: 2.0.1
optionalDependencies:
graceful-fs: 4.2.11
jszip@3.10.1:
dependencies:
lie: 3.3.0
@@ -2899,6 +2937,8 @@ snapshots:
universalify@0.1.2: {}
universalify@2.0.1: {}
update-browserslist-db@1.1.1(browserslist@4.24.3):
dependencies:
browserslist: 4.24.3
@@ -2911,6 +2951,16 @@ snapshots:
util-deprecate@1.0.2: {}
vite-plugin-sitemap@0.7.1: {}
vite-plugin-static-copy@2.2.0(vite@5.4.11(@types/node@20.17.10)):
dependencies:
chokidar: 3.6.0
fast-glob: 3.3.2
fs-extra: 11.2.0
picocolors: 1.1.1
vite: 5.4.11(@types/node@20.17.10)
vite@5.4.11(@types/node@20.17.10):
dependencies:
esbuild: 0.21.5

4
public/robots.txt Normal file
View File

@@ -0,0 +1,4 @@
User-agent: *
Allow: /
Disallow: /404
Sitemap: https://eshanized.github.io/resume/sitemap.xml

View File

@@ -1,11 +1,27 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import sitemapPlugin from 'vite-plugin-sitemap';
import { viteStaticCopy } from 'vite-plugin-static-copy';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
base: '/resume/',
plugins: [
react(),
sitemapPlugin({
hostname: 'https://eshanized.github.io/resume', // Your website's base URL
exclude: ['/404'], // Pages to exclude from the sitemap
}),
viteStaticCopy({
targets: [
{
src: 'public/robots.txt', // Copy the robots.txt from your public folder
dest: './',
},
],
}),
],
base: '/resume/', // Base path for GitHub Pages
optimizeDeps: {
exclude: ['lucide-react'],
exclude: ['lucide-react'], // Exclude lucide-react from pre-bundling
},
});