Skip to content

Twitter share button doesn't work from chapters #934

Closed

Description

@maelle

The Twitter share button works from the homepage of a bookdown gitbook e.g. https://bookdown.org/yihui/rmarkdown-cookbook or https://bookdown.org/yihui/bookdown/

But not from chapters e.g. https://bookdown.org/yihui/rmarkdown-cookbook/installation.html or https://bookdown.org/yihui/bookdown/get-started.html

It is because of the "|" in the title as noted by @steffilazerte in ropensci-org/contributing-guidance#28. If one replaces "|" with "-" in the tweet intent URL, it works e.g.


By filing an issue to this repo, I promise that

  • I have fully read the issue guide at https://yihui.org/issue/.
  • I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('bookdown'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('rstudio/bookdown').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

Activity

  1. changed the title [-]Twitter share buttons doesn't work from chapters[/-] [+]Twitter share button doesn't work from chapters[/+] on Aug 26, 2020
  2. cderv commented on Aug 26, 2020

    @cderv
    Collaborator

    This is because we are missing a encodeURIComponent. I'll fix that. Thanks for the report.

  3. cderv commented on Aug 26, 2020

    @cderv
    Collaborator

    This should be ok now if you use devel bookdown.

  4. maelle commented on Aug 26, 2020

    @maelle
    ContributorAuthor

    awesome, thank you

  5. github-actions commented on Feb 24, 2021

    @github-actions

    This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

  6. locked as resolved and limited conversation to collaborators on Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions