Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract contentful management system #40

Closed
calpa opened this issue Oct 5, 2018 · 3 comments
Closed

Extract contentful management system #40

calpa opened this issue Oct 5, 2018 · 3 comments

Comments

@calpa
Copy link
Owner

calpa commented Oct 5, 2018

GatsbyJS has provided the ability to query data from any (remote) source, and contentful is selected in the early stage of this blog system.

For now, API_SPACE_ID and API_TOKEN are used to query the contentful database.

I purposed that query from github gist or other free database with filled data, instead of bundled with contentful.

You may have a look at https://github.com/calpa/blog/blob/master/gatsby/getPosts.js

@adarshBrata
Copy link

Can you please elaborate what i have to do?

@calpa
Copy link
Owner Author

calpa commented Oct 8, 2018

@DeViL3998 Thank you for your interest.

For now, the blog system is using GatsbyJS, and querying the data from Contentful Management System.

This is a front end system and should be separated from the backend api.

Here is the code of querying:
https://github.com/calpa/blog/blob/master/gatsby/getPosts.js#L8

You may use current blog data to have a look at the provided data.

The above one was generated by Contentful, though only some data field written in README.md are required.

TODO:

  1. Change the settings in .env from API_SPACE_ID, API_TOKEN to others
  2. Change blog/getPosts.js settings
  3. Provide a mock data that can query the correct types of data

I think that the mock data is stored in a new folder such as mock would be a good idea.

For security issue, the API_TOKEN and API_SPACE_ID will be regenerated after this issue is solved.

@adarshBrata
Copy link

i'm looking into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants