Implements fetch for readme file of glues#143
Implements fetch for readme file of glues#143judibo wants to merge 21 commits intoherbsjs:masterfrom
Conversation
|
It is under conflict |
This reverts commit 4afb5ea.
docs/glues/herbs2gql.md
Outdated
| Creates GraphQL types (queries, mutations, etc.) based on herbs [entities](/docs/entity/getting-started) and [usecases](/docs/usecase/getting-started), based on [Apollo](https://www.apollographql.com/) GraphQL. | ||
| import ReadMeDoc from '../../src/components/ReadMeDoc' | ||
|
|
||
| <ReadMeDoc docURL='https://raw.githubusercontent.com/herbsjs/herbs2gql/master/README.md'/> |
There was a problem hiding this comment.
I think this should be inside a env file
There was a problem hiding this comment.
I wasn´t able to put it inside the md file, but I put the base URL inside the env file to import it at the react component and oly pass the endpoint at the md file.
src/components/ReadMeDoc.js
Outdated
|
|
||
| return ( | ||
| <> | ||
| <ReactMarkdown children={markdown} /> |
There was a problem hiding this comment.
What happens if url is unavailable or broken?
There was a problem hiding this comment.
Good point!
Just implemented a catch with an Error message, asking to go to github doc instead.
|
It is under conflict |
|
Also, can you change all the glues? |
|
Hi @jhomarolo, |
| title: Error to Text - Suma2Text | ||
| sidebar_label: Error to Text | ||
| slug: /glues/suma2text | ||
| hide_title: true |
There was a problem hiding this comment.
Why not create an .md generator? we could have all this information inside 1 file in json format, so the generator generates everything before deploying
Another suggestion is, why not read all repositories so auto-creates these files? it looks simple as all files have a similar structure
| }, []) | ||
|
|
||
| return ( | ||
| <> |
There was a problem hiding this comment.
this indentation is correct? It looks so long
|
First, I wanted to say that this PR is very important for the future maintenance of the Herbs documentation. Thank you @judibo ! However, as it is today, we have a problem: we replaced the local docs with the Ideally, we should update the repos with a structure that is not dependent on the |
Implements fetch for readme file of glues to solve the problem on issue #111 and dynamic renders the readme file at the documentation page.
Here is a print to check how it´s being rendered at the doc locally x readme at github for the herbs2gql glue.

I´m sending only 1 glue for now, so we can check how it will work on Production. If everything works fine, as it is running locally, I´ll implement on the other glues.