Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[www/blog] Allow Markdown in <Pullquote citation> #25240

Closed
mgienow opened this issue Jun 23, 2020 · 12 comments
Closed

[www/blog] Allow Markdown in <Pullquote citation> #25240

mgienow opened this issue Jun 23, 2020 · 12 comments
Labels
type: feature or enhancement Issue that is not a bug and requests the addition of a new feature or enhancement.

Comments

@mgienow
Copy link
Contributor

mgienow commented Jun 23, 2020

Hello! I would like to request a feature to go with the component.

The <Pullquote> component, which is allowed in MDX, supports setting an optional citation like so: <Pullquote citation="Dennis Brotzky, Founding Partner, Narative">.

The feature I'm requesting is the ability to add links to the citation, e. g. if we want to link to the website of the person we attributed the quote to. In MDX this would be Dennis Brotzky, Founding Partner, [Narative](https://www.narative.co/) but putting in the markdown link does not work in the <Pullquote citation=""> context.

Thanks!

@mgienow mgienow added the type: feature or enhancement Issue that is not a bug and requests the addition of a new feature or enhancement. label Jun 23, 2020
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jun 23, 2020
@fk
Copy link
Contributor

fk commented Jun 23, 2020

Hey @mgienow! 🤗 🎉
Welcome, and thanks for opening this!

To add to your great issue description, here's that <Pullquote> component.


I can see a couple of ways enabling this, but given my very shallow understanding of MDX, I can't help but think that the easiest probably would be to use dangerouslySetInnerHTML — and just allow to write raw HTML in caption. 🤭
Or just add bespoke support for the Markdown link syntax via a regexp …

I also wouldn't be surprised if I don't see the forest for the trees! 😅

Pinging the @gatsbyjs/website superfriends for help! Is there an (easy) way to apply Markdown/MDX magic to the citation field, or … hmm, maybe nesting a <Citation> in <Pullquote>, with both rendering MDX?

/cc @gillkyle

@fk fk changed the title Feature request for Gatsby blog post publishing [www/blog] Allow Markdown in <Pullquote citation> Jun 23, 2020
@LekoArts LekoArts added topic: website and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jun 24, 2020
@fk
Copy link
Contributor

fk commented Jun 24, 2020

So turns out I didn't see that forest for those trees. 😅 🤦 🤷

@sidharthachatterjee to the rescue ❤️ — we can pass JSX to citation like so:

<Pullquote
  citation={
    <span>
      Dennis Brotzky, Founding Partner,{" "}
      <a href="https://www.narative.co/">Narative</a>
    </span>
  }
>
  “Partnering with Gatsby has been a strong driver for growth. Our clients love
  the performance benefits and our developers are happy to use tools they
  already love.”
</Pullquote>

Thank you Sid! 🤗
Follow-up PR to #25239 incoming!

@fk
Copy link
Contributor

fk commented Jun 24, 2020

#25251

@muescha
Copy link
Contributor

muescha commented Jun 30, 2020

it can done the way like in:

but the JSX code should be in one line until remark-mdx is implemented in:

@github-actions
Copy link

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Jul 21, 2020
@muescha
Copy link
Contributor

muescha commented Jul 21, 2020

<Pullquote>
  “Partnering with Gatsby has been a strong driver for growth. Our clients love
  the performance benefits and our developers are happy to use tools they
  already love.”
  <PullquoteCitation>
    Dennis Brotzky, Founding Partner, [Narative](https://www.narative.co/)
  <PullquoteCitation>
</Pullquote>

maybe is this syntax possible? then inside the PullquoteCitation the text is converted as markdown?

@muescha muescha removed the stale? Issue that may be closed soon due to the original author not responding any more. label Jul 21, 2020
@muescha
Copy link
Contributor

muescha commented Jul 25, 2020

related:

@fk
Copy link
Contributor

fk commented Jul 27, 2020

Oh yes, thank you @muescha! 🙏 🤗
Was searching for something like this when we ran into this problem, but didn't find anything. Great to see it added to the v2 milestone!

@muescha
Copy link
Contributor

muescha commented Jul 27, 2020

As workaround befoee 2.0 maybe we can run the markdown convent in the component itself with the unified remark?

@github-actions
Copy link

Hiya!

This issue has gone quiet. Spooky quiet. 👻

We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!

Thanks for being a part of the Gatsby community! 💪💜

@github-actions github-actions bot added the stale? Issue that may be closed soon due to the original author not responding any more. label Aug 17, 2020
@muescha
Copy link
Contributor

muescha commented Aug 17, 2020

not stale

@github-actions github-actions bot removed the stale? Issue that may be closed soon due to the original author not responding any more. label Aug 18, 2020
@LekoArts
Copy link
Contributor

Since the blogposts were moved to Wordpress (including the individual components like Pullquote) we can close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature or enhancement Issue that is not a bug and requests the addition of a new feature or enhancement.
Projects
None yet
Development

No branches or pull requests

4 participants