diff --git a/config/Head.ts b/config/Head.ts index 7400b0d..15ed03f 100644 --- a/config/Head.ts +++ b/config/Head.ts @@ -2,9 +2,13 @@ export default { meta: [ { charset: 'utf-8' }, { name: 'viewport', content: 'width=device-width, initial-scale=1' }, - { hid: 'description', name: 'description', content: 'Web & Software Developer' } + { hid: 'description', name: 'description', content: 'ArtSite is my personal website build using NuxtJs to create a single point of contact' }, + { hid: 'og:type', name: 'og:type', content: 'website' }, + { hid: 'og:url', name: 'og:url', content: 'https://arthurdanjou.fr' }, + { hid: 'og:title', name: 'og:title', content: 'Arthur Danjou | FullStack Web & Software Developer' }, + { hid: 'og:site_name', name: 'og:site_name', content: 'Arthur Danjou | FullStack Web & Software Developer' }, ], link: [ - { rel: 'icon', type: 'image/png', href: '/favicon.png' } + { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' } ] } diff --git a/config/Redirect.ts b/config/Redirect.ts new file mode 100644 index 0000000..1ae9ea4 --- /dev/null +++ b/config/Redirect.ts @@ -0,0 +1,14 @@ +export default [ + { + from: '^/twitter', + to: 'https://twitter.com/ArthurDanj' + }, + { + from: '^/github', + to: 'https://github.com/ArthurDanjou' + }, + { + from: '^/source', + to: 'https://github.com/ArthurDanjou/artsite' + } +] diff --git a/config/Robots.ts b/config/Robots.ts new file mode 100644 index 0000000..379628d --- /dev/null +++ b/config/Robots.ts @@ -0,0 +1,5 @@ +export default { + UserAgent: '*', + Sitemap: 'https://arthurdanjou.fr/sitemap.xml', + Allow: '*' +} diff --git a/config/SiteMap.ts b/config/SiteMap.ts new file mode 100644 index 0000000..9dd5780 --- /dev/null +++ b/config/SiteMap.ts @@ -0,0 +1,7 @@ +export default { + path: '/sitemap.xml', + hostname: 'https://arthurdanjou.fr', + cacheTime: 720000, + gzip: true, + generate: false, +} diff --git a/config/index.ts b/config/index.ts index 4f79782..8c47227 100644 --- a/config/index.ts +++ b/config/index.ts @@ -4,5 +4,8 @@ import ColorMode from './ColorMode' import Tailwind from './Tailwind' import Translation from './Translation' import Content from './Content' +import Robots from './Robots' +import Redirect from './Redirect' +import SiteMap from "./SiteMap"; -export { Axios, Head, ColorMode, Tailwind, Translation, Content } +export { Axios, Head, ColorMode, Tailwind, Translation, Content, Robots, Redirect, SiteMap } diff --git a/nuxt.config.js b/nuxt.config.js index 810c2c9..cf8fedb 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -1,4 +1,4 @@ -import { Axios, Head, ColorMode, Tailwind, Translation, Content } from './config' +import { Axios, Head, ColorMode, Tailwind, Translation, Content, Robots, Redirect, SiteMap } from './config' export default { head: Head, @@ -27,7 +27,10 @@ export default { modules: [ ['@nuxtjs/axios', Axios], ['nuxt-i18n', Translation], - ['@nuxt/content', Content] + ['@nuxt/content', Content], + ['@nuxtjs/robots', Robots], + ['@nuxtjs/redirect-module', Redirect], + ['@nuxtjs/sitemap', SiteMap] ], buildDir: 'build', diff --git a/package.json b/package.json index 28943d9..dd5fb09 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,9 @@ "@nuxt/content": "^1.11.1", "@nuxt/typescript-runtime": "^2.0.0", "@nuxtjs/axios": "5.12.4", + "@nuxtjs/redirect-module": "^0.3.1", + "@nuxtjs/robots": "^2.4.2", + "@nuxtjs/sitemap": "^2.4.0", "@tailwindcss/typography": "^0.3.1", "nuxt": "^2.14.12", "nuxt-i18n": "^6.16.0", diff --git a/pages/index.vue b/pages/index.vue index d39b390..7861528 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -86,7 +86,7 @@ export default Vue.extend({ components: {HomeLink}, head() { return { - title: 'Arthur Danjou - Web & Software Developer' + title: 'Arthur Danjou - FullStack Web & Software Developer' } }, async asyncData({$content}) { diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..5c2de9d Binary files /dev/null and b/static/favicon.ico differ diff --git a/public/favicon.png b/static/favicon.png similarity index 100% rename from public/favicon.png rename to static/favicon.png diff --git a/yarn.lock b/yarn.lock index ac2919c..af3ffbd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1354,6 +1354,31 @@ dependencies: http-proxy-middleware "^1.0.6" +"@nuxtjs/redirect-module@^0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@nuxtjs/redirect-module/-/redirect-module-0.3.1.tgz#90a6986882337401cb0576cdf9479d4e3b552cce" + integrity sha512-yL2unrYfUSqs+4cUtkQvEQMsuTeCOlQd+Y5sTqMZzWBadF8h01tCVDG95zmOTNIiCupb+sQho2Tixwl1f826aw== + +"@nuxtjs/robots@^2.4.2": + version "2.4.2" + resolved "https://registry.yarnpkg.com/@nuxtjs/robots/-/robots-2.4.2.tgz#9a96c91abb70e39b414eec502ef1cf7d5ef0235e" + integrity sha512-BW3qhvxlPBKlMkZHtARFPeliFraiZHS28G3j4qgRbSfOBtHC0yDX3Dnq1LkQMzAbPfbw6A1L3sdjgBVZZnfFAw== + +"@nuxtjs/sitemap@^2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@nuxtjs/sitemap/-/sitemap-2.4.0.tgz#6a9fa1c35e161f87375d59949d973568cec40614" + integrity sha512-TVgIYOtPp7KAfaUo76WRpGbO20j4D/xi/A7shFIGjARHs+FvfAWXNCtBT87dTwe/RoYzAsEKtijFFUTaSu5bUA== + dependencies: + async-cache "^1.1.0" + consola "^2.13.0" + etag "^1.8.1" + fresh "^0.5.2" + fs-extra "^8.1.0" + is-https "^2.0.2" + lodash.unionby "^4.8.0" + minimatch "^3.0.4" + sitemap "^4.1.1" + "@nuxtjs/tailwindcss@^3.4.0": version "3.4.0" resolved "https://registry.yarnpkg.com/@nuxtjs/tailwindcss/-/tailwindcss-3.4.0.tgz#dc059ce6a823443b7a3847e29237e17dac7b633f" @@ -1569,6 +1594,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.10.tgz#5958a82e41863cfc71f2307b3748e3491ba03785" integrity sha512-J32dgx2hw8vXrSbu4ZlVhn1Nm3GbeCFNw2FWL8S5QKucHGY0cyNwjdQdO+KMBZ4wpmC7KhLCiNsdk1RFRIYUQQ== +"@types/node@^12.0.2": + version "12.19.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" + integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== + "@types/node@^12.19.8": version "12.19.8" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.8.tgz#efd6d1a90525519fc608c9db16c8a78f7693a978" @@ -1616,6 +1646,13 @@ resolved "https://registry.yarnpkg.com/@types/relateurl/-/relateurl-0.2.28.tgz#6bda7db8653fa62643f5ee69e9f69c11a392e3a6" integrity sha1-a9p9uGU/piZD9e5p6facEaOS46Y= +"@types/sax@^1.2.0": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@types/sax/-/sax-1.2.1.tgz#e0248be936ece791a82db1a57f3fb5f7c87e8172" + integrity sha512-dqYdvN7Sbw8QT/0Ci5rhjE4/iCMJEM0Y9rHpCu+gGXD9Lwbz28t6HI2yegsB6BoV1sShRMU6lAmAcgRjmFy7LA== + dependencies: + "@types/node" "*" + "@types/serve-static@*", "@types/serve-static@^1.13.8": version "1.13.8" resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.8.tgz#851129d434433c7082148574ffec263d58309c46" @@ -2112,7 +2149,7 @@ aproba@^1.1.1: resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== -arg@^4.1.0: +arg@^4.1.0, arg@^4.1.1: version "4.1.3" resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== @@ -2197,6 +2234,13 @@ assign-symbols@^1.0.0: resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= +async-cache@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/async-cache/-/async-cache-1.1.0.tgz#4a9a5a89d065ec5d8e5254bd9ee96ba76c532b5a" + integrity sha1-SppaidBl7F2OUlS9nulrp2xTK1o= + dependencies: + lru-cache "^4.0.0" + async-each@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" @@ -3057,7 +3101,7 @@ connect@^3.7.0: parseurl "~1.3.3" utils-merge "1.0.1" -consola@^2.10.0, consola@^2.15.0, consola@^2.6.0, consola@^2.9.0: +consola@^2.10.0, consola@^2.13.0, consola@^2.15.0, consola@^2.6.0, consola@^2.9.0: version "2.15.0" resolved "https://registry.yarnpkg.com/consola/-/consola-2.15.0.tgz#40fc4eefa4d2f8ef2e2806147f056ea207fcc0e9" integrity sha512-vlcSGgdYS26mPf7qNi+dCisbhiyDnrN1zaRbw3CSuc2wGOMEGGPsp46PdRG5gqXwgtJfjxDkxRNAgRPr1B77vQ== @@ -5264,7 +5308,7 @@ is-hexadecimal@^1.0.0: resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7" integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw== -is-https@^2.0.0: +is-https@^2.0.0, is-https@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-https/-/is-https-2.0.2.tgz#7009d303c72580f15897d5c063d6b6bc1f838fef" integrity sha512-UfUCKVQH/6PQRCh5Qk9vNu4feLZiFmV/gr8DjbtJD0IrCRIDTA6E+d/AVFGPulI5tqK5W45fYbn1Nir1O99rFw== @@ -5714,6 +5758,11 @@ lodash.toarray@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz#24c4bfcd6b2fba38bfd0594db1179d8e9b656561" integrity sha1-JMS/zWsvuji/0FlNsRedjptlZWE= +lodash.unionby@^4.8.0: + version "4.8.0" + resolved "https://registry.yarnpkg.com/lodash.unionby/-/lodash.unionby-4.8.0.tgz#883f098ff78f564a727b7508e09cdd539734bb83" + integrity sha1-iD8Jj/ePVkpye3UI4JzdU5c0u4M= + lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" @@ -5746,7 +5795,7 @@ lower-case@^2.0.2: dependencies: tslib "^2.0.3" -lru-cache@^4.1.2: +lru-cache@^4.0.0, lru-cache@^4.1.2: version "4.1.5" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== @@ -8301,7 +8350,7 @@ sass@^1.30.0: dependencies: chokidar ">=2.0.0 <4.0.0" -sax@>=0.6.0, sax@~1.2.4: +sax@>=0.6.0, sax@^1.2.4, sax@~1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== @@ -8520,6 +8569,17 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" +sitemap@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/sitemap/-/sitemap-4.1.1.tgz#c9b459c7d797e629c61f56b86586d4f67dbf250b" + integrity sha512-+8yd66IxyIFEMFkFpVoPuoPwBvdiL7Ap/HS5YD7igqO4phkyTPFIprCAE9NMHehAY5ZGN3MkAze4lDrOAX3sVQ== + dependencies: + "@types/node" "^12.0.2" + "@types/sax" "^1.2.0" + arg "^4.1.1" + sax "^1.2.4" + xmlbuilder "^13.0.0" + slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -9876,6 +9936,11 @@ xml2js@^0.4.23: sax ">=0.6.0" xmlbuilder "~11.0.0" +xmlbuilder@^13.0.0: + version "13.0.2" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-13.0.2.tgz#02ae33614b6a047d1c32b5389c1fdacb2bce47a7" + integrity sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ== + xmlbuilder@~11.0.0: version "11.0.1" resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3"