A lot of the starter repos for Nuxt x Netlify CMS use a module like nuxtent
or nuxtdown
to manage flat file content. This project is meant to be a solution for those who don't mind doing a little more configuration to not have to rely on these dependencies.
The quickest way to get started is with Netlify's hyper-convenient one-click Deploy To Netlify, which will automatically create an instance of this project on your GitHub account and deploy it instantly to Netlify.
Otherwise, you can follow these steps!
- π―ββοΈ Clone the repository locally and cd into the directory.
git clone https://github.com/xdesro/nuxt-netlify-cms-starter
cd nuxt-netlify-cms-starter
- π¦ Install dependencies.
yarn install
- π Run the project for local dev. This will start a hot-reloading server at
localhost:3000
.
yarn dev
- π Build the app for server-side rendered deployment. See more about Universal SSR in the Nuxt.js docs.
yarn build
# And to serve that deployment...
yarn start
- β‘οΈ Generate a fully pre-rendered static site. See more in the docs.
yarn generate
This project was bootstrapped with
create-nuxt-app
. There are more detailed explanations of how everything works in the Nuxt.js docs.
This project comes with Netlify CMS ready to rumble, and a basic blog configuration. To use Netlify CMS:
- Deploy to Netlify at least once.
- Go to Settings > Identity, and select Enable Identity service.
- Once enabled, select Settings and usage, and scroll down to Registration preferences. You can set this to either Open or Invite only, but usually Invite only is your best bet for a personal site.
- If you don't want to create an account, or would like to use an external provider such as GitHub or Google, you can enable those services under External providers.
- Scroll down to Services and click Enable Git Gateway.
The default configuration expects you to run on Netlify's Large Media, which uses Git LFS. To configure this yourself read up on it here:
- documentation or directly set it up by following these steps
- In your browser, navigate to
localhost:3000/admin
. - Enter the Netlify URL of your site when prompted. (when using a different domainname host, use be sure to use the URL as provided by Netlify, not your domain host)
- Login with the account you created or one of the external providers, if you enabled them.
Feel free to reach out on Twitter. Friendly feedback and advice is always welcome. Contributions doubly so.