threshold-network / website

1 stars 10 forks source link

Gatsby and Netlify setup #15

Closed r-czajkowski closed 2 years ago

r-czajkowski commented 2 years ago

Ref: #20 #17

Add initial config to run the Threshold website with Gatsby. It also adds Netlify CMS support. The CMS admin panel is available under <domain>/admin and uses GitHub auth to login to the CMS.

Screenshots **CMS panel** ![obraz](https://user-images.githubusercontent.com/57687279/160132776-cacd02cd-8e46-4796-9957-de2a5a528590.png) ![obraz](https://user-images.githubusercontent.com/57687279/160132888-e2e2b440-d544-490b-b433-5380bad872ef.png) ![obraz](https://user-images.githubusercontent.com/57687279/160132930-58577889-53ae-4bb2-9c2c-26e61d4e54e8.png)
github-actions[bot] commented 2 years ago

Preview uploaded to https://preview.threshold.network/gatsby/index.html.

github-actions[bot] commented 2 years ago

Preview uploaded to https://preview.threshold.network/gatsby/index.html.

georgeweiler commented 2 years ago

Hey @r-czajkowski Amazing work! After chatting with Liz and Chris, I think the markdown dangerouslySetHTML pattern that you've chosen will work.

Here are some change requests before we merge. Let me know what you think:

Additional comments that we discussed (but let's figure out in a future PR)

r-czajkowski commented 2 years ago

we have 3 separate static directories: /static, src/static, and public/static. I'm a little confused at the difference. maybe there is some clean up we can do here?

The public is a build dir of the gatsby app and we don't include public dir in the git repo so there's nothing we can do here.

The src/static is for React and you can use this file in the React scope- eg. you can import the SVG file in your React component like:

import Threshold from "../../static/images/ThresholdBrandFullWhite.svg"

<Threshold />

The static/images is for cms and all images uploaded via cms go to this directory.

@georgeweiler I've updated the dir structure please see c2b6809 9bceef8. The rest bullets we can address in further work. I think we have a minimal gatsby + cms set up so we are able to build new features with Gatsby and Netlify cms.