yihui | Personal website of Yihui Xie | Static Site Generator library

 by   rbind HTML Version: Current License: MIT

kandi X-RAY | yihui Summary

kandi X-RAY | yihui Summary

yihui is a HTML library typically used in Web Site, Static Site Generator applications. yihui has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

This is a repo to host the (Markdown) source files of my personal website, including my Chinese and English blogs, as well as several project websites (such as knitr.) The content of all pages is licensed under CC BY-NC-SA 4.0. To build the website locally, you must clone this repo with its submodule (use the --recursive argument), e.g.,. The website is built via the R package blogdown. Please read its documentation for how to use it. I don't recommend you to study how my website is built, because it is complicated. In particular, the way I manage images is fairly complicated.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              yihui has a low active ecosystem.
              It has 126 star(s) with 199 fork(s). There are 15 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 42 open issues and 31 have been closed. On average issues are closed in 155 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of yihui is current.

            kandi-Quality Quality

              yihui has no bugs reported.

            kandi-Security Security

              yihui has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              yihui is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              yihui releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of yihui
            Get all kandi verified functions for this library.

            yihui Key Features

            No Key Features are available at this moment for yihui.

            yihui Examples and Code Snippets

            No Code Snippets are available at this moment for yihui.

            Community Discussions

            QUESTION

            Vertically scrollable code with RStudio and xaringan
            Asked 2021-Jun-11 at 20:06

            I am currently preparing html slides for an R modelling workshop, for which I use the awesome xaringan package for R. It is based on remark.js. Compared to ioslides and slidy, it does much better suit my expectations. I am absolutely excited! One feature that I missed, are scrollable "long slides". Here I leave of course the "slides" paradigm towards a mix between slides and ordinary web pages, but I find this didactically attractive to explain complex content and code. This style worked well with slidy, and I found also some hints how to enable scrollable code in xaringan.

            Here I use the following CSS (found in a related post at SO):

            ...

            ANSWER

            Answered 2021-Jun-11 at 20:06

            remark.js was not made with scrollable slides in mind, which means that it is not possible to implement scrolling without a major feature addition to remark.js or breaking certain remark.js features.

            If you are willing to break some features, the easiest way I can think of to hack in scrollable slides is by altering the y-overflow of the .remark-slide-scaler class. All we have to do is add the following CSS:

            Source https://stackoverflow.com/questions/67750561

            QUESTION

            Is anyone else having issues with \FloatBarrier in Rmarkdown
            Asked 2021-Jun-10 at 09:21

            If I use \FloatBarrier to maintain the desired order of the document, I get the following error and can't knit the PDF (specifically happens with PDF). It worked probably six months ago.

            ...

            ANSWER

            Answered 2021-Jun-10 at 09:21

            You have to load the placeins package if you want to use one of its macros:

            Source https://stackoverflow.com/questions/67910059

            QUESTION

            How to Customize figure LaTeX with knitr/rmarkdown
            Asked 2021-Jun-09 at 20:19

            I want to create a footer within the float for a figure created with ggplot2 in an rmarkdown document that is generating a .pdf file via LaTeX.

            My question: Is there a way within rmarkdown/knitr to add more LaTeX commands within the figure environment?

            Specifically, I'd like to find a way to insert custom LaTeX using either the floatrow or caption* macro as described in https://tex.stackexchange.com/questions/56529/note-below-figure within the figure environment.

            When I looked at the chunk options (https://yihui.org/knitr/options/#plots), something like out.extra seems close to what I want, but that is used as an extra option to \includegraphics while I want access to put extra LaTeX within the figure environment, outside of any other LaTeX command.

            ...

            ANSWER

            Answered 2021-Jun-07 at 10:41

            The solution to your question is perhaps quite similar to this one. However, I believe yours is a bit more general, so I'll try to be a bit more general as well...

            As far as I know, there's no simple solution to add extra LaTeX code within the figure environment. What you can do is update the knit (or output) hook (i.e. the LaTeX code output generated by the figure chunk).

            The source code for the LaTeX figure output hook can be found here (hook_plot_tex). The output generated can be found starting at line 159. Here we can see how the output is structured and we're able to modify it before it reaches the latex engine.

            However, we only want to modify it for relevant figure chunks, not all. This is where Martin Schmelzer's answer comes in handy. We can create a new chunk option which allows for control over when it is activated. As an example enabling the use of caption* and floatrow we can define the following knit hook

            Source https://stackoverflow.com/questions/67825951

            QUESTION

            "Edit this page" or "View source option" for Jekyll blog post
            Asked 2021-Jun-08 at 07:20

            For my jekyll blog, I'm knitting Rmd to Md for the posts. At somewhere (preferably top), I want to programmatically add a link to view the source page (Rmd) hosted under _sources folder in top level directory.

            Similar implementation can be found at https://yihui.org/en/about/ (at the left sidebar- Edit this page option)

            Can this be done by some modification in custom knit command? OR Some html-include with liquid syntax should be used?

            ...

            ANSWER

            Answered 2021-Mar-26 at 18:32

            What about this? This has the Github icon, and links to the repo on the github page. Without any reprex, or an example from you, this is the best I can do unless you give more details. Does Jekyll use YAML?

            Source https://stackoverflow.com/questions/66627717

            QUESTION

            Cannot render custom blocks with cat()
            Asked 2021-Jun-08 at 07:14

            As explained in this chapter of the R Markdown Cookbook, it is possible to make custom blocks in R Markdown files with this syntax (here, to center some text):

            ...

            ANSWER

            Answered 2021-Jun-06 at 09:06

            There are two issues:

            1. You use print() instead of cat() (even if you refer to cat() in your post
            2. You put spaces at the beginning of each line which prevents the custom block to be rendered.
            3. If you prefer the lines to be indented (as I do) then I would suggest make each line a separate string as I do in the second example. This also has the advantage that you could add the line breaks via the sep argument instead of having to add them manually.

            Reproducible example:

            Source https://stackoverflow.com/questions/67850223

            QUESTION

            Error generating .pdf using knitr to PDF in RStudio
            Asked 2021-May-26 at 05:21

            From RStudio I have created a new file, File / New File / R Markdown, I have tried to generate the .pdf file from knitr / knitr to PDF, and the error that I reproduce below occurs, I am starting with LaTeX and I do not know very well what make. I appreciate your help.

            Console RStudio:

            ...

            ANSWER

            Answered 2021-May-26 at 05:21

            According to the comments, the answer posted at https://tex.stackexchange.com/a/27141 solved the issue.

            The relevant part:

            Remedy: start MiKTeX Options and choose either Yes or No (but not "Ask me first") for the option "Install missing packages on-the-fly"

            Source https://stackoverflow.com/questions/67696286

            QUESTION

            How to get the github repo url for all the packages on CRAN?
            Asked 2021-May-25 at 16:26

            I would like to extract the github repo url for all the packages on CRAN. And I have tried to first read the link of CRAN and get the table of all the package names, which also contains the url for the description page of each package, for I want to extract the github repo url through the description page. But I can't get the completed url. Could you please help me with this? Or is there any better way to get the repo url for all packages?

            This is my supplementary : Actually, I want to filter the pkgs that do have a official github repo, like some pkgs as xfun or fddm. And I found I can extract the username and repo name from the description of pkgs on CRAN, and put them in a github formatted url. (for most of them have the same format url like : https://github.com/{username}/{reponame}. For example, for package xfun , it would be like : https://github.com/yihui/xfun.

            And now, I have get some of them like : (three of them)

            enter image description here

            And I am wondering how could I get the url for all of them. I know use glue pkg can replace the elements in a url. and for get the url by replacing elements (username and reponame) I have tried map() and map_dfr() function. But it returns me error : Error in parse_url(url) : length(url) == 1 is not TRUE

            Here is my code :

            ...

            ANSWER

            Answered 2021-May-25 at 16:26

            I want to suggest a different method for getting where you want.

            As discussed in the comments, not all R packages have public GitHub repos.

            Here is a version of some code from an answer to another question by Dirk Eddelbuettel that retrieves information from CRAN's database, including the package name and the URL field. If a package has a public GH repo, it is very likely that the authors have included that information in the URL field: there may be a few packages where the GH repo information is guessable (i.e. the GH user name is the same as (e.g.) the identifier in the maintainer's e-mail address; the GH repo name is the same as the package name), but it seems like a lot of work to do all that guessing (and accessing GitHub to see if the guess was correct) for a relatively low return.

            Source https://stackoverflow.com/questions/67673049

            QUESTION

            Passing parameters through an RMarkdown document?
            Asked 2021-May-14 at 15:46

            I am looking to create unique/individual reports for a given list of vendors. The ideal output format would be a seperate html file of the given vendors information.

            The issue is that I am having trouble wrapping my head around creating parameterized reports in RMarkdown. I have been taking a look at this link to understand how to loop/iterate through RMarkdown reports

            To illustrate and share the logic of what I want to execute is the following:

            ...

            ANSWER

            Answered 2021-May-13 at 20:42

            I think the step you were missing was specifying the output filename so that each "vendor" would have its own file; otherwise, the same filename is overwritten each time leaving you with a single HTML document.

            An example:

            Source https://stackoverflow.com/questions/67525642

            QUESTION

            `knitr::include_url` produces inline frame without images
            Asked 2021-May-12 at 08:00
            Expected

            According to the rmarkdown cookbook, using knitr::include_url should produce an inline frame of the webpage (note that it works and contains images):

            Observed

            But when I do the exact same thing in HTML document, I see no images in my inline frame, and I am not sure why:

            Details

            In case it helps, here are some more details:

            YAML for my document

            ...

            ANSWER

            Answered 2021-May-11 at 01:54

            This is due to a change in a recent version of Pandoc (not that recent but a few months ago) that it will embed URLs as base64 data. I just patched knitr to change this behavior. You can try the dev version of knitr:

            Source https://stackoverflow.com/questions/67477667

            QUESTION

            Why R Markdown Caption cannot take "&"
            Asked 2021-May-10 at 20:48

            I am gradually building an R Markdown (.RMD) file, learning by doing. I was able to insert a couple of tables, but I had a problem with one of them. The initial setup is:

            ...

            ANSWER

            Answered 2021-May-10 at 20:48

            According to wiki, there are some characters that needs escaping

            Here, is a tested version of the markdown code

            Source https://stackoverflow.com/questions/67477230

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install yihui

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/rbind/yihui.git

          • CLI

            gh repo clone rbind/yihui

          • sshUrl

            git@github.com:rbind/yihui.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Static Site Generator Libraries

            hugo

            by gohugoio

            gatsby

            by gatsbyjs

            jekyll

            by jekyll

            mkdocs

            by mkdocs

            eleventy

            by 11ty

            Try Top Libraries by rbind

            simplystats

            by rbindHTML

            apreshill

            by rbindHTML

            support

            by rbindCSS

            robjhyndman.com

            by rbindHTML

            blogdown-demo

            by rbindJavaScript