リモートで働くプログラマーの検索結果

リモ太がググったことの覚書

Nuxtプロジェクトにwebフォントを利用する

公式のFAQに書いてある通り グローバルな設定と個別な設定方法が書いてあるが今回はグローバルな設定方法を試す

ja.nuxtjs.org

試しにgoogleフォントのLemonadaを導入する

fonts.google.com

nuxtl.config.tsのheadのリンクに追記

export default {
  mode: 'spa',
  /*
   ** Headers of the page
   */
  head: {
    title: 'sample',
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      {
        hid: 'description',
        name: 'description',
        content: 'sample'
      }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
      {
        rel: 'stylesheet',
        href:
          'https://fonts.googleapis.com/css2?family=Lemonada:wght@500&display=swap'
      } // 追加
    ]
  },
// 以下略