{"id":14066855,"url":"https://github.com/bearloga/wikipediapreview-r","last_synced_at":"2025-04-09T23:32:14.337Z","repository":{"id":146996657,"uuid":"479563125","full_name":"bearloga/wikipediapreview-r","owner":"bearloga","description":"R package for using Wikipedia Preview context cards in R Markdown documents","archived":false,"fork":false,"pushed_at":"2024-06-24T03:21:41.000Z","size":3957,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T13:44:12.579Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://bearloga.github.io/wikipediapreview-r/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bearloga.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-08T23:10:16.000Z","updated_at":"2024-12-30T22:26:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"a1afa06a-193e-41a9-a56b-68d3684e361c","html_url":"https://github.com/bearloga/wikipediapreview-r","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bearloga%2Fwikipediapreview-r","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bearloga%2Fwikipediapreview-r/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bearloga%2Fwikipediapreview-r/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bearloga%2Fwikipediapreview-r/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bearloga","download_url":"https://codeload.github.com/bearloga/wikipediapreview-r/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248129914,"owners_count":21052660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-13T07:05:17.970Z","updated_at":"2025-04-09T23:32:12.358Z","avatar_url":"https://github.com/bearloga.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"# wikipediapreview\n\n\u003c!-- badges: start --\u003e\n\u003c!-- badges: end --\u003e\n\n[Wikipedia Preview](https://www.mediawiki.org/wiki/Wikipedia_Preview) for [R Markdown](https://rmarkdown.rstudio.com/) documents.\n\n| Format/Generator | Compatibility |\n|:-----------------|:--------------|\n| [blogdown](https://pkgs.rstudio.com/blogdown/) blog/website | ✅ Confirmed |\n| [bookdown](https://pkgs.rstudio.com/bookdown/) website | ❔ Unknown |\n| [distill](https://rstudio.github.io/distill/) article | ✅ Confirmed |\n| [distill](https://rstudio.github.io/distill/) blog/website | ❔ Unknown (but probably works) |\n| HTML Vignette/Document | ✅ Confirmed |\n| [pkgdown](https://pkgdown.r-lib.org/) article | ✅ Confirmed |\n| [Quarto](https://quarto.org/) HTML documents | ✅ Confirmed |\n| [Quarto](https://quarto.org/) blog/website | ✅ Confirmed |\n| [Quarto presentation](https://quarto.org/docs/presentations/revealjs/) | ✔️ Confirmed _BUT_ using alternative styling is not recommended |\n| [Reveal.js](https://github.com/rstudio/revealjs) presentation | ✔️ Confirmed _BUT_ using alternative styling is not recommended |\n| [xaringan](https://github.com/yihui/xaringan) presentation | ✔️ Confirmed _BUT_ `{.wiki}` styling does not work |\n\n**NOTE**: Wikipedia Preview [standalone JS component](https://github.com/wikimedia/wikipedia-preview) can be used on any website. There is also an [official WordPress plug-in](https://wordpress.org/plugins/wikipedia-preview/).\n\n## Installation\n\nYou can install the development version of wikipediapreview like so:\n\n``` r\n# install.packages(\"remotes\")\nremotes::install_github(\"bearloga/wikipediapreview-r\")\n```\n\n## Example\n\nTo initialize include the following anywhere in your R Markdown document:\n\n```\n`r wikipediapreview::wp_init()`\n```\n\nIf you prefer, you can initialize using a designated chunk instead:\n\n````{verbatim}\n```{r wp-init, results='asis', echo=FALSE}\nlibrary(wikipediapreview)\nwp_init()\n```\n````\n\nLinks to Wikipedia articles in your R Markdown document will automatically have popup cards showing your readers a preview of the linked article:\n\n![Demonstration of Wikipedia Preview on a rendered R Markdown vignette](man/figures/demo.gif)\n\n## 1.8.0\n\nThis package uses version 1.8.0 of Wikipedia Preview while the latest version (as of 2024-06-23) is 1.11.0 and includes awesome improvements like multiple color schemes (night/dark mode).\n\nHowever, starting with 1.9.0, the maintainers of the library have been distributing a CommonJS version (`.cjs`). [Unpkg has an unresolved issue](https://github.com/mjackson/unpkg/issues/355) where it does not correctly set the content type of `.cjs` files -- it serves them as \"text/plain\" instead of \"application/javascript\" -- which sets off an \"blocked due to MIME type mismatch (X-Content-Type-Options: nosniff)\" error when the browser tries to load it from unpkg's servers.\n\nUntil that issue is resolved, this package cannot use the latest version of Wikipedia Preview library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbearloga%2Fwikipediapreview-r","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbearloga%2Fwikipediapreview-r","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbearloga%2Fwikipediapreview-r/lists"}