我在使og标签在flexdashboard中工作时遇到问题。标签本身应该很好,我可以通过scripts.html
将它们包含在YAML标头中,如下所示:
---
title: "Baseball Dashboard v0.2"
output:
flexdashboard::flex_dashboard:
vertical_layout: scroll
includes:
in_header: scripts.html
runtime: shiny
---
但是当您转到www.baseball-dashboard.com时,它们不会显示在源代码中。 它们仅在我“检查” Chrome中的网站时显示,而在源代码中则不显示。来源看起来像这样:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="application/shiny-singletons"></script>
<script type="application/html-dependencies">json2[2014.02.04];jquery[1.12.4];shiny[1.2.0]</script>
<script src="shared/json2-min.js"></script>
<script src="shared/jquery.min.js"></script>
<link href="shared/shiny.css" rel="stylesheet" />
<script src="shared/shiny.min.js"></script> <script src="rmd_resources/rmd_loader.js"></script>
<link href="rmd_resources/rmd_loader.css" rel="stylesheet"/>
<script src="__assets__/sockjs-0.3.4.min.js"></script>
<script src="__assets__/shiny-server-client.min.js"></script>
<script>preShinyInit({reconnect:true,disableProtocols:[]});</script>
<link rel="stylesheet" type="text/css" href="__assets__/shiny-server.css"/>
</head>
<body>
<div>
<div data-display-if="!output.__reactivedoc__" data-ns-prefix="">
<div id="rmd_loader_wrapper">
<div id="rmd_loader" style="display: none">
<p>Please wait...</p>
<img src="rmd_resources/rmd_loader.gif"/>
</div>
</div>
</div>
<div id="__reactivedoc__" class="shiny-html-output"></div>
</div>
</body>
</html>
所以我想问题是他们没有出现在这里。