gatsby-source-google-docs icon indicating copy to clipboard operation
gatsby-source-google-docs copied to clipboard

Documentation: can work even if not using Gatsby

Open ethanstrominger opened this issue 3 years ago • 3 comments

This looks like it will work for the project I am working on which uses Jekyll. Saying it is for Gatsby might be underselling? Some info about what Gatsby specific things this done would be good, as well as indicating that it can be used even if you are not using Gatsby.

ethanstrominger avatar Jul 29 '22 19:07 ethanstrominger

You are not the first person with this idea. I need to make a separate package. But for now, it could be great to update documentation. Thank you for your help

cedricdelpoux avatar Jul 30 '22 08:07 cedricdelpoux

@cedricdelpoux I can make the doc changes. What makes this specific to Gatsby? If you made another package that was not specific to Gatsby, what changes would you have to make?

ethanstrominger avatar Jul 31 '22 09:07 ethanstrominger

I see in some of the documentation there are comments that are specific to Gatsby - are there any code you would have to change other than perhaps say this instruction is NA to Jekyll or other similar frontends?

ethanstrominger avatar Jul 31 '22 09:07 ethanstrominger

For now, you can use the Google Docs api on your side, then

import { GoogleDocument } from 'gatsby-source-google-docs/utils/google-document'

const doc = new GoogleDocument(docsResponse);
const markdown = doc.toMarkdown()

to tranform Google Docs document to markdown

cedricdelpoux avatar Aug 09 '22 06:08 cedricdelpoux

For now, you can use the Google Docs api on your side, then

import { GoogleDocument } from 'gatsby-source-google-docs/utils/google-document'

const doc = new GoogleDocument(docsResponse);
const markdown = doc.toMarkdown()

to tranform Google Docs document to markdown

can you please elaborate this? I could not understand, how to run this

jothikannan89 avatar Aug 03 '23 11:08 jothikannan89