nuxt.config.ts 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. import { defineNuxtConfig } from 'nuxt';
  2. const description = 'I am a Research Associate at the University of Cambridge, but I also do other things.';
  3. // https://v3.nuxtjs.org/api/configuration/nuxt.config
  4. export default defineNuxtConfig({
  5. app: {
  6. head: {
  7. htmlAttrs: {
  8. lang: 'en'
  9. },
  10. noscript: [
  11. { children: `<div class="noscript">
  12. <center>Hi.</center>
  13. First of all: I am <strong>genuinely</strong> interested to know why you disabled JavaScript
  14. so <a href="/contact">please send me an e-mail</a> — no judgement.<br />
  15. Second: yes, I hate it too, but in this day and age JavaScript is kinda ubiquitous so I caved in.
  16. I am still making an effort but this site may look a bit weird and hardly usable without JS. Sorry…
  17. <noscript><p><img src="https://matomo.morpheu5.net/matomo.php?idsite=1&amp;rec=1" style="border:0;" alt="" /></p></noscript>
  18. </div>`
  19. },
  20. ],
  21. meta: [
  22. { charset: 'utf-8' },
  23. { property: 'author', content: 'Andrea Franceschini' },
  24. { property: 'description', content: description },
  25. { property: 'DC.Creator', content: 'Andrea Franceschini' },
  26. { property: 'DC.Description', content: description },
  27. { property: 'DC.Rights', content: 'CC BY-NC-SA 4.0' },
  28. { property: 'twitter:site', content: '@morpheu5' },
  29. { property: 'twitter:creator', content: '@morpheu5' },
  30. { property: 'twitter:description', content: description },
  31. { property: 'twitter:card', content: 'summary_large_image' },
  32. { property: 'twitter:image:src', content: 'https://andreafranceschini.org/images/colopic.jpg' },
  33. { property: 'twitter:domain', content: 'https://andreafranceschini.org' },
  34. { property: 'og:type', content: 'website' },
  35. { property: 'og:image', content: 'https://andreafranceschini.org/images/colopic.jpg' },
  36. { property: 'og:description', content: description },
  37. { property: 'robots', content: 'All' },
  38. ],
  39. link: [
  40. { rel: 'icon', type: 'image/svg+xml', href: '/images/favicon.svg' },
  41. { rel: 'icon', type: 'image/png', href: '/images/favicon.png' }
  42. ]
  43. },
  44. },
  45. css: [
  46. "~/assets/css/tailwind.css",
  47. '@fortawesome/fontawesome-svg-core/styles.css',
  48. ],
  49. build: {
  50. analyze: true,
  51. transpile: [
  52. 'three'
  53. ],
  54. postcss: {
  55. postcssOptions: {
  56. map: process.dev || false,
  57. plugins: {
  58. 'postcss-import': {},
  59. 'postcss-mixins': {},
  60. 'tailwindcss/nesting': {},
  61. 'tailwindcss': {},
  62. 'autoprefixer': {},
  63. 'postcss-preset-env': {},
  64. 'cssnano': {},
  65. },
  66. }
  67. },
  68. },
  69. modules: [
  70. '@nuxtjs/tailwindcss',
  71. '@nuxtjs/google-fonts',
  72. ['@pinia/nuxt', { autoImports: ['defineStore'] }],
  73. ],
  74. components: true,
  75. telemetry: false,
  76. ssr: true,
  77. sourcemap: process.dev || false,
  78. typescript: {
  79. shim: false,
  80. typeCheck: true,
  81. strict: true,
  82. },
  83. googleFonts: {
  84. families: {
  85. Oswald: {
  86. wght: [400, 600],
  87. },
  88. "Open Sans": {
  89. wght: [400, 700],
  90. },
  91. },
  92. subsets: 'greek',
  93. download: true,
  94. // overwriting: true,
  95. }
  96. })