Giter VIP home page Giter VIP logo

gatsby-source-google-docs's Introduction

gatsby-source-google-docs


gatsby-source-google-docs


Npm Build Status Coverage Downloads PRs welcome MIT license


gatsby-source-google-docs is a Gatsby plugin to use Google Docs as a data source.

Why use Google Docs to write your content :

  • ๐Ÿ–‹ Best online WYSIWYG editor
  • ๐Ÿ–ฅ Desktop web app
  • ๐Ÿ“ฑ Mobile app
  • ๐Ÿ›ฉ Offline redaction
  • ๐Ÿ”ฅ No need for external CMS
  • โœ… No more content in your source code
  • ๐Ÿ—‚ Automatic breadcrumb generation
  • ๐Ÿคก Custom metadata fields

Usage

  1. Download gatsby-source-google-docs from the NPM registry:
yarn add gatsby-source-google-docs gatsby-transformer-remark gatsby-remark-images
  1. Generate a token

The package needs 3 .env variables with the following format to work:

GOOGLE_OAUTH_CLIENT_ID=2...m.apps.googleusercontent.com
GOOGLE_OAUTH_CLIENT_SECRET=Q...axL
GOOGLE_DOCS_TOKEN={"access_token":"ya...J0","refresh_token":"1..mE","scope":"https://www.googleapis.com/auth/drive.metadata.readonly https://www.googleapis.com/auth/documents.readonly","token_type":"Bearer","expiry_date":1598284554759}

gatsby-source-google-docs expose a script to make the generation easier. Open a terminal at the root of your project and type:

gatsby-source-google-docs-token

The format changed in v2.0.0-beta.16. Check the migration guide

  1. Add the plugin in your gatsby-config.js file
module.exports = {
    plugins: [
        "gatsby-source-google-docs",
        {
            resolve: "gatsby-transformer-remark",
            options: {
                plugins: ["gatsby-remark-images"],
            },
        },
    ],
}
  1. Create pages

Showcase

You are using gatsby-source-google-docs for your website? Thank you!

Please add your website to the Showcase

Documentation

Contributing

  • โ‡„ Pull/Merge requests and โ˜… Stars are always welcome.
  • For bugs and feature requests, please create an issue.

Changelog

See CHANGELOG

License

This project is licensed under the MIT License - see the LICENCE file for details

gatsby-source-google-docs's People

Contributors

cedricdelpoux avatar forivall avatar dependabot[bot] avatar kyleamathews avatar dmouse avatar justinsunho avatar loongyh avatar linoxyn avatar archydeberker avatar dandv avatar davidhartsough avatar johnnynia avatar horaklukas avatar voskresla avatar bigprosody avatar orthotypos avatar

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.