Issue: Several bookdown pages not appearing anymore - r

This is similar to the recent issue posed by jtr13 where the order of sections in the page sidebar have changed, however I'm missing sections from the page entirely. Rmd files 02- though 09- don't have their respective html files showing up.
I've installed and rerendered using 0.10 and the developer version on GitHub, but haven't seen the page (being hosted on GitHub) update.

I've resolved the issue myself by looking more closely at the commit where the disappearance happened. In the middle of one of the Rmd files, I had placed:
----
Other Variables
----
to try to represent a new section with a horizontal rule without it being numbered. This was likely interpreted during the render as a new section/YAML and subsequently turned the later page sections into code confetti.

Related

error adding codefolding in blogdown in r

I have been working on blogdown to generate the following website. So far so good, however I have been trying to add codefolding which is easy to do in a common rmarkdown document.
I found this blogpost, where they do it. I have been trying to play with that, I did steps 1 and 2 for blogdown so generated the codefolding.js and modified the config.toml in the theme template as well, however when I get into the header and/or footer I got stuck, I even tried to generate a new post where I cloned and copied the whole folder here however it is not working an I get the following error
I am not sure what I did wrong here

Github pages markdown tables are too wide, and using overflow-x: scroll does not work once code blocks are added

So I've been working on a GitHub pages site for hosting my documentation. I've been writing my own auto documentation utility that generates markdown files which are then hosted to github pages. This is one of the pages in question (This isn't an issue on desktop, only on mobile (or "thin" screens), so if you need to replicate I would recommend trying with a phone.)
I correctly modified the assets/css/style.scss file to include:
table {
overflow-x: scroll;
}
This actually worked for awhile, but then I got the idea to update my utility to also include the source code for the file being documented in the actual output markdown. Once I made this change, the source code blocks exhibit the scrolling behavior, but now the tables do not.
Has including source code blocks caused some kind of problem? And is there a way of fixing that?

TOC not displaying in Blogdown post (Hugo theme Even)

I have added a new post to my site made using blogdown. Despite the presence of toc: yes in my YAML, the table of contents is not displaying on the rendered webpage. I've also tried adding:
output:
blogdown::html_page:
toc: yes
which doesn't solve the problem either. I'm currently using the Even theme (Hugo), and in the .config file, I also have toc: yes present.
I checked out this post, but I wasn't able to find the files they are referencing, nor those particular lines of code. Also my issue is with new posts, not the home page.
Does anyone know what the problem might be?
EDIT: I can see in my index.html file (generated from index.Rmd) that the code for a toc is present. For some reason, it's not being rendered on the page?
TL;DR Solution: to get the table of contents to show in the Even theme, your posts must render to the .markdown format instead of .html format. In order to make this happen, you simple use the .Rmarkdown file extension when creating the post instead of .Rmd. Now, when you use blogdown::serve_site(), your post will use the output format .markdown instead of .html. Your post will now render with a beautiful table of contents.
A note for latex math mode users: when typing in your .Rmarkdown document, you will now have to escape your $'s and \'s. So for example, $\le 0.2$
will have to be typed as \$\\le 0.2\$.
I hope this overly elaborate problem and solution is helpful to someone!
I figured out a workaround for this.
First, I'm not sure how to provide a reproducible example in this context, but I can say that if you open an RStudio project, run blogdown::new_site(theme = "olOwOlo/hugo-theme-even"), add a New Post using the Addin dropdown menu, add some headings to your post, make toc:true, use Serve Site from the Addin menu. You will see your post working fine in every respect - only it will be missing the table of contents.
Workaround:
I don't know why, but it appears that the table of contents will show if I keep a copy of the post in .md format, and delete the .html document. The default behavior seems to use the .html document if it is present; failing that, it will use the .md document.
To keep a copy of the post in .md format, use the following code in the YAML of your .Rmd document:
output:
blogdown::html_page:
keep_md: yes
Serve the site, delete the .html document (but keep the .md document), and the table of contents appears in all of its glory (you may have to actually knit the file to get the .md).
I don't know why this works...I've seen elsewhere (although I can't seem to find the post again) that some hugo themes don't play nicely with .html files, and prefer .md files, and that appears to be the case for the Even theme.
In sum: My workaround for now is thus to work on my posts, and when I'm done, knit the document with the option above, delete the .html file, and be on my way.
Caveat: blogdown seems to automatically re-render all the old posts when using Serve Site. According to this stack answer, Serve Site should only render documents that have undergone changes. Regardless, the old posts are most definitely being re-rendered, even when working on an unrelated post. I'm not sure if this behavior is attributable to blogdown per se, or the RStudio project.
I tried going to Tools -> Project Options -> Build Tools, and unchecking the boxes "Preview site when building", yet the behavior persists. Which means I will have to continuously delete these new .html files for all old posts every time a I make a change to any other file. Currently I only have one post, so not a big deal...yet.
If someone knows of a solution to this caveat, I would be extremely grateful. If I find one, I will edit this question and add it.
EDIT: it appears that blogdown will re-render the old post if there is no .html document present. Otherwise, it does not re-render it.
EDIT 2: Aha! According to the answer to this question, simply changing the file extension of the blog post from .Rmd to .Rmarkdown will produce a .markdown document instead of a .html document.

RMarkdown .yml file for Github Pages compiling a removed page

I actually have 2 problems, but I suspect one might be caused by the other, so I will lay out the whole shibang.
I have a personal site I created in Rmarkdown and host with Github pages. Everything was going fine, and I was adding new content to the site until I updated R, RStudio, and my packages (I know, I know). One of the pages on my site generates a simulation and uses the simr package, and after I updated my packages I kept getting the following error
To try to fix this problem, I
(1) Uninstalled/reinstalled simr,
(2) referenced the simr package when I called the powerCurve function (e.g., simr::powerCurve), and
(3) just tried to remove the page from my website by commenting out the file on the .yml page.
When I tried to compile the site after commenting out the reference to the broken page, I noticed that R was still trying to compile the broken page. So I deleted the reference to the broken page on .yml, but it still tried to compile it.
What am I doing wrong? Ideally I'd like to be able to fix the broken page and continue adding content, but at this point I would be just as happy if I were simply able to remove the broken page. Any help is greatly appreciated!
I was unable to get the simr package to work. However, I was able to remove the broken page from my site. After commenting out the reference to the broken page on the .yml page, I then went into the broken page and deleted all the code (after saving the contents elsewhere). It appears that the change that included only commenting out the broken page did not trigger an evaluation of the change by Github, so the revision of the page itself caused Github to reference the .yml page and prevent the broken page from being evaluated.

Test ran a free template on VS2019 causes white borders on the left and right side

people of Stackoverflow
Ive been stuck for almost a day now because of this. I would like to know if any of you have the solution for the problem im currently facing.
What I did:
1) downloaded a free bootstrap template
2) copy, pasted and included all necessary files in Visual Studio 2019
3) linked up all css files, js files and image files
4) clean and build the solution.
Then this appears:
White borders, on the left and right
Whereas when I opened the original file, everything looks normal as it should be:
Normal looking site
Any one has this problem ? Because I have not touched, edited any codes besides linking up the respective files.

Resources