Code Monkey home page Code Monkey logo

link's Introduction

link

Lifecycle: experimental CRAN status R-CMD-check

The goal of link is to help blog authors include links to their prose.

Installation

You can install the development version of link like so:

pak::pak("tadascience/link")

Example

Include this in your Rmd or qmd document to turn <pkg>::<fun>() and {<pkg>} into hyperlinks.

```{r, echo = FALSE}
link::auto()
```

You can drop the { and the pkg:: if you like:

```{r, echo = FALSE}
link::auto(keep_braces = FALSE, keep_pkg_prefix = FALSE)
```

By default, bslib powered tooltips are added. You can opt-out with type = "plain".

```{r, echo = FALSE}
link::auto(type = "plain")
```

link's People

Contributors

romainfrancois avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

link's Issues

better handle errors

> link::to_pkg("fafafa")
Error in `httr2::request()` at link/R/auto.R:57:3:
! `url` must be a single string, not a character `NA`.
Run `rlang::last_trace()` to see where the error occurred.

> link::to_call("dplyr::foo()")
Error in `httr2::request()` at link/R/auto.R:57:3:
! `url` must be a single string, not a character `NA`.
Run `rlang::last_trace()` to see where the error occurred.

remove dependencies hack

auto() has :

  [...]
  # This is a hack because I currently don't know how to inject the
  # dependencies otherwise
  bslib::tooltip("", "")
}

which is a bit clunky. How else can the dependencies needed for bslib::tooltip() be added ?

Release link 2024.2.0

First release:

Prepare for release:

  • git pull
  • urlchecker::url_check()
  • devtools::build_readme()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • git push
  • Draft blog post

Submit to CRAN:

  • usethis::use_version('minor')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted ๐ŸŽ‰
  • Add preemptive link to blog post in pkgdown news menu
  • usethis::use_github_release()
  • usethis::use_dev_version(push = TRUE)
  • usethis::use_news_md()
  • Finish blog post
  • Tweet

Open link in a new tab

Hi! Thanks for the package!

Is it possible to open the hypelink in a new tab? like: [Link](https://link.tada.science){target="_blank"}

Thanks!

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.