software-mansion / react-native-gesture-handler

Declarative API exposing platform native touch and gesture system to React Native.
https://docs.swmansion.com/react-native-gesture-handler/
MIT License
5.85k stars 954 forks source link

Add automatic og:image generation to docs #2851

Closed xnameTM closed 2 weeks ago

xnameTM commented 1 month ago

Summary

This pr includes changes to dynamically build OG Images for every single subpage in docs.

How does it work?

The algorithm runs after docusaurus build. It reads titles from markdown files in docs dictionary, generates images and place .png files in the build dictionary. Docusaurus has been configured to automatically link to generated OG Images.

How to test this feature?

Command to change current working dictionary:

cd docs

Command to download libraries:

yarn install

Command to build project and generete OG Images:

yarn build

Command to see the result:

yarn serve