Code Monkey home page Code Monkey logo

hexo-boilerplate-netlify-cms's Introduction

title
README

hexo-boilerplate-netlify-cms

Netlify GitHub Contributor Covenant

Hexo boilerplate integrated with Netlify CMS, powered by Demo Macro.

Deploy to Netlify

Manual start

Fork on Github

More info: Hexo Documentation

Deploy to Netlify

More info: A Step-by-Step Guide: Hexo on Netlify

Enable Identity and Git Gateway

Netlify's Identity and Git Gateway services allow you to manage CMS admin users for your site without requiring them to have an account with your Git host or commit access on your repo. From your site dashboard on Netlify:

  1. Go to Settings > Identity, and select Enable Identity service.
  2. Under Registration preferences, select Open or Invite only. In most cases, you want only invited users to access your CMS, but if you're just experimenting, you can leave it open for convenience.
  3. If you'd like to allow one-click login with services like Google and GitHub, check the boxes next to the services you'd like to use, under External providers.
  4. Scroll down to Services > Git Gateway, and click Enable Git Gateway. This authenticates with your Git host and generates an API access token. In this case, we're leaving the Roles field blank, which means any logged in user may access the CMS.

More info: Git Gateway

Add the Netlify Identity Widget

You will need to add it to the <head> of your CMS index page at /admin/index.html and to the <head> of the main index page of your website. We can use Netlify's script injection feature to include this script in your website.

<!-- Include the script that enables Netlify Identity on this page. -->
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>

Using Netlify's script injection feature, add the following script to the main index page of your website before the close body tag.

<script>
  if (window.netlifyIdentity) {
    window.netlifyIdentity.on("init", (user) => {
      if (!user) {
        window.netlifyIdentity.on("login", () => {
          document.location.href = "/admin/";
        });
      }
    });
  }
</script>

Congratulations

You can now manage the content of your website at https://yoursite.netlify.com/admin/.

License

MIT © Demo Macro

hexo-boilerplate-netlify-cms's People

Contributors

demomacro avatar dependabot[bot] avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

hexo-boilerplate-netlify-cms's Issues

lockfile is incompatible with netlify version of pnpm

I have got the error below when deploying to netlify via the readme button.

10:19:30 AM: build-image version: 73f16e520fdddf409be6f578c8c2c8941bdf32d3 (focal)
10:19:30 AM: buildbot version: aae36d37bb0728ee6dc52d97c5e1b5b83720773e
10:19:30 AM: Building without cache
10:19:30 AM: Starting to prepare the repo for build
10:19:30 AM: No cached dependencies found. Cloning fresh repo
10:19:30 AM: git clone --filter=blob:none https://github.com/DemoMacro/hexo-boilerplate-netlify-cms
10:19:31 AM: Preparing Git Reference refs/heads/main
10:19:33 AM: Starting to install dependencies
10:19:33 AM: Python version set to 3.8
10:19:33 AM: Attempting Ruby version 2.7.2, read from environment
10:19:34 AM: Using Ruby version 2.7.2
10:19:34 AM: Started restoring cached go cache
10:19:34 AM: Finished restoring cached go cache
10:19:35 AM: Installing Go version 1.19.13 (requested 1.19.x)
10:19:40 AM: go version go1.19.13 linux/amd64
10:19:40 AM: Using PHP version 8.0
10:19:41 AM: Downloading and installing node v18.18.0...
10:19:41 AM: Downloading https://nodejs.org/dist/v18.18.0/node-v18.18.0-linux-x64.tar.xz...
10:19:41 AM: Computing checksum with sha256sum
10:19:42 AM: Checksums matched!
10:19:44 AM: Now using node v18.18.0 (npm v9.8.1)
10:19:44 AM: Enabling Node.js Corepack
10:19:44 AM: Started restoring cached build plugins
10:19:44 AM: Finished restoring cached build plugins
10:19:44 AM: Started restoring cached corepack dependencies
10:19:44 AM: Finished restoring cached corepack dependencies
10:19:44 AM: No pnpm workspaces detected
10:19:44 AM: Started restoring cached node modules
10:19:44 AM: Finished restoring cached node modules
10:19:44 AM: Installing npm packages using pnpm version 8.6.7
10:19:45 AM: Failed during stage 'Install dependencies': dependency_installation script returned non-zero exit code: 1
10:19:45 AM:  ERR_PNPM_FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILE  Cannot perform a frozen installation because the version of the lockfile is incompatible with this version of pnpm
10:19:45 AM: Try either:
10:19:45 AM: 1. Aligning the version of pnpm that generated the lockfile with the version that installs from it, or
10:19:45 AM: 2. Migrating the lockfile so that it is compatible with the newer version of pnpm, or
10:19:45 AM: 3. Using pnpm install --no-frozen-lockfile.
10:19:45 AM: Note that in CI environments, this setting is enabled by default.
10:19:45 AM: Error during pnpm install
10:19:45 AM: Build was terminated: dependency_installation script returned non-zero exit code: 1
10:19:45 AM: Failing build: Failed to install dependencies

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

npm
package.json
  • hexo 6.3.0
  • hexo-generator-archive 2.0.0
  • hexo-generator-index 3.0.0
  • hexo-generator-category 2.0.0
  • hexo-generator-tag 2.0.0
  • hexo-renderer-ejs 2.0.0
  • hexo-renderer-marked 6.0.0
  • hexo-renderer-stylus 3.0.0
  • hexo-server 3.0.0
  • hexo-theme-landscape 1.0.0
themes/landscape/package.json
  • grunt 1.6.1
  • load-grunt-tasks 5.1.0
  • grunt-git 1.1.1
  • grunt-contrib-clean 2.0.1
  • grunt-contrib-copy 1.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

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.