diff --git a/package.json b/package.json index aa643f2..a674921 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,9 @@ "@nuxt/content": "^1.14.0", "@nuxtjs/axios": "^5.13.1", "@nuxtjs/composition-api": "^0.22.4", + "@nuxtjs/redirect-module": "^0.3.1", + "@nuxtjs/robots": "^2.5.0", + "@nuxtjs/sitemap": "^2.4.0", "@nuxtjs/universal-storage": "^0.5.7", "core-js": "^3.10.0", "nuxt": "^2.15.3", diff --git a/settings/Modules.ts b/settings/Modules.ts index 1b0d5b6..39f08e6 100644 --- a/settings/Modules.ts +++ b/settings/Modules.ts @@ -56,9 +56,36 @@ const storage = { }, } +const sitemap = { + path: '/sitemap.xml', + hostname: 'https://arthurdanjou.fr', + cacheTime: 720000, + gzip: true, + generate: false, +} + +const robots = { + UserAgent: '*', + Sitemap: 'https://arthurdanjou.fr/sitemap.xml', + Allow: '*' +} + +const redirect = [ + { from: '/source', to: 'https://github.com/arthurdanjou/artsite' }, + { from: '/twitter', to: 'https://twitter.com/arthurdanj' }, + { from: '/github', to: 'https://github.com/arthurdanjou/' }, + { from: '/shelf', to: '/blog' }, + { from: '/posts', to: '/blog' }, + { from: '/resume', to: '/cv' } +] + export default [ ['@nuxtjs/axios', axios], ['nuxt-i18n', i18n], ['@nuxt/content', content], - ['@nuxtjs/universal-storage', storage] + ['@nuxtjs/universal-storage', storage], + ['@nuxtjs/robots', robots], + ['@nuxtjs/sitemap', sitemap], + ['@nuxtjs/redirect-module', redirect] + ] as NuxtOptionsModule[] diff --git a/yarn.lock b/yarn.lock index 8bf3b53..b3113dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1449,6 +1449,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.5.0": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@nuxtjs/robots/-/robots-2.5.0.tgz#a42b25e3bc58181cb2a8fbd30d6b0fee6c36bc60" + integrity sha512-z1F3HXb05NiZga8Cuq6k5bbowfJOScPtbSOakip0nege+1aI9pGoajzap8eR5s1qwLXAk9Ts+NcgetoUn5lwrQ== + +"@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/universal-storage@^0.5.7": version "0.5.7" resolved "https://registry.yarnpkg.com/@nuxtjs/universal-storage/-/universal-storage-0.5.7.tgz#39b2b2e0afbdb1a8bada3ea3281bfd52ddb827a1" @@ -1658,6 +1683,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.37.tgz#a3dd8da4eb84a996c36e331df98d82abd76b516e" integrity sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw== +"@types/node@^12.0.2": + version "12.20.10" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.10.tgz#4dcb8a85a8f1211acafb88d72fafc7e3d2685583" + integrity sha512-TxCmnSSppKBBOzYzPR2BR25YlX5Oay8z2XGwFBInuA/Co0V9xJhLlW4kjbxKtgeNo3NOMbQP1A5Rc03y+XecPw== + "@types/node@^12.20.5": version "12.20.6" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.6.tgz#7b73cce37352936e628c5ba40326193443cfba25" @@ -1712,6 +1742,13 @@ dependencies: "@types/node" "*" +"@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.9": version "1.13.9" resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.9.tgz#aacf28a85a05ee29a11fb7c3ead935ac56f33e4e" @@ -2251,6 +2288,11 @@ aproba@^1.1.1: resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== +arg@^4.1.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + arg@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.0.tgz#a20e2bb5710e82950a516b3f933fee5ed478be90" @@ -2316,6 +2358,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" @@ -3583,7 +3632,7 @@ connect@^3.7.0: parseurl "~1.3.3" utils-merge "1.0.1" -consola@^2.10.0, consola@^2.15.0, consola@^2.15.3, consola@^2.6.0, consola@^2.9.0: +consola@^2.10.0, consola@^2.13.0, consola@^2.15.0, consola@^2.15.3, consola@^2.6.0, consola@^2.9.0: version "2.15.3" resolved "https://registry.yarnpkg.com/consola/-/consola-2.15.3.tgz#2e11f98d6a4be71ff72e0bdf07bd23e12cb61550" integrity sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw== @@ -5629,6 +5678,11 @@ 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.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== + is-https@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/is-https/-/is-https-3.0.2.tgz#4d24e002e47edd3f1b07f14bc722433354ccba49" @@ -6008,6 +6062,11 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "^3.0.0" +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" @@ -6042,7 +6101,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== @@ -8610,7 +8669,7 @@ sass@^1.32.8: 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== @@ -8837,6 +8896,17 @@ sirv@^1.0.7: mime "^2.3.1" totalist "^1.0.0" +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" @@ -10251,6 +10321,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"