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
- Download
gatsby-source-google-docs
from the NPM registry:
yarn add gatsby-source-google-docs gatsby-transformer-remark gatsby-remark-images
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
- 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"],
},
},
],
}
You are using gatsby-source-google-docs
for your website?
Thank you!
Please add your website to the Showcase
- โ Pull/Merge requests and โ Stars are always welcome.
- For bugs and feature requests, please create an issue.
See CHANGELOG
This project is licensed under the MIT License - see the LICENCE file for details