Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cannikin/cambium-rsc-ogimage
https://github.com/cannikin/cambium-rsc-ogimage
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cannikin/cambium-rsc-ogimage
- Owner: cannikin
- Created: 2024-05-22T20:34:04.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-23T15:58:58.000Z (7 months ago)
- Last Synced: 2024-10-12T15:21:59.026Z (3 months ago)
- Language: JavaScript
- Size: 34.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cambium RSC + SSR + og:image Middleware
This repo is a fork of [cambium-rsc](https://github.com/cannikin/cambium-rsc) (check out the README there for more details about the core app). This fork integrates the og:image middleware and demonstrates the fact that SSR is rendering all of the HTML for the initial request. This is a requirement for sites that care about og:images because they won't execute JavaScript.
Once you edit your photo, click the **Share** button to get a URL. Take that URL and paste it into the location bar at to see how the og:images will render on various social networks. Note that if you're developing locally you'll need to make your dev server available to the outside world so that opengraph.xyz can access it. We like [ngrok](https://ngrok.com/) but use your favorite HTTP tunneling service!
## Setup
Populate `web/public/photos` with the images of your choice, or use the ones included. Note these are © Rob Cameron and are available under the [CC BY-ND 4.0 license](https://creativecommons.org/licenses/by-nc/4.0/).
## Development
The dev server is not currently functioning with RSC, so you need to do a full `build` and `serve` as if you were running in production:
```
yarn rw build
yarn rw serve
```Your site will be available at as usual. After any code change you'll need to stop the server, `build` and `serve` again.