facebook / docusaurus

Easy to maintain open source documentation websites.
https://docusaurus.io
MIT License
56.14k stars 8.42k forks source link

change-icon-for-page-previews #8304

Closed jcstein closed 1 year ago

jcstein commented 1 year ago

Have you read the Contributing Guidelines on issues?

Description

I'd like to change the icon in the pink box in the screenshot attached, but I can't find guidance on how to do this in the docs. Is this possible?

Screenshot 2022-11-08 at 4 31 33 PM

Has this been requested on Canny?

No response

Motivation

Looking to add variation on pages with multiple link card previews.

API design

No response

Have you tried building it?

No response

Self-service

slorber commented 1 year ago

We don't have an API for that apart using swizzle on the DocCard component.

It's unlikely we implement anything like this in the future because there are tons of way to provide an icon (React, emoji, font icon, SVG, SVGR...) and we wouldn't be able to find a good API that satisfies all usages. Swizzle remains the most flexible option for such use-cases.

jcstein commented 1 year ago

thank you @slorber - can you point me to more information on the DocCard component?

slorber commented 1 year ago

thank you @slorber - can you point me to more information on the DocCard component?

I'm not sure what information you want exactly.

Have you read the doc and tried to swizzle? I won't write you a step by step tutorial so please read the doc and report what exactly is unclear. We'll improve the doc for all instead of helping a single user.