Skip to content

Instantly share code, notes, and snippets.

@ashx3s
Last active November 17, 2021 08:47
Show Gist options
  • Select an option

  • Save ashx3s/c4b8ba37593ae56a34be34a9020eba33 to your computer and use it in GitHub Desktop.

Select an option

Save ashx3s/c4b8ba37593ae56a34be34a9020eba33 to your computer and use it in GitHub Desktop.
Netlify Admin Setup

Netlify Setup

These instructions are for configuring your website from netlify.

Prep

  • Have already set up nuxt and added an admin index.html and config.yml
  • Add the Netlify identity widget to your pages/index.vue file if you already havent
export default {
  head() {
    return {
      script: [{ src: 'https://identity.netlify.com/v1/netlify-identity-widget.js' }],
    };
  },
};
  • Push your repo to github
  • Set up an account on Netlify (this will be your default login on your website as well)
  • Select New site from Git
    • Connect to github
    • Add your project repo
      • **if you cannot access it, click configure the Netlify app on Github
      • From there you can choose to make all your repos available, or just the one that you want to select
  • Now your repo should be added to a netlify project

Set up Identity (Netlify Dashboard)

  • Settings -> Identity -> Enable identity service
    • Then you can set up your registration preference
  • External Provider is not on by default, if you signed up through github, you will need to select that here or set up your account with a password
  • Services
    • Enable Git Gateway

Build and Deploy settings

  • It will select npm run build by default
  • change this to npm run generate
  • Make sure your Publish directory is called dist
  • If you are using a branch other than main, specify that here as well as in your config.yml use main by default

Access Admin Panel

Now you can access your cms admin panel by logging in.

Edit Fields

  • After this stage, experiment with creating different collections in your config.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment