Code Monkey home page Code Monkey logo

cambium-rsc-ogimage's Introduction

Cambium RSC + SSR + og:image Middleware

This repo is a fork of 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 https://opengraph.xyz 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 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.

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 http://localhost:8910 as usual. After any code change you'll need to stop the server, build and serve again.

cambium-rsc-ogimage's People

Contributors

cannikin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.