Eleventy and Google Docs Starter

This Eleventy starter combines the Google Docs API, Eleventy, and @googleworkspace/google-docs-hast to create pages using Google Docs and Google Drive as a CMS.

Demo

Setup

  1. Copy .env.sample to .env.
  2. Create a Google Cloud project and enable the Google Docs API.
  3. Create a service account and download the JSON credentials file.
  4. Copy the client_email and client_private_key value from the JSON credentials file to the variables in .env.
  5. Create a Google Drive folder and share it with the service account email.
  6. Copy the folder ID to the GOOGLE_DRIVE_FOLDER variable in .env.
  7. Run npm install to install dependencies.
  8. Run npm run dev to start the development server.

Pages in the 'documents' collection