Coder Social home page Coder Social logo

xdesro / nuxt-netlify-cms-starter Goto Github PK

View Code? Open in Web Editor NEW
69.0 6.0 19.0 318 KB

๐Ÿž A very spartan starter for using Nuxt.js with Netlify CMS.

Home Page: https://nuxt-netlify-cms-starter.netlify.com

Vue 67.10% JavaScript 25.18% HTML 7.71%
template netlify netlify-cms starter nuxt

nuxt-netlify-cms-starter's Introduction

๐Ÿž Nuxt & Netlify CMS Starter

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.

๐ŸŽ‰ Getting Started

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.

Deploy to Netlify

Otherwise, you can follow these steps!

  1. ๐Ÿ‘ฏโ€โ™‚๏ธ Clone the repository locally and cd into the directory.
git clone https://github.com/xdesro/nuxt-netlify-cms-starter

cd nuxt-netlify-cms-starter
  1. ๐Ÿ“ฆ Install dependencies.
yarn install
  1. ๐Ÿ— Run the project for local dev. This will start a hot-reloading server at localhost:3000.
yarn dev
  1. ๐ŸŒŒ 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
  1. โšก๏ธ 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.

๐Ÿ–‹ Activating Netlify CMS

This project comes with Netlify CMS ready to rumble, and a basic blog configuration. To use Netlify CMS:

๐Ÿ” Authenticating with Netlify Identity

  1. Deploy to Netlify at least once.
  2. Go to Settings > Identity, and select Enable Identity service.
  3. 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.
  4. 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.
  5. Scroll down to Services and click Enable Git Gateway.

๐Ÿ” Media configuration

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:

๐Ÿ” Local Setup

  1. In your browser, navigate to localhost:3000/admin.
  2. 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)
  3. Login with the account you created or one of the external providers, if you enabled them.

๐Ÿ’โ€โ™€๏ธ Questions? Concerns?

Feel free to reach out on Twitter. Friendly feedback and advice is always welcome. Contributions doubly so.

nuxt-netlify-cms-starter's People

Contributors

dependabot[bot] avatar irongollem avatar xdesro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nuxt-netlify-cms-starter's Issues

One click netlify template issue [fatal] Nuxt build error No "exports" main resolved in node_modules/@babel/helper-compilation-targets/package.json

I tried this template with the one click deploy, and it fails.

3:32:39 PM: Build ready to start
3:32:41 PM: build-image version: 3571f0130496395a23bffe9820bc78b4f73a6234
3:32:41 PM: build-image tag: v3.7.0
3:32:41 PM: buildbot version: 6a1676e78af2029e1c67c3e7ec0a2784997330d8
3:32:41 PM: Fetching cached dependencies
3:32:41 PM: Failed to fetch cache, continuing with build
3:32:41 PM: Starting to prepare the repo for build
3:32:42 PM: No cached dependencies found. Cloning fresh repo
3:32:42 PM: git clone https://github.com/xdesro/nuxt-netlify-cms-starter
3:32:44 PM: Preparing Git Reference refs/heads/master
3:32:44 PM: Parsing package.json dependencies
3:32:46 PM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'dist' versus 'dist/' in the Netlify UI
3:32:46 PM: Starting build script
3:32:46 PM: Installing dependencies
3:32:46 PM: Python version set to 2.7
3:32:49 PM: v12.18.0 is already installed.
3:32:50 PM: Now using node v12.18.0 (npm v6.14.4)
3:32:50 PM: Started restoring cached build plugins
3:32:50 PM: Finished restoring cached build plugins
3:32:50 PM: Attempting ruby version 2.7.1, read from environment
3:32:53 PM: Using ruby version 2.7.1
3:32:53 PM: Using PHP version 5.6
3:32:53 PM: Started restoring cached yarn cache
3:32:53 PM: Finished restoring cached yarn cache
3:32:53 PM: Installing yarn at version 1.22.4
3:32:53 PM: Installing Yarn!
3:32:53 PM: > Downloading tarball...
3:32:53 PM: [1/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz --> /tmp/yarn.tar.gz.kohYtm2UE3
3:32:53 PM:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
3:32:53 PM:                                  Dload  Upload   Total   Spent    Left  Speed
3:32:54 PM:   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
3:32:54 PM: 100    79  100    79    0     0    255      0 --:--:-- --:--:-- --:--:--   256
3:32:54 PM:   0    93    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
3:32:54 PM: 100    93  100    93    0     0    130      0 --:--:-- --:--:-- --:--:-- 93000
3:32:54 PM: 100   625  100   625    0     0    555      0  0:00:01  0:00:01 --:--:--   555
3:32:55 PM: 100 1215k  100 1215k    0     0   765k      0  0:00:01  0:00:01 --:--:--  765k
3:32:55 PM: [2/2]: https://yarnpkg.com/downloads/1.22.4/yarn-v1.22.4.tar.gz.asc --> /tmp/yarn.tar.gz.kohYtm2UE3.asc
3:32:55 PM: 100    83  100    83    0     0   1402      0 --:--:-- --:--:-- --:--:--  1402
3:32:55 PM: 100    97  100    97    0     0   1097      0 --:--:-- --:--:-- --:--:--  1097
3:32:55 PM:   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
3:32:55 PM: 100   629  100   629    0     0   3235      0 --:--:-- --:--:-- --:--:--  614k
3:32:55 PM: 100  1028  100  1028    0     0   4290      0 --:--:-- --:--:-- --:--:--  4290
3:32:55 PM: > Verifying integrity...
3:32:55 PM: gpg: Signature made Mon 09 Mar 2020 03:52:13 PM UTC using RSA key ID 69475BAA
3:32:55 PM: gpg: Good signature from "Yarn Packaging <[email protected]>"
3:32:55 PM: gpg: WARNING: This key is not certified with a trusted signature!
3:32:55 PM: gpg:          There is no indication that the signature belongs to the owner.
3:32:55 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907  BBB7 1646 B01B 86E5 0310
3:32:55 PM:      Subkey fingerprint: 6D98 490C 6F1A CDDD 448E  4595 4F77 6793 6947 5BAA
3:32:55 PM: > GPG signature looks good
3:32:55 PM: > Extracting to ~/.yarn...
3:32:55 PM: > Adding to $PATH...
3:32:56 PM: > Successfully installed Yarn 1.22.4! Please open another terminal where the `yarn` command will now be available.
3:32:56 PM: Started restoring cached node modules
3:32:56 PM: Finished restoring cached node modules
3:32:57 PM: Installing NPM modules using Yarn version 1.22.4
3:32:57 PM: yarn install v1.22.4
3:32:58 PM: [1/4] Resolving packages...
3:32:59 PM: [2/4] Fetching packages...
3:33:18 PM: info [email protected]: The platform "linux" is incompatible with this module.
3:33:18 PM: info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
3:33:18 PM: info [email protected]: The platform "linux" is incompatible with this module.
3:33:18 PM: info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
3:33:18 PM: [3/4] Linking dependencies...
3:33:18 PM: warning "@nuxtjs/markdownit > [email protected]" has unmet peer dependency "webpack@^4.3.0".
3:33:18 PM: warning " > [email protected]" has unmet peer dependency "eslint@>=3.14.1".
3:33:18 PM: warning " > [email protected]" has unmet peer dependency "eslint@>= 5.0.0".
3:33:25 PM: [4/4] Building fresh packages...
3:33:25 PM: Done in 27.92s.
3:33:25 PM: NPM modules installed using Yarn
3:33:26 PM: Started restoring cached go cache
3:33:26 PM: Finished restoring cached go cache
3:33:26 PM: go version go1.14.4 linux/amd64
3:33:26 PM: go version go1.14.4 linux/amd64
3:33:26 PM: Installing missing commands
3:33:26 PM: Verify run directory
3:33:28 PM: โ€‹
3:33:28 PM: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
3:33:28 PM:   Netlify Build                                                 
3:33:28 PM: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
3:33:28 PM: โ€‹
3:33:28 PM: โฏ Version
3:33:28 PM:   @netlify/build 9.13.2
3:33:28 PM: โ€‹
3:33:28 PM: โฏ Flags
3:33:28 PM:   apiHost: api.netlify.com
3:33:28 PM:   cacheDir: /opt/build/cache
3:33:28 PM:   deployId: 605c9f07392c562ee454075b
3:33:28 PM:   mode: buildbot
3:33:28 PM:   testOpts:
3:33:28 PM:     silentLingeringProcesses: ''
3:33:28 PM: โ€‹
3:33:28 PM: โฏ Current directory
3:33:28 PM:   /opt/build/repo
3:33:28 PM: โ€‹
3:33:28 PM: โฏ Config file
3:33:28 PM:   /opt/build/repo/netlify.toml
3:33:28 PM: โ€‹
3:33:28 PM: โฏ Context
3:33:28 PM:   production
3:33:28 PM: โ€‹
3:33:28 PM: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
3:33:28 PM:   1. build.command from netlify.toml                            
3:33:28 PM: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
3:33:28 PM: โ€‹
3:33:28 PM: $ npm run generate
3:33:28 PM: > [email protected] generate /opt/build/repo
3:33:28 PM: > nuxt generate
3:33:34 PM: [fatal] Nuxt build error
3:33:34 PM:   ERROR in ./.nuxt/client.js
3:33:34 PM:   Module build failed (from ./node_modules/babel-loader/lib/index.js):
3:33:34 PM:   Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main resolved in node_modules/@babel/helper-compilation-targets/package.json
3:33:34 PM:   at applyExports (internal/modules/cjs/loader.js:491:9)
3:33:34 PM:   at resolveExports (internal/modules/cjs/loader.js:507:23)
3:33:34 PM:   at Function.Module._findPath (internal/modules/cjs/loader.js:635:31)
3:33:34 PM:   at Function.Module._resolveFilename (internal/modules/cjs/loader.js:953:27)
3:33:34 PM:   at Function.Module._load (internal/modules/cjs/loader.js:842:27)
3:33:34 PM:   at Module.require (internal/modules/cjs/loader.js:1026:19)
3:33:34 PM:   at require (internal/modules/cjs/helpers.js:72:18)
3:33:34 PM:   at Object.<anonymous> (node_modules/@babel/preset-env/lib/debug.js:8:33)
3:33:34 PM:   at Module._compile (internal/modules/cjs/loader.js:1138:30)
3:33:34 PM:   at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
3:33:34 PM:   at Module.load (internal/modules/cjs/loader.js:986:32)
3:33:34 PM:   at Function.Module._load (internal/modules/cjs/loader.js:879:14)
3:33:34 PM:   at Module.require (internal/modules/cjs/loader.js:1026:19)
3:33:34 PM:   at require (internal/modules/cjs/helpers.js:72:18)
3:33:34 PM:   at Object.<anonymous> (node_modules/@babel/preset-env/lib/index.js:11:14)
3:33:34 PM:   at Module._compile (internal/modules/cjs/loader.js:1138:30)
3:33:34 PM:   @ multi ./.nuxt/client.js app[0]
3:33:35 PM: tput: No value for $TERM and no -T specified
3:33:35 PM: 
3:33:35 PM:    โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
3:33:35 PM:    โ”‚                             โ”‚
3:33:35 PM:    โ”‚   โœ– Nuxt Fatal Error        โ”‚
3:33:35 PM:    โ”‚                             โ”‚
3:33:35 PM:    โ”‚   Error: Nuxt build error   โ”‚
3:33:35 PM:    โ”‚                             โ”‚
3:33:35 PM:    โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
3:33:35 PM: 
3:33:35 PM: npm ERR! code ELIFECYCLE
3:33:35 PM: npm ERR! errno 1
3:33:35 PM: npm ERR! [email protected] generate: `nuxt generate`
3:33:35 PM: npm ERR! Exit status 1
3:33:35 PM: npm ERR!
3:33:35 PM: npm ERR! Failed at the [email protected] generate script.
3:33:35 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
3:33:35 PM: npm ERR! A complete log of this run can be found in:
3:33:35 PM: npm ERR!     /opt/buildhome/.npm/_logs/2021-03-25T14_33_35_211Z-debug.log
3:33:35 PM: โ€‹
3:33:35 PM: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
3:33:35 PM:   "build.command" failed                                        
3:33:35 PM: โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
3:33:35 PM: โ€‹
3:33:35 PM:   Error message
3:33:35 PM:   Command failed with exit code 1: npm run generate
3:33:35 PM: โ€‹
3:33:35 PM:   Error location
3:33:35 PM:   In build.command from netlify.toml:
3:33:35 PM:   npm run generate
3:33:35 PM: โ€‹
3:33:35 PM:   Resolved config
3:33:35 PM:   build:
3:33:35 PM:     command: npm run generate
3:33:35 PM:     commandOrigin: config
3:33:35 PM:     publish: /opt/build/repo/dist
3:33:35 PM: Caching artifacts
3:33:35 PM: Started saving node modules
3:33:35 PM: Finished saving node modules
3:33:35 PM: Started saving build plugins
3:33:35 PM: Finished saving build plugins
3:33:35 PM: Started saving yarn cache
3:33:35 PM: Finished saving yarn cache
3:33:35 PM: Started saving pip cache
3:33:35 PM: Finished saving pip cache
3:33:35 PM: Started saving emacs cask dependencies
3:33:35 PM: Finished saving emacs cask dependencies
3:33:35 PM: Started saving maven dependencies
3:33:35 PM: Finished saving maven dependencies
3:33:35 PM: Started saving boot dependencies
3:33:35 PM: Finished saving boot dependencies
3:33:35 PM: Started saving rust rustup cache
3:33:35 PM: Finished saving rust rustup cache
3:33:35 PM: Started saving go dependencies
3:33:35 PM: Finished saving go dependencies
3:33:39 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
3:33:39 PM: Failing build: Failed to build site
3:33:39 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
3:33:39 PM: Finished processing build request in 57.441539831s

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.