Git Product home page Git Product logo

nuxt3-microcms-blog's Introduction

Nuxt3-microCMS Blog Template

デモサイト

Nuxt3 + microCMS + Vuetify3で作られたブログテンプレートです。

Use this templateから自分のリポジトリを作って利用します。

Functions

  • Nuxt3
  • MicroCMS
  • Vuetify3
  • SSR
  • Volar
  • TypeScript
  • Prettier/Eslint
  • Husky
  • GA4
  • OGP

How to use

1. Use this template

  • このリポジトリのページ上にあるUse this templateをクリック
  • repository name, description, Public/Privateを設定
  • Create repository from templateをクリック

2. Setup microCMS

サービス名 サービスID
任意 任意
API名 エンドポイント APIの型 インポートファイル
任意(例:サイト情報) base-info オブジェクト形式 api-base-info.json
任意(例:ブログ) blog リスト形式 api-blog.json
  • 前手順で作成したAPIスキーマに従ってサイト情報やブログコンテンツを作成

3. Environment variables (local environment)

  • .env.templateをコピーし、.envを作成
  • BASE_URLを上記の手順で作成したmicroCMSのサービスIDに、API_KEYをAPIキーに設定

4. Install packages

パッケージをインストール

yarn install

5. Development

ローカル環境での動作確認

yarn dev

6. Production

本番モードでの動作確認

yarn build

7. Environment variables (server environment)

Netfilyでの環境変数の設定

  • NetlifyのDeploy設定のEnvironment variablesセクションに手順3と同様の環境変数を設定
key value
BASE_URL [サービスID]
API_KEY [APIキー]

8. Deploy

  • Githubのリポジトリに更新があると自動的にNetlifyにデプロイ

9. Google Analytics

Optional

  • Google Analyticsの管理画面でGA4を設定
  • 上記で設定したGA4のIDを環境変数GTAGに設定

nuxt3-microcms-blog's People

Contributors

kawa-work avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nuxt3-microcms-blog's Issues

There is no active component instance when onServerPrefetch is called

Problem

The following error is displayed in server console.

[Vue warn]: onServerPrefetch is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.

画面幅が一定以下でドロワーメニューのオープンアイコンを表示

問題

レイアウトの都合上、一定の画面幅以下でドロワーメニューを非表示にしているために、当該の画面幅でグロナビを利用できない

解決法

一定の画面幅以下でドロワーメニューのオープンアイコンを表示する。
もしくはグロナビをアイコンで表現したヘッダーを作ってもよい。
または、その両方

READMEのNetlifyとの連携方法の説明の拡充

現在READMEのNetlifyとの連携方法が簡素なものとなっているので、初心者でも使えるようにわかりやすい説明を追加、もしくは外部ブログのリンクを載せる。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.