Hello,
This is my first post! I have made an rmarkdown document like the below minimal example that uses Shiny. My problem is with the links to the sections. They work fine in RStudio, but for some reason, when the .Rmd file is put on my Shiny server and accessed from the web, the link #top works but the link #template does not. (Links below commented out because of rule "new users can only use 2 links.)
---
title: "Step by step normal app"
author: "Dan"
date: "March 1, 2018"
output: html_document
runtime: shiny
---
Stuff above the introduction.
## Introduction {`#top`}
## The Template {`#template`}
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
t
This should make a [link to the top of the page](`#top`).
This should make a [link to the template](`#template`).
I have made an rmarkdown document like the below minimal example that uses Shiny. My problem is with the links to the sections. They work fine in RStudio, but for some reason, when the .Rmd file is put on my Shiny server and accessed from the web, the link #top works but the link #template does not.
Any help would be greatly appreciated. Here is the code from R markdown:
---
title: "Step by step normal app"
author: "Dan"
date: "March 1, 2018"
output: html_document
runtime: shiny
---
Stuff above the introduction.
## Introduction {`#top`}
## The Template {`#template`}
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
[Make a lot of vertical space so you can see the effect of the links]
This should make a [link to the top of the page](#top).
This should make a [link to the template](#template).
Thanks, but unfortunately it still isn't working for me. I click on the section link (for example, #top), and the URL says STUFF/#top but the document doesn't go to the Introduction. Interestingly, if I manually change the URL to be STUFF/#section-top it works.
Hi, I'm really sorry, but I made some mistakes last time: I stupidly didn't copy the YAML ^^" (I think it made a difference because you had runtime: shiny) and one of the links didn't actually work, I just thought it did because (#top) links to the top of the document.
Does this maybe work for you?
## Introduction
## The Template
This should make a [link to the top of the page](#top).
This should make a [link to the introduction](#section-introduction).
This should make a [link to the template](#section-the-template).
as the solution? It'll help others who have the same problem as you did (the topic will be marked as solved and a preview of the solution will appear directly below your question )