Overview

I tried out Nuxt 3 and Decap CMS, so here are my notes.

https://decapcms.org/

Preparing the Nuxt 3 Project

I referred to the following for adding Decap CMS to an existing site.

https://decapcms.org/docs/add-to-your-site/

First, prepare a Nuxt 3 project that includes the nuxt/content module.

Here is an example of the source code.

https://github.com/nakamura196/nuxt3-decapcms

The following two files were created.

#l#pbmpcouaeuowcTbcnbdbl-hahlkarilleliiemaaienlffcsfn_ssnen_ccaaoorlibhd:cf_tmblreue----ual_:hofieedmaglscimg:loo:leat:d{{{{iknoidln:rtesneedtmeds':::':llllgne-are:b'{aaaads:gi:rlB''t{bbbbt:han:olcfryeeeehoetpgooruelllletude#u/'gnoea::::rliwbi'tnrdudtaBlmet}''''eeoyrignm}TPDBf*racta-iueoanin//t{tbsduoacibt{llcyltlhmlemeir't*_goro'si,wtg'n,hppboo'ttnrerhnDiaoku}aaomxifp}mtneynld-ee':doa{:',sewt{,'ened'nbrtatnaoveyiamdedo}tmeyrp}le:'t-e:,pi{''oo{,'dwrnsdeitalwasdluitcg;gdere}g'itd}e,p:e'ttf:wi'aiomu'dnalsg'rtte,ksrtdi:wotniwog'dn'dg'maea}tt}se:ttei'rms)et'ri}ng'}
<<!h/Dt<<hOmh/b/tCle<<<<<ho<<bmT>ammt!sed!solYdeei-cay-cd>P>ttt-rd>-ryEaali>i>eIpIphcn>ntntthaCccmamolslslrenurur>s=tdcdce"ee=e=tvn""=itthth"ehthtuwMetettpappfonssss-rac:c:8tgr/r/""ei/i/rpipuc<tdtno/epnttntktihthgetaia.nltttcteyo=>e.bm"nnu/waeidibtledlldcteisahsfp=yt-dN.hceecemvtosilmp@ci/a^efvg3-y1e.w/0iIna.dden0tetd/hnld,tipiifositywtny-e/iirdtodseinecanDalttep-hic-sitaccsypma-slpwC.eaiMj=gdSs1eg"..e>0t<"./jssc"r>i<p/ts>cript>

Then, it was pushed to GitHub.

Configuration on Netlify

Access the following and log in.

https://app.netlify.com/

Select the repository that was just pushed to GitHub and deploy it.

At this point, the Build command and Publish directory were changed.

As a result, it was deployed to the following.

https://nuxt3-decapcms.netlify.app

Enable Identity and Git Gateway

Referring to the following, additional configuration is performed on Netlify.

https://decapcms.org/docs/add-to-your-site/#enable-identity-and-git-gateway

First, enable the Identity service from Settings > Identity.

Next, configure Registration preferences and External providers as needed.

Finally, enable Git Gateway.

Then, accessing the following allowed me to log in.

https://nuxt3-decapcms.netlify.app/admin/#/

Content is added as follows.

As a result, a markdown file was created in the GitHub repository as shown below.

Furthermore, a page was added as follows.

https://nuxt3-decapcms.netlify.app/blog

Trying the CMS in a Local Environment

The following documentation was available.

https://decapcms.org/docs/beta-features/#working-with-a-local-git-repository

#lboawccnhakaelemn_nebd:ua:scgikinetgn-dgt:ahteterwduaeeyfaultproxyserverport

As shown above, set local_backend: true and then run the following.

npxdecap-server

As a result, accessing the following URL displays a login button, and after logging in, the editing screen is displayed.

http://localhost:3000/admin/#/

Summary

Some explanations may be lacking, but I hope this serves as a useful reference when using Decap CMS.